Adding new probes

Adding a new probe is done in three steps

  1. find a adequate class to back the class, or write a new one
  2. write a new probe description XML
  3. write new graphs descriptions or re use old one

The probe description XML is the central point. Every new probe needs a new one that will refers to the use java probe's class and associated graphs.

When it's done, the needed files might be packaged in a jar that is added to the libspath in the properties files. The xml files must be in the /desc path within the jar. They can also be simply added to the configuration directory if the needed classes are already in the classpath.

The xml descriptions can use variables in some place, that will be evaluated at run time. To use it, the syntax is ${VARIABLENAME}.

Variable evaluation is done with the static method parseTemplate(). This method take a String and some objects on which it try to extract informations from. So depending of the context of the call, some variables might not be defined. In example, the probe's variables are not usable in a host definition.

The usable variable are :

  • If given a Probe
    • probename: the probe name
    • label: the label of this probe if defined
    • attr.* and attr.*.signature, for every probe's attribute, a variable with the attribute value and, the MD5 hash of the attr value
  • if given a IndexedProbe
    • index: the index of the probe
    • index.signature: the MD5 hash of the index
    • index.cleanpath: a file path safe evaluation of the index
  • if given a UrlProbe
    • url: the URL of the probe
    • port:the port in an URL probe
    • url.signature: the MD5 hash of the URL
  • If given a ProbeConnected
    • the connection name used by this probe
    • the MD5 hash of the connection name
  • If given an RdsHost
    • host: the host name
    • dnsname: the value of the attribute dnsName set for this host, equals to host if not set
  • If given a GraphDesc
    • graphdesc.title: the title of the graphdesc
    • the name of the graphdesc
  • If given a ProbeDesc
    • the name of the probe desc
  • If given a List
    • 1..n: when evaluated in a list context, resolve to list[i]
  • Always available
    • system.<x>: a system propertie x.

Some variables usages :

  • Bits exchanged on interface ${index} on ${host}, used for a graph title.
probesdk.txt · Last modified: 2014/10/31 11:44 by root     Back to top