The host files

Every collected host is declared in a distinct file, defining it's name, and the probe to collect. To ease declaration, macro and collections can be used. A very simple host declaration can be :

<!DOCTYPE host PUBLIC "-//jrds//DTD Host//EN" "urn:jrds:host">
<host name="hostname">
    <probe type="ProbeType" />
</host>

The host attribute

For each host, some attributes are defined. A mandatory one is the host name, that will be used for displaying this host and searching it.

This can be a symbolic name, easy to use and remember. For IP connection, a attribute called dnsName can be added, that will provide (for example) the FQDN for the host, or it's IP.

Probe declaration

Each probe to collect is a separate XML element. It's type is mandatory to identify it. Some probes needs arguments, they are defined using a list of named attributes :

<probe type="ProbeType">
    <attr name="attrName">value</attr>
</probe>

Some probes takes an undefined number of arguments, they can use lists :

<probe type="ProbeType">
    <list>
        <arg type="Type">value</value>
    </list>
</probe>

It's up to the probe writer to decide which kind of declaration to use.

Some probes are connected probes and needs a connection declaration :

<connection type="Class name" >
    <attr name="attrName">value</attr>
</connection>

For each probe, a additional timer attribute can be used to define a different timer than the default one. For example, if in the properties files, the following timer is declared :

timers=fast
timer.fast.step=15
timer.fast.timeout=2

Then a fast collected probe can be defined with :

<probe type="CpuRawTimeLinux" timer="fast"/>

Collections and enumerations

Some nodes take a long list of probes, and sometimes the attributes differ only by a number. Thinks about a switch, with interfaces called if0, if1, and so one. It can be very tedious to write them all. Some servers can also use a lot of different file systems, repeating the probe declaration for each of them.

To ease writing and reading of those elements, both collections (an arbitrary set of values) and enumerations (a collection of consecutive values) can be used.

Collections

A collection is declared by it's name :

<collection name="collectionName">
    <element>elementa</element>
    <element>elementb</element>
</collection>

Probes are then put in a for element, referring to the collection name

<for var="i" collection="collectionName">
    <probe type="ProbeType">
        <attr name="name">${i}</attr>
    </probe>
</for>

Enumerations

Enumeration are not referenced, but directly generated in the for loop

<for var="i" min="1" max="3" step="1">
    <probe type="ProbeType">
        <attr name="name">${i}</attr>
    </probe>
</for>
 
hostfile.txt · Last modified: 2015/04/24 11:46 by arachne     Back to top