MemcachedMonitor

Monitors Memcached, a distributed memory object caching system. To monitor the service availability, the monitor tests if the Memcached statistics can be requested. The statistics are processed and stored in RRD files. The following metrics are collected:

Table 1. Collected metrics using the MemcachedMonitor
Metric Description

uptime

Seconds the Memcached server has been running since last restart.

rusageuser

User time seconds for the server process.

rusagesystem

System time seconds for the server process.

curritems

Number of items in this servers cache.

totalitems

Number of items stored on this server.

bytes

Number of bytes currently used for caching items.

limitmaxbytes

Maximum configured cache size.

currconnections

Number of open connections to this Memcached.

totalconnections

Number of successful connect attempts to this server since start.

connectionstructure

Number of internal connection handles currently held by the server.

cmdget

Number of GET commands received since server startup.

cmdset

Number of SET commands received since server startup.

gethits

Number of successful GET commands (cache hits) since startup.

getmisses

Number of failed GET requests, because nothing was cached.

evictions

Number of objects removed from the cache to free up memory.

bytesread

Number of bytes received from the network.

byteswritten

Number of bytes send to the network.

threads

Number of threads used by this server.

Monitor Facts

Class Name

org.opennms.netmgt.poller.monitors.MemcachedMonitor

Remote Enabled

true

Configuration and Use

Table 2. Monitor specific parameters for the MemcachedMonitor
Parameter Description Required Default value

retry

Number of attempts to establish the Memcached connnection.

optional

0

port

TCP port connecting to Memcached.

optional

11211

This monitor implements the Common Configuration Parameters.

Examples

The following example shows a configuration in the poller-configuration.xml.

<service name="Memcached" interval="300000" user-defined="false" status="on">
  <parameter key="port" value="11211" />
  <parameter key="retry" value="2" />
  <parameter key="timeout" value="3000" />
  <parameter key="rrd-repository" value="/opt/opennms/share/rrd/response" />
  <parameter key="ds-name" value="memcached" />
  <parameter key="rrd-base-name" value="memcached" />
</service>

<monitor service="Memcached" class-name="org.opennms.netmgt.poller.monitors.MemcachedMonitor" />