From OpenNMS
(Redirected from Monitoring and Data Collection of Memcached)
Contents |
Memcached Monitor
This monitor checks whether a memcached server is responding to a remote stats request, and optionally stores the values returned in the response to a successful stats request.
Detecting with Capsd
To detect the service you include a protocol-plugin in your capsd configuration ( $OPENNMS_HOME/capsd-configuration.xml) using the TcpPlugin targeted to the memcached listening port, for example:
<protocol-plugin protocol="Memcached" class-name="org.opennms.netmgt.capsd.plugins.TcpPlugin" scan="on">
<property key="port" value="11211" />
<property key="timeout" value="2000" />
<property key="retry" value="1" />
</protocol-plugin>
Monitoring with Pollerd
To monitor the availability and statistics from memcached, it is necessary to add a service to your poller configuration in $OPENNMS_HOME/etc/poller-configuration.xml, for example:
<!-- Example configuration 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" />
Statistics Collection
This monitor, like the StrafePingMonitor, returns a multi-valued result set. The datasource names are taken from the output of the memcached stats command:
- uptime
- rusageuser
- rusage_system,
- curr_items
- totalitems
- bytes,
- currconnections
- totalconnections
- connectionstructure
- cmdget
- cmdset
- gethits
- getmisses
- evictions,
- bytesread
- byteswritten
- threads
Version History/Availability
- This feature was added in version 1.7.4






