The probe class

This class purpose is to manage the probe protocol or apply specific operations to collected data. In most cases, you will not need to write a new class, unless you're collecting using a new protocol.

For specific treatment, it's better to write an inherited class. The important methods are :

The constructor is not used for configured, only the empty constructor is used. The configuration is done using configure() methods. The boolean values is set to fail if the probe configuration failed.

Arguments can be given to a probe. The must respect bean syntax, take a String setter and be declared in the ProbeBean annotation. The bean name will the the attr name in the probe declaration.

When writing a class using a new protocol, the method getNewSampleValue should return values read directly from it, with the least amount of transformations done. If it failed, it must return a null value.

The parsing of collecting value from the native type of the protocol to Number object should be done in the filterValues method.

If high level operations are needed, they can be done in modifySample, it gives access to both the filtered values and the final rrd sample.

Some probes are connected probes. For this kind of probe, it's not getNewSampleValues that should be overidden but getNewSampleValuesConnected that receive the alive connection as a parameter.

The following connections are already written :

 
probesdk/class.txt · Last modified: 2013/06/13 05:04 by root     Back to top