Those probes use a local agent on linux and windows hosts. On Linux, this agent directly parses ”/proc” and ”/sys”. On Windows, it uses COM to query WMI. It can also provides some jmx counters, that then works on every operating system.
It's made of two component, a generic jar that provides the probe description and the probes classes.
The second part is a local agent that runs on the server to be monitor. There is a windows and a linux version.
The nightly build are:
The github URL to the agent is JrdsAgent's github. It uses maven.
git clone git://github.com/fbacchella/jrdsagent.git jrdsagent cd jrdsagent/
And build it
After build or download, jrdsagent is used by launching using the command:
java -jar .../jrdsagent-<kind>.jar
For communications, jrdsagent default are the port 2002 and the protocol RMI. The port can be changer with the property jrds.port.
The protocol is set using the property jrds.proto. It can take the following values :
rmi, the default protocol, using the the only the port given for communications and providing it's own registry.
jmx, using jmx over rmi.
jmxmp, using the new and NAT friendly jmxmp protocol, but some setup is required and don't scale well.
jolokia, using Jolokia that use plain http and serialize using json.
RMI is full of tricks and booby traps. Ensure that the hostname don't resolve to 127.0.0.1 in /etc/hosts.
jmxmp is more friendly but don't scale well, it can loose threads (look for long lived Job_Executor threads). All the needed libraries are embeded in the agent jar.
More informations about jmxmp can be found in the page about the jmx probes
A usage example is
java -Djrds.port=2002 -Djrds.proto=jmxmp -jar target/jrdsagent-<kind>.jar
The jar is also the probes plug-in, so it must be declared on the server that run jrds, in the jrds.properties files :
The connection class for this probe is
jrds.probe.AgentConnection and uses two attributes:
port, the port used by the agent
protocol, the protocol used by the agent.
Both values must match the properties used for launching the jrdsagent on the remote host.
If the connection used is
jrds.probe.LocalAgentConnection, then jrdsagent is run within jrds. It should be obvious that it's usefull only for the localhost, but it then can run very fast, without any network and RMI over head.
For example, if the agent was launched with:
/usr/bin/java -Djrds.proto=jolokia -Djrds.port=2002 -jar /usr/share/java/jrdsagent.jar
The associated connection declaration in the host should be:
<connection type="jrds.probe.AgentConnection"> <attr name="port">2002</attr> <attr name="protocol">jolokia</attr> </connection>
Local agent probes are connected probes
The connection class for this probe is jrds.probe.AgentConnection.
If the the connection class used is jrds.probe.LocalAgentConnection, there is no need to launch a local agent, jrds will take care of that. It works obviously only for the localhost.
|port||The connection port|
|protocol||The communication protocol, one from rmi, jmx, jmxmp or jolokia|