Java SNMP
A simple ZenPack containing a java monitoring
template (using the inbuilt SNMP agent in Sun Java 1.5 onwards).
At the moment it monitors memory (heap and non-heap), threads,
classes loaded, and uptime.
Some brief and possibly correct instructions:
- On the server to be monitored enable the SNMP agent in Java
by passing the following command line options:
- Dcom.sun.management.snmp.port=5555
- Dcom.sun.management.snmp.interface=[IP address of local interface]
which will cause it to listen on port 5555 on the interface given (if
you change the port number you will need to change the Zenoss template as
at the moment it is hard-coded to use 5555). For full command line
options see http://java.sun.com/j2se/1.5.0/docs/guide/management/SNMP.html
-
In the $JAVA_HOME/jre/lib/management directory copy the file
'snmp.acl.template' to 'snmp.acl'. Edit 'snmp.acl' to allow read-only
access from your ZenOSS server. Ensure the permissions on the file
do not allow read/write access from anybody but the owner.
- Open up the port on your firewall to allow UDP packets from your
Zenoss server on port 5555.
- (This step is needed as the version of check_snmp from nagios-plugins
used in Zenoss 2.1.1 doesn't support 64-bit counters properly. This has
been fixed in later nagios-plugin releases. See
http://dev.zenoss.org/trac/ticket/2528 for progress on updating
Zenoss's version of nagios-plugins.)
On your Zenoss server, download the latest version of nagios-plugins
from http://nagiosplugins.org/ (1.4.9 or above will do). Unpack and
run in the unpacked directory:
./configure
make
and then copy check_snmp from the 'plugins' directory to $ZENHOME/libexec
(overwriting the existing version).
- In Zenoss, add the template 'Java' from /Devices/Server to the required
device(s).
- Look at the graphs in the 'Perf' tab.
[return: ZenPack Project Site]