Connected probes
Many probes can share a common connection to get values. For example, JDBC probes use a single connection to the database and do all requests using the same socket, to reduce the load on the server. So when jrds launch a collect, the connection is established once, and each probe will re-use it. The connection is closed at the end of the collect. It's also useful for problem detection. If the connection failed, none all the probes will run.
Each connection is created using the following declaration
<connection type="Class name" >
<arg type="type name" value="value" />
...
</connection>
For example, to declare a WMI connection to a windows server:
<connection type="jrds.wmi.WMIConnection">
<arg type="String" value="DOMAIN" />
<arg type="String" value="User" />
<arg type="String" value="password" />
</connection>
It might be necessary to make many connection of the same kind on a server, for example when there is many data base instance on the same server. The attribut name can be given to a connection and the probe will then use it using the connection attribute. For example:
<connection type="jrds.probe.jdbc.JdbcConnection" name="mysql">
<arg type="String" value="monitor" />
<arg type="String" value="password" />
<arg type="String" value="jdbc:mysql://server" />
</connection>
<connection type="jrds.probe.jdbc.JdbcConnection" name="postgres">
<arg type="String" value="monitor" />
<arg type="String" value="password" />
<arg type="String" value="jdbc:postgresql://server" />
</connection>
<probe type="MySqlStatusGeneric" connection="mysql" />
<probe type="PgStatDatabase" connection="postgres">
<arg type="String" value="xwiki" />
</probe>
