1. An event gathering method comprising: storing cost information between nodes which manages by associating a transmission node identifier, which identifies a transmission source node of a communication with a reception destination node, and a reception node identifier, which identifies the reception destination node, with a first communication cost between the transmission source node and the reception destination node, the communication occurring between nodes including a sensor node which transmits an event and an intermediate node which relays the event; modifying or storing the event in a process which gathers the event from the network; gathering cost information between modules which manages by associating a transmission module identifier, which identifies a transmission source module, and a reception module identifier, which identifies a reception destination module, with a second communication cost of a occurred event, the occurred event occurring between the transmission source module and the reception destination module in the modifying or the storing; extracting a pattern candidate which assigns one or more modules to one or more first nodes included in the sensor network as a plurality of deployment pattern candidates which manages by associating a module identifier, which identifies the module, with a node identifier which identifies the first node; computing a total communication cost based on the cost information between modules and the cost information between nodes regarding each of the plurality of deployment pattern candidates; selecting a deployment pattern candidate having the smallest total communication cost from among the plurality of deployment pattern candidates; and deploying the one or more modules in the one or more first nodes based on a selected deployment pattern candidate.