...
If the CMR is currently not available, an exception is thrown to indicate that there is a problem and the measurements are thrown away by the sensors (it doesn't makes sense to store them temporarily as the Agent cannot know when the CMR will be up again). In this case the registration process is executed every 10 seconds until the server is available and all IDs are registered.
Before any Agent can send measurements, they have to register different parts of their system. The order of the registration is important, too, otherwise there will be errors:
- Registration of the Platform: Every Agent receives a unique id from the CMR so all measurements can be associated to this Agent. Different information is needed to create that id:
- Network Interfaces: A list of the network interfaces on the target computer has to be collected. As this is not sufficient because of several Agents on the same computer with different JVM's the following information is needed, too.
- Agent Name: A self-defined Agent name, provided in a configuration file for example, has to be specified, too.
- Registration of Sensor Types:*As new sensor types can be plugged in easily into the Agent system, they have to be registered so that the CMR knows which sensor types are active on that specific Agent. There are two different sensor types available: *Method and Platform sensor types. Methodsensor types are collecting data from instrumented methods, thus their measurement/data container needs additional information of which method this container belongs to. Platform sensor types on the other hand collect data (automatically or requested by the user) of the target system or the target virtual machine. Both sensor types are registered by the CMR by passing the Platform id and the fully qualified class name. A successful register process will return a unique ID for this sensor type.
- *Registration of Methods:*Every instrumented method needs to be registered in the CMR. A successful register process will return a unique ID for this sensor type.
Every sensor on the Agent can then use these IDs for their measurements.