1. A method comprising: receiving event data representing an event on a computer network, the event data being indicative of a plurality of entities and an action involved in the event; identifying the entities and a relationship between the entities, based on the action in the event data; and creating, for the event, a record of the relationship between the entities by using a data structure representing a relationship graph, the relationship graph including at least two nodes and an edge between the two nodes, each node representing one of the entities, the edge representing the relationship between the entities.