Home > Java, Sysadmin > How to build and deploy JRDS

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 :

  1. Fetch and extract JRDS sources from the subversion repository
  2. Fetch and extract RRD4j sources from the subversion repository (note: a dev.java.net account seem to be required)
  3. Build RRD4j
    • # cd rrd4j/rrd4j
    • # ant
    • # cp rrd4j-<version>.jar $JRDS_HOME/trunk/lib
  4. 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
  5. Before deploy jrds.war, you need to create a properties file, and some directories. See the inital setup chapter of JRDS Userguide.
  6. 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.




<?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 type="IfSnmp">
               <arg type="String" value="eth0" />
        <probe type="CpuLoadFloat" />
        <probe type="TcpStat" />

Categories: Java, Sysadmin Tags:
  1. FabriceB
    May 26th, 2009 at 02:47 | #1

    It’s not needed any more to extract c.tld, the ant build does it for you.

  2. May 27th, 2009 at 12:56 | #2

    It’s not correct, there are a CLI on CACTI


  3. May 27th, 2009 at 14:47 | #3

    Francois Bayart :
    It’s not correct, there are a CLI on CACTI

    Hello François,

    yes indeed, someone told me that few seconds after I post. However, have you ever used them? Do they work good?

  4. June 2nd, 2009 at 11:51 | #4

    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

  5. June 2nd, 2009 at 12:32 | #5

    (note: a dev.java.net account seem to be required)
    -> mandatory and to join dev.java.net it’s not easy FYI

  6. FabriceB
    June 20th, 2009 at 12:32 | #6

    dev.java.net allows anonymous access :
    svn co –username guest –password ” https://rrd4j.dev.java.net/svn/rrd4j/trunk

  7. nettezzaumana
    June 30th, 2009 at 15:12 | #7

    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

  8. September 5th, 2013 at 08:38 | #8

    It’s a wonderful project and I tried and found some isues

    1 “connector” is configured using “attr” not property name


    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());
    return graphNode;
    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

  9. September 5th, 2013 at 09:47 | #9

    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 ?

  1. No trackbacks yet.