Exemple installation on UNIX™
Requirements
- Java >= 1.5 (1.6 is recommanded)
- Ant >= 1.7
You can also found another example on asyd's blog about jrds.
CentOS 5.2
jrds expect to run with at least Java 1.5, the default java from Centos is gcj 1.4.2. One should install an earlier version from Sun or Jpackages and then set JAVA_HOME. I used the method two shown on this Centos' wiki.
There is a few gotcha by using stock java tools provided by CentOS. One should install them from jpackage. But don't forget JPackage jpackage-utils compatibility for CentOS 5.x, a workaround for a bug that will not be corrected until Centos 6.0. Recommended packages are ant.noarch, ant-junit.noarch, ant-nodeps.noarch, ant.noarch and ivy.noarch.
Building RRD4j and JRDS
For the impatient, the latest nightly builds are available, the war to embedded it in a Tomcat server or an archive to run jrds as a standalone server.
JAVA_HOME=/usr/lib/jvm/java-1.6.0 export JAVA_HOME
Get the last svn checkout
git clone git://github.com/fbacchella/jrds.git jrds cd jrds JRDS_HOME=$PWD
Resolve dependancies using ivy.
mkdir -p $HOME/.ant/lib curl -o $HOME/.ant/lib/ivy.jar http://repo1.maven.org/maven2/org/apache/ivy/ivy/2.1.0-rc2/ivy-2.1.0-rc2.jar cd $JRDS_HOME CLASSPATH=$HOME/.ant/lib/ivy.jar ant resolve
Copy local.properties.sample to local.properties and edit it to suit your needs, you need to tell JRDS where to find the servlet API. For example, for Tomcat, use something like:
#The path to the application server root
appserv.home = /Users/bbonfils/tools/apache-tomcat-6.0.20
#If your application serve is Tomcat 6
appserv.servlet-api = ${appserv.home}/lib
If your using the embedded jetty, it should be:
#The path to the application server root
appserv.home = .
appserv.servlet-api = ${appserv.home}/libjetty
Build the war.
ant
Building extra probes (optional)
Some probes like rpc or jkstat needs external library, check the ant build.xml file and build them.
Initial configuration
Create the needed directories
mkdir -p /opt/jrds/{probe,config,log}
Configure /opt/jrds/config/jrds.properties with needed values.
configdir=/opt/jrds/config rrddir=/opt/jrds/probe logfile=/opt/jrds/log/jrds.log
Run JRDS in standalone mode
If you want a quick start, just run it standalone, in daemon mode
ant jetty mkdir -p /opt/jrds/webapp tar xpf build/jrds.tar -C /opt/jrds/webapp java -DpropertiesFile=/opt/jrds/config/jrds.properties -jar /opt/jrds/webapp/WEB-INF/lib/boot.jar
You can add -Djetty.port=<port number> parameter if you want another port than the default one (8080).
Run JRDS with Tomcat
If you have a Tomcat installation, it can be used
sudo mkdir -p /opt/jrds/config /opt/jrds/probe /opt/jrds/log sudo chown -R $USER:tomcat /opt/jrds cp build/jrds.war /opt/jrds/ sudo -e /etc/tomcat5/Catalina/localhost/jrds.xml
The jrds.xml content is:
<?xml version='1.0' encoding='utf-8'?> <Context cookies="false" debug="1" displayName="jrds" docBase="/opt/jrds/webapp" path="/jrds" workDir="work/Catalina/localhost/jrds"> <Parameter name="propertiesFile" value="/opt/jrds/config/jrds.properties"/> </Context>
You can now start tomcat
/etc/init.d/tomcat6 start
You can now read the document about how to add devices
