1. A computer implemented method for collecting data, the computer implemented method comprising: collecting data from a particular data source by an application portion of agent to form collected data, wherein the application portion is associated with the particular data source in response to an event; storing, by the application portion of the agent, the collected data in a data file within a data store device for transfer to a data storage system to form stored data in the data store device; sending the stored data to the data storage system using a generic portion of the agent, wherein the generic portion of the agent is configured to send data to the data storage system, wherein both the application portion of the agent and the generic portion of the agent directly access the data store device by calling a respective application programming interface (API), and wherein the event is an invocation of the application portion of the agent by the generic portion of the agent that occurs responsive to information received by the generic portion of the agent that specifies the particular data source as well as an expected format of the data to collect from the particular data source; and selectively transforming the collected data into a format for aggregation with other data in the data storage system using an aggregation policy that specifies attributes for aggregating the collected data and the other data into different time-based granularities, wherein the generic portion of the agent comprises (i) a generic application programming interface that the application portion of the agent calls using an application programming interface portion of the application agent in order to store the collected data in the data file, and (ii) an intelligent remote agent application programming interface that is called by generic agent code of the generic portion of the agent to both retrieve the stored data from the data file and send the stored data to the data storage system.