snmp

SNMP Monitoring for Java VM

SNMP is not really simple, but quite a useful protocol, if you want to run standard monitoring tools like Nagios, Zero RRD or Cacti.
Even though Java offers JMX for runtime information like thread and memory consumption, you can also use SNMP to read at least a subset.
In my opinion usage of a standard monitoring tool has several advantages over JMX-based visualization in jconsole or Lambda Probe:

  • Statistics fit into centralized reporting, e.g. for SLAs.
  • The tools are independent of the Java VM. If the VM freezes, the history is still available

Nagios using SNMP for Process Monitoring

Without special reconfiguration on the SNMP daemon, you are able to check processes on a Linux resp. services on a Windows host remotely:

  • Linux Process: check_snmp_process.pl -H $HOSTADDRESS$ -C public -n $ARG1$ $ARG2$
  • Windows Service: check_snmp_win.pl -H $HOSTADDRESS$ -C public -n $ARG1$ $ARG2$

The first argument in these checks provides the pattern for the process resp. service name. As usual another optional argument may append further options.

Nagios using SNMP for the Basic Checks (CPU, Mem, Disk)

For the basic remote checks I compared several SNMP checks already available for
Nagios and finally moved on with the following:

Nagios SNMP

SNMP (at least running in Linux using the NET-SNMP) is providing enough data to setup checks for CPU load, idle resources, memory, disk and processes in Nagios.

Syndicate content