patch for agent-x/snmp monitoring

Dirk-Willem van Gulik dirkx at webweaving.org
Thu Mar 20 18:06:15 UTC 2008


See below for an old patch which essentially lets you SNMP monitor  
memcached with ease. Note that it uses a subagent (which either runs  
independently or is embedded within the (net-snmp) snmpd daemon.

The reason for this is that embedding instrumentation inside memcached  
itself is not entirely trivial - as one needs to mess with the select/ 
poll/event handling; and the standard 'mib 2 c-code' conversion tools  
are not up to that (though they are ideal w.r.t to the stats.* struct  
we have - so it is virtually no code).

Note that the OID is a 'fake' one (999999) -- should this go into any  
release then I suggest dashing a form off to IANA to get a proper  
prefix (which takes but a few days, no money involved).

For those who want to play - below snipped will graph a few fun values  
in mrtg:

         Target[mc]: .1.3.6.1.4.1.999999.1.9.1.0&. 
1.3.6.1.4.1.999999.1.9.2.0:public at mchost
         Title[mc]: Set and Get commands
         Options[mc]: growright, nopercent
         PageTop[mc]: <h2>Set and Get commands</h2>
         LegendI[mc]: get
         LegendO[mc]: set


Thanks,

Dw.

Index: snmp/README
===================================================================
--- snmp/README	(revision 0)
+++ snmp/README	(revision 0)
@@ -0,0 +1,86 @@
+Monitoring bridge for memcached.
+
+Net-SNMP can be dynamically extened by using an 'AgentX'
+compliant extention. Essentially a sub-agent registers
+with the main agents and claims part of the OID tree.
+
+This daemon implements an AgentX module which monitors
+memcached using the 'stat' command.
+
+Installation (ideally on the same machine).
+
+1.	Install net-snmp (any recent version will do).
+
+2.	Ensure that net-snmp has 'agent x' configured and
+	is running as the master agent by adding/uncommeting
+	the line:
+
+		master agentx
+
+	in snmpd.conf.
+
+3.	If you are not going to run this sub agent as root (which
+	is sensible) then make sure that the agent-X unix domain
+	or tcp socket is accessible by the UID; or consult the
+	snmpd.conf manpage (see agentXPerms or agentXSocket).
+
+4.	Make sure snmpd and memcached are indeed running.
+
+5.	Run the agent with
+
+		./snmpd-subagent-memcached
+
+	or if you are using a non standard port:
+
+		./snmpd-subagent-memcached :121
+
+5.  	Run the command
+
+		snmpwalk -M +. -m +MEMCACHED-DRAFT-MIB  -v2c -c public localhost  
1.3.6.1.4.1.999999
+
+	to check that you can fetch the values. The output should look
+	like this:
+
+		MEMCACHED-DRAFT-MIB::uptime.0 = Timeticks: (151200) 0:25:12.00
+		MEMCACHED-DRAFT-MIB::time.0 = INTEGER: 1206034642
+		MEMCACHED-DRAFT-MIB::version.0 = STRING: 1.2.5
+		MEMCACHED-DRAFT-MIB::pointerSize.0 = INTEGER: 32
+		MEMCACHED-DRAFT-MIB::limitMaxBytes.0 = Counter32: 67108864
+		MEMCACHED-DRAFT-MIB::processIdentifier.0 = STRING: 26678
+		MEMCACHED-DRAFT-MIB::rusageUserCount.0 = Counter32: 71
+		MEMCACHED-DRAFT-MIB::rusageSytemCount.0 = Counter32: 191
+		MEMCACHED-DRAFT-MIB::threads.0 = Gauge32: 4
+		MEMCACHED-DRAFT-MIB::connectionStructures.0 = INTEGER: 4
+		MEMCACHED-DRAFT-MIB::totalItems.0 = Gauge32: 715631
+		MEMCACHED-DRAFT-MIB::currItems.0 = Gauge32: 16262
+		MEMCACHED-DRAFT-MIB::bytes.0 = Gauge32: 1671262
+		MEMCACHED-DRAFT-MIB::currConnections.0 = Gauge32: 31
+		MEMCACHED-DRAFT-MIB::totalConnections.0 = Counter32: 37
+		MEMCACHED-DRAFT-MIB::getHitsCount.0 = Counter32: 615211
+		MEMCACHED-DRAFT-MIB::getMissesCount.0 = Counter32: 3512
+		MEMCACHED-DRAFT-MIB::evictionsCount.0 = Counter32: 12771
+		MEMCACHED-DRAFT-MIB::cmdGetCount.0 = Counter32: 986512
+		MEMCACHED-DRAFT-MIB::cmdSetCount.0 = Counter32: 1091
+		...
+		..
+
+6.	That's it. If needed move the 'memcached.mib' file into .../share/ 
snmp/mibs
+	or somewhere else and edit your snmp.conf file along the lines of
+
+		mibfile ..../memcached.mib
+		defVersion 2c
+		defCommunity public
+
+	as to allow you to simply enter:
+
+		snmpwalk memhost getHitsCount
+	or
+		snmpwalk memhost cmdCounts
+
+Finally - there are several other useful directives in snmpd.conf
+which govern monitoring and reconnection policy. See  
agentXPingInterval,
+agentXTimeout and agentXRetries in particular. Note that by default
+both this agent and net-snmp are relatively robust and will cope with
+each other (or memcached itself) going down.
+
Index: snmp/subagent.pl
===================================================================
--- snmp/subagent.pl	(revision 0)
+++ snmp/subagent.pl	(revision 0)
@@ -0,0 +1,236 @@
+#!/usr/bin/perl
+#
+# SNMP bridge which maps the memcached statistics into
+# an MIB space as defined my 'memcached.mib'.
+#
+# Changes: 2003-08 Add CPU to mib (dirkx-at-webweaving-dot-org)
+#	   2004-06 sync with 1.1.11??? (dirkx)
+#
+use Memcached::libmemcached;
+use IO::Socket;
+
+use NetSNMP::ASN(':all');
+use NetSNMP::OID (':all');
+use NetSNMP::agent (':all');
+
+$NAME='memcached'; 	# a-z,0-9,A-Z only - as passed to net-snmp.
+
+($host,$port) = ('localhost',11211);
+
+# Keep the values for up to 10 seconds; as not to inudate the
+# memcached daemon with statistics requests.
+#
+$CACHE_DELAY=10;
+
+# Private 'enterprise' number - as issued by IANA and referenced
+# from in the MIB. Note that 99999 is a fake value until such
+# has indeed been done.
+#
+$OID = "1.3.6.1.4.1.999999";
+
+$VERBOSE=0;
+
+my %name2oid = (
+# name passed on the wire     SNMP OID     SNMP type (as defined in  
MIB)
+#
+                  uptime => [ $OID.'.1.1.1.0', ASN_TIMETICKS ],
+                    time => [ $OID.'.1.1.2.0', ASN_INTEGER ],
+                 version => [ $OID.'.1.1.3.0', ASN_OCTET_STR ],
+            pointer_size => [ $OID.'.1.1.4.0', ASN_INTEGER ],
+          limit_maxbytes => [ $OID.'.1.1.5.0', ASN_COUNTER  ],
+                     pid => [ $OID.'.1.1.6.0', ASN_OCTET_STR ],
+
+           rusage_system => [ $OID.'.1.2.1.0', ASN_COUNTER ],
+             rusage_user => [ $OID.'.1.2.2.0', ASN_COUNTER ],
+
+                 threads => [ $OID.'.1.3.1.0', ASN_GAUGE ],
+
+   connection_structures => [ $OID.'.1.4.1.0', ASN_INTEGER ],
+
+             total_items => [ $OID.'.1.5.1.0', ASN_GAUGE ],
+              curr_items => [ $OID.'.1.5.2.0', ASN_GAUGE ],
+                   bytes => [ $OID.'.1.5.3.0', ASN_GAUGE ],
+
+        curr_connections => [ $OID.'.1.7.1.0', ASN_GAUGE ],
+       total_connections => [ $OID.'.1.7.2.0', ASN_COUNTER ],
+
+                get_hits => [ $OID.'.1.8.1.0', ASN_COUNTER ],
+              get_misses => [ $OID.'.1.8.2.0', ASN_COUNTER ],
+               evictions => [ $OID.'.1.8.3.0', ASN_COUNTER ],
+
+                 cmd_get => [ $OID.'.1.9.1.0', ASN_COUNTER ],
+                 cmd_set => [ $OID.'.1.9.2.0', ASN_COUNTER ],
+
+              bytes_read => [ $OID.'.1.10.1.0',ASN_COUNTER64 ],
+           bytes_written => [ $OID.'.1.10.2.0',ASN_COUNTER64 ],
+
+             Mbytes_read => [ $OID.'.1.11.1.0',ASN_COUNTER ],
+          Mbytes_written => [ $OID.'.1.11.2.0',ASN_COUNTER ],
+);
+
+die "Syntax: $0 [host][:port]\n"
+	if $#ARGV > 1;
+
+# Though it is nowhere in the documentation - we can also run inside
+# the embedded perl interpreter within net-snmp. Simply add a line
+# 'perl do "/path/...../subagent.pl' to your snmpd.conf. This reduces
+# your daemon footprint a wee bit.
+#
+if (!$agent) {
+	$subagent = 1;
+	$agent = new NetSNMP::agent('Name' => $NAME, 'AgentX' => 1)
+		or die "Cannot connect to the net-snmp master agent (is the socket  
directory rw for this uid?): $!\n";
+};
+
+$host = shift @ARGV if $#ARGV == 0;
+$port = $1 if $host =~ s/:(\w+)//;
+
+my $regoid = new NetSNMP::OID($OID)
+	or die "Oid to register under ($OID) is not valid\n";
+
+$agent->register($NAME, $regoid, \&_do)
+	or die "Failed to registerd the oid $OID($regoid) with the master  
agent: $!\n";
+
+# Above table closely mimics the 'snmptranslate' output - but
+# is not ideal for our internal mapping. Hence we pre-compute
+# and (pre)sort some of the arrays some arrays. Secondly; NetSNMP
+# OID objects cannot be used as hash references - so we create a
+# second textual table.
+#
+ at ids=();
+foreach my $ap (values %name2oid) {
+	my ($oid, $type) = @$ap;
+	$type{ $oid } = $type;
+};
+ at toids = sort { snmp_oid_compare( new NetSNMP::OID($a), new  
NetSNMP::OID($b) ) } keys %type;
+map { push @oids, new NetSNMP::OID($_); } @toids;
+
+$host .= ":11211" unless $host =~ /:\d+/;
+update();
+
+# Return to net-snmp if we're running embedded.
+return unless $subagent;
+
+sub done { $subagent = 0; }
+$SIG{'INT'} = \&done;
+$SIG{'QUIT'} = \&done;
+
+warn "Agent started waiting for request in the $OID tree\n"
+	if $VERBOSE;
+
+while($subagent) {
+	$agent->agent_check_and_process(1);  # 1 = block
+};
+warn "Exit on signal\n" if $VERBOSE;
+
+$agent->shutdown();
+exit 0;
+
+sub update {
+	# Update the last_request early - as to also shield re-connetion
+	# attempts from a barrange of snmp get's.
+	#
+	$last_request = time;
+
+	if (!$sock) {
+		if (!($sock = IO::Socket::INET->new(PeerAddr => $host, Proto =>  
'tcp'))) {
+			warn "Warning: Couldn't connect to $host $!";
+			return 0;
+		};
+		warn "Connected to $host\n" if $VERBOSE;
+	};
+	warn "Fetching from memcached\n" if $VERBOSE > 1;
+
+	# Fire off the stats request to memcached; ignore any data not  
understood.
+	#
+	print $sock "stats\r\n";
+	while (<$sock>) {
+        	last if /^END/;
+		s/[\r\n]+$//;
+            	$items{$1} = $2 if (/^STAT\s+(\S*)\s+(.*)/);
+        }
+	if (!defined($items{pid})) {
+		warn "Warning: Statistics fetch failed, reconnecting\n";
+		$sock->close();
+		undef $sock;
+		return 0;
+	};
+		
+	# As to allow (older) snmp installations to see values which easily
+	# exceed 32bits - we maitain a second set of 32 bit counters which
+	# are in Megabytes rather than in bytes.
+	#
+	$items{ Mbytes_read } = $items{ bytes_read } / 1024 / 1024
+	;#	if defined $item{ bytes_read };
+
+	$items{ Mbytes_written } = $items{ bytes_written } / 1024 / 1024
+	;#	if defined $item{ bytes_written };
+
+	%data = ();
+	foreach $item (keys(%items)) {
+		# Ignore anything we do not know about.
+		#
+		my ($oid,$type) = @{$name2oid{ $item }} or next;
+
+		# This dynamic mapping can be optimized out - it is jsut that
+		# the name2oid table closely maps the output of 'snmptranslate'
+		# and hence is easie(r) to maintain this way.
+		#
+		if ($type{$oid} == ASN_TIMETICKS) {
+			$items{$item} *= 100;
+		}
+		elsif ($type{$oid} != ASN_OCTET_STR) {
+			$items{$item} = int($items{$item});
+		};
+		$data{ $oid } = $items{$item};
+	};
+
+	return 1;
+}
+
+# Handler to deal with the SNMP requests. We ignore anything we do not
+# understand or can handle - (rather than give an error) as to let  
other
+# sub-agents pick these up.
+#
+sub _do {
+    my  ($handler, $registration_info, $request_info, $requests) = @_;
+    # Only do this every X seconds - as needed.
+    #
+    update() or return
+	if (time - $last_request) > $CACHE_DELAY;
+
+    for ($request = $requests; $request; $request = $request->next()) {
+	my $oid = $request->getOID();
+		
+	# One cannot use a NetSNMP::OID has a hash reference (NetSNMP its  
compare
+	# functions are under 'strict'). Hence we create something more  
convenient.
+	#
+	my $toid = join('.',$oid->to_array());
+
+	warn "Fetch for $toid\n" if $VERBOSE > 2;
+
+	if ($request_info->getMode() == MODE_GET) {
+		if (defined $data{$toid}) {
+			warn "get: Returning $toid: $data{$toid} ($type{$toid})\n" if  
$VERBOSE > 1;
+			# Note - the '"' around the value are to cheat the 64 unsigned  
conversion. Quite
+			# possiblye a net-snmp bug.
+			$request->setValue($type{$toid}, "$data{$toid}");
+		};
+	}
+	elsif ($request_info->getMode() == MODE_GETNEXT) {
+		# return the first larger -and- available value, hence
+		# skipping over unexpected missing values.
+		#
+		foreach my $i (0 .. $#toids) {
+			if (($oids[$i] > $oid) && (defined $data{$toids[$i]})) {
+				warn "getnext: Returning $toids[$i]: $data{$toids[$i]}  
($type{$toids[$i]})\n" if $VERBOSE > 1;
+				# Note - the '"' around the value are to cheat the 64 unsigned  
conversion. Quite
+				# possiblye a net-snmp bug.
+				$request->setValue($type{$toids[$i]}, "$data{$toids[$i]}");
+				$request->setOID($oids[$i]);
+				last;
+			}
+		}
+	}
+    }
+}
Index: snmp/.index
===================================================================
--- snmp/.index	(revision 0)
+++ snmp/.index	(revision 0)
@@ -0,0 +1 @@
+MEMCACHED-DRAFT-MIB memcached.mib
Index: snmp/memcached.mib
===================================================================
--- snmp/memcached.mib	(revision 0)
+++ snmp/memcached.mib	(revision 0)
@@ -0,0 +1,283 @@
+MEMCACHED-DRAFT-MIB DEFINITIONS ::= BEGIN
+
+IMPORTS
+    OBJECT-TYPE, NOTIFICATION-TYPE, MODULE-IDENTITY,
+    Integer32, Opaque, enterprises, Counter32, TimeTicks, Gauge32,  
Counter64
+        FROM SNMPv2-SMI
+
+    TEXTUAL-CONVENTION, DisplayString, TruthValue
+        FROM SNMPv2-TC
+
+    MODULE-COMPLIANCE, OBJECT-GROUP
+        FROM SNMPv2-CONF;
+
+memcached MODULE-IDENTITY
+    LAST-UPDATED "200601050000Z"
+    ORGANIZATION "Memcached developers"
+    CONTACT-INFO
+        "http://www.danga.com/memcached/"
+    DESCRIPTION
+        "Few mib object for monitoring memcached. See
+
+                http://code.sixapart.com/svn/memcached/trunk/server/doc/protocol.txt
+
+        for authoritative details. "
+    ::= { enterprises 999999 }
+
+memcachedMIBObjects OBJECT IDENTIFIER ::= { memcached 1 }
+memcachedConformance  OBJECT IDENTIFIER ::= { memcached 2 }
+
+-- The statistics is grouped into chunks - as to allow easy
+-- walking (e.g. just get the counters) from the command line.
+
+runInfo         OBJECT IDENTIFIER ::= { memcachedMIBObjects 1 }
+loadInfo        OBJECT IDENTIFIER ::= { memcachedMIBObjects 2 }
+threadsInfo     OBJECT IDENTIFIER ::= { memcachedMIBObjects 3 }
+structCounts    OBJECT IDENTIFIER ::= { memcachedMIBObjects 4 }
+itemCounts      OBJECT IDENTIFIER ::= { memcachedMIBObjects 5 }
+connCounts      OBJECT IDENTIFIER ::= { memcachedMIBObjects 7 }
+cacheCounts     OBJECT IDENTIFIER ::= { memcachedMIBObjects 8 }
+cmdCounts       OBJECT IDENTIFIER ::= { memcachedMIBObjects 9 }
+-- keep both a bytes and megabytes as some versions of mrtg, perl
+-- and net-snmp cannot cope with a 64 bit counter.
+byteCounts      OBJECT IDENTIFIER ::= { memcachedMIBObjects 10 }
+megaByteCounts  OBJECT IDENTIFIER ::= { memcachedMIBObjects 11 }
+
+uptime OBJECT-TYPE
+       SYNTAX TimeTicks
+       MAX-ACCESS read-only
+       STATUS current
+       DESCRIPTION
+              "Time that this instance of the memcached server has  
been running"
+       ::= { runInfo 1 }
+
+time OBJECT-TYPE
+       SYNTAX Integer
+       MAX-ACCESS read-only
+       STATUS current
+       DESCRIPTION
+              "Current unix time according to the memcachd server  
(seconds from the epoch, not in timeticks)"
+       ::= { runInfo 2 }
+
+version OBJECT-TYPE
+       SYNTAX DisplayString
+       MAX-ACCESS read-only
+       STATUS current
+       DESCRIPTION
+              "Version string of this memcached server"
+       ::= { runInfo 3 }
+
+pointerSize OBJECT-TYPE
+       SYNTAX Integer32
+       MAX-ACCESS read-only
+       STATUS current
+       DESCRIPTION
+              "Pointer size in bytes"
+       ::= { runInfo 4 }
+
+limitMaxBytes OBJECT-TYPE
+       SYNTAX Counter32
+       MAX-ACCESS read-only
+       STATUS current
+       DESCRIPTION
+              "Number of bytes this memcached server is allowed to  
use for storage. "
+       ::= { runInfo 5 }
+
+processIdentifier OBJECT-TYPE
+       SYNTAX DisplayString
+       MAX-ACCESS read-only
+       STATUS current
+       DESCRIPTION
+              "Process identifier (e.g. PID on unix)"
+       ::= { runInfo 6 }
+
+rusageUserCount OBJECT-TYPE
+       SYNTAX Counter32
+       MAX-ACCESS read-only
+       STATUS current
+       DESCRIPTION
+              "Accumulated user time for this process (rounded down  
to seconds)"
+       ::= { loadInfo 1 }
+
+rusageSytemCount OBJECT-TYPE
+       SYNTAX Counter32
+       MAX-ACCESS read-only
+       STATUS current
+       DESCRIPTION
+              "Accumulated system time for this process (rounded down  
to seconds)"
+       ::= { loadInfo 2 }
+
+threads OBJECT-TYPE
+       SYNTAX Gauge32
+       MAX-ACCESS read-only
+       STATUS current
+       DESCRIPTION
+              "Number of worker threads requested"
+       ::= { threadsInfo 1 }
+
+connectionStructures OBJECT-TYPE
+       SYNTAX Integer32
+       MAX-ACCESS read-only
+       STATUS current
+       DESCRIPTION
+                "Number of connection structures allocated by the  
memcached server"
+
+       ::= { structCounts 1 }
+
+totalItems OBJECT-TYPE
+       SYNTAX Gauge32
+       MAX-ACCESS read-only
+       STATUS current
+       DESCRIPTION
+              "Total number of items stored by this memcached server  
ever since it started"
+
+       ::= { itemCounts 1 }
+currItems OBJECT-TYPE
+       SYNTAX Gauge32
+       MAX-ACCESS read-only
+       STATUS current
+       DESCRIPTION
+              "Current number of items stored by the memcached server"
+       ::= { itemCounts 2 }
+
+bytes OBJECT-TYPE
+       SYNTAX Gauge32
+       MAX-ACCESS read-only
+       STATUS current
+       DESCRIPTION
+                "Current number of bytes used by this memcached  
server to store items"
+       ::= { itemCounts 3 }
+
+
+totalConnections OBJECT-TYPE
+       SYNTAX Counter32
+       MAX-ACCESS read-only
+       STATUS current
+       DESCRIPTION
+                "Total number of connections opened since the  
memcached server started running"
+       ::= { connCounts 2 }
+
+currConnections OBJECT-TYPE
+       SYNTAX Gauge32
+       MAX-ACCESS read-only
+       STATUS current
+       DESCRIPTION
+                "Number of open connections"
+       ::= { connCounts 1 }
+
+getHitsCount OBJECT-TYPE
+       SYNTAX Counter32
+       MAX-ACCESS read-only
+       STATUS current
+       DESCRIPTION
+                "Number of keys that have been requested and found  
present"
+       ::= { cacheCounts 1 }
+
+getMissesCount OBJECT-TYPE
+       SYNTAX Counter32
+       MAX-ACCESS read-only
+       STATUS current
+       DESCRIPTION
+                "Number of items that have been requested and not  
found"
+       ::= { cacheCounts 2 }
+
+evictionsCount OBJECT-TYPE
+       SYNTAX Counter32
+       MAX-ACCESS read-only
+       STATUS current
+       DESCRIPTION
+                "Number of valid items removed from cache to free  
memory for new items"
+       ::= { cacheCounts 3 }
+
+cmdGetCount OBJECT-TYPE
+       SYNTAX Counter32
+       MAX-ACCESS read-only
+       STATUS current
+       DESCRIPTION
+                "Cumulative number of retrieval requests"
+       ::= { cmdCounts 1 }
+
+cmdSetCount OBJECT-TYPE
+       SYNTAX Counter32
+       MAX-ACCESS read-only
+       STATUS current
+       DESCRIPTION
+                "Cumulative number of storage requests "
+       ::= { cmdCounts 2 }
+
+
+bytesRead OBJECT-TYPE
+       SYNTAX Counter64
+       MAX-ACCESS read-only
+       STATUS current
+       DESCRIPTION
+                "Total number of bytes read by this memcached server  
from network"
+       ::= { byteCounts 1 }
+
+bytesWritten OBJECT-TYPE
+       SYNTAX Counter64
+       MAX-ACCESS read-only
+       STATUS current
+       DESCRIPTION
+                "Total number of bytes sent by this memcached server  
to network"
+       ::= { byteCounts 2 }
+
+megaBytesRead OBJECT-TYPE
+       SYNTAX Counter32
+       MAX-ACCESS read-only
+       STATUS current
+       DESCRIPTION
+                "Total number of mega bytes read by this memcached  
server from network"
+       ::= { megaByteCounts 1 }
+
+megaBytesWritten OBJECT-TYPE
+       SYNTAX Counter32
+       MAX-ACCESS read-only
+       STATUS current
+       DESCRIPTION
+                "Total number of mega bytes sent by this memcached  
server to network"
+       ::= { megaByteCounts 2 }
+
+-- conformance information
+--
+memcachedGroups       OBJECT IDENTIFIER ::= { memcachedConformance 1 }
+memcachedCompliances  OBJECT IDENTIFIER ::= { memcachedConformance 2 }
+
+ifCompliance3 MODULE-COMPLIANCE
+    STATUS  current
+    DESCRIPTION
+            "The compliance statement for memcached simply includes  
all object groups."
+
+    MODULE
+        MANDATORY-GROUPS {
+		memcacheGeneralInformationGroup,
+		memcachedRuntimeInformationGroup,
+		memcachedStatisticsGroup
+    }
+    ::= { memcachedCompliances 1 }
+
+memcacheGeneralInformationGroup OBJECT-GROUP
+    OBJECTS { uptime, time, version, pointerSize, limitMaxBytes }
+    STATUS  current
+    DESCRIPTION
+            "A collection of objects providing information about the  
memcached installation as a whole"
+    ::= { memcachedGroups 1 }
+
+memcachedRuntimeInformationGroup OBJECT-GROUP
+    OBJECTS { rusageUserCount, rusageSytemCount, threads,  
connectionStructures,
+        totalItems, currItems, bytes, currConnections,  
totalConnections }
+    STATUS  current
+    DESCRIPTION
+            "A collection of objects providing information about this  
running memcached instance."
+    ::= { memcachedGroups 2 }
+
+memcachedStatisticsGroup OBJECT-GROUP
+    OBJECTS {
+        getHitsCount, getMissesCount, evictionsCount, cmdGetCount,   
cmdSetCount,
+        megaBytesWritten, megaBytesRead, bytesWritten, bytesRead }
+    STATUS  current
+    DESCRIPTION
+            "A collection of objects providing near real time  
statistics."
+
+    ::= { memcachedGroups 2 }
+END
+



More information about the memcached mailing list