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
It’s a wonderful project and I tried and found some isues
1 “connector” is configured using “attr” not property name
monitor
password
jdbc:mysql://server
is not correct
2 The URL for a graph is /graph/host_name/graph_name?period_definition.
the graph_name is confused ,I trace the code and found the graph runtime name is like localdaas/mysqlstatus/mysqlcachehits-jdbc:mysql://localhost:8066/TESTDB
but when you wan’t give short name ‘ mysqlcachehits’ ,you can change the code in ParamsBean
/* */ public GraphNode getGraphNode(JrdsServlet caller) {
/* 322 */ GraphNode gn = null;
/* 323 */ if (this.id != null)
{
String host = getValue(“host”);
String probe = getValue(“probe”);
String graph = getValue(“graphname”);
System.out.println(” getGraphNode ,host:”+host+”,probe:”+probe+”,graph:”+graph);
for(GraphNode graphNode: hostlist.getProbeByPath(host,probe).getGraphList())
{
System.out.println(“graph :”+graphNode+ ” ,name “+graphNode.getName());
if(graphNode.getName().startsWith(graph+”-“))
{
return graphNode;
}else
{
logger.warn(“can’t find graphnode ,host:”+host+”,probe:”+probe+”,graph:”+graph);
}
}
/* 324 */ gn = this.hostlist.getGraphById(this.id.intValue());
}
the url is http://localhost:8080/jrds/graph/localdaas/mysqlstatusbytes?probe=mysqlstatus
This page is quite old. Did you check the last version at https://github.com/fbacchella/jrds, and the documentation at http://jrds.fr ?
Can you open a issue at https://github.com/fbacchella/jrds/issues with more details about you’re problem ?