How to build and deploy JRDS
At my work, we currently use nagios and cacti for monitoring, the “standard” tools. However, why it’s difficult to replace nagios – for many reasons (it use standard flat configuration flies) – I’m looking for a way to replace Cacti. Indeed, it’s written in pure PHP, there is almost no CLI. So, when I add a new host, I need to use my browser, and my mouse, and I don’t like that. By chance, a friend of mine wrote his own tool, called JRDS, in pure Java. I’m actually in test phase, however, here are some pros:
- It’s Java, no need for php, whatever.
- JRDS use rrd4j, RRDTool Java implementation
- Use flat files for configuration, so it’s very easy to manage
However, one of its wort cons i s the lack of documentation! So here some notes to build JRDS :
- Fetch and extract JRDS sources from the subversion repository
- Fetch and extract RRD4j sources from the subversion repository (note: a dev.java.net account seem to be required)
- Build RRD4j
# cd rrd4j/rrd4j# ant# cp rrd4j-<version>.jar $JRDS_HOME/trunk/lib
- Build JRDS
- If you don’t have it, download ivy and copy its jar in ~/.ant/lib directory
# cd $JRDS_HOME/trunk# ant resolve- Extrat c.tld from lib/standard.jar and copy the file in the lib/ directory (
# unzip lib/standard.jar META-INF/c.tld ; mv META-INF/c.tld lib/ ; rmdir META-INF # cp local.properties.sample local.properties- Edit local.properties, don’t forget to set jai.home at the end of file
# ant war
- Before deploy jrds.war, you need to create a properties file, and some directories. See the inital setup chapter of JRDS Userguide.
- Note: to deploy JRDS on Glassfish, the only way I found to create the property is to defined in the JVM options. I also have sometimes a deadlock, if that appears, you need to kill the Glassfish process and restart it.
jrds.properties
configdir=/Users/bbonfils/tools/jrds/config rrddir=/Users/bbonfils/tools/jrds/probe logfile=/Users/bbonfils/tools/jrds/log/jrds.log libspath=/Users/bbonfils/sources/jrds/trunk/build/probes.jar #loglevel=debug
config/host-kaoru.xml
<?xml version="1.0" encoding="UTF-8"?> <host name="kaoru.asyd.net"> <snmp community="secret" version="2"/> <probe type="TcpSnmp" /> <probe type="IpSnmp" /> <probe type="UdpSnmp" /> <probe type="IcmpSnmp" /> <probe type="MemLinux" /> <probe type="CpuRawTimeLinux" /> <probe type="UcdRawSystemCounter" /> <probe type="PartitionSpace"> <arg type="String" value="/" /> </probe> <probe type="IfSnmp"> <arg type="String" value="eth0" /> </probe> <probe type="CpuLoadFloat" /> <probe type="TcpStat" /> </host>
It’s not needed any more to extract c.tld, the ant build does it for you.
It’s not correct, there are a CLI on CACTI
cacti/cli/
add_data_query.php
add_device.php
add_graphs.php
add_graph_template.php
add_perms.php
add_tree.php
copy_user.php
host_update_template.php
poller_data_sources_reapply_names.php
poller_graphs_reapply_names.php
poller_output_empty.php
poller_reindex_hosts.php
rebuild_poller_cache.php
repair_database.php
structure_rra_paths.php
upgrade_database.php
Hello François,
yes indeed, someone told me that few seconds after I post. However, have you ever used them? Do they work good?
Yes I use it and the basic actions works fine but there are not advanced command.
But it’s a simple way to make mass action as add device
(note: a dev.java.net account seem to be required)
-> mandatory and to join dev.java.net it’s not easy FYI
dev.java.net allows anonymous access :
svn co –username guest –password ” https://rrd4j.dev.java.net/svn/rrd4j/trunk
in step #3 is *jar file placed in $RRD4J/lib not in $RRD4j ..
probably there should be also noticed, that under solaris is needed ant from blastwave for compiling ivy when needed
regards by ntz