12 if ($arg && $arg eq "config") {
13 print "graph_title Munin rrdcached statistics\n";
14 print "graph_category munin\n";
15 print "QueueLength.label Queue length\n";
16 print "UpdatesReceived.label UpdatesReceived\n";
17 print "UpdatesReceived.type DERIVE\n";
18 print "FlushesReceived.label FlushesReceived\n";
19 print "FlushesReceived.type DERIVE\n";
20 print "UpdatesWritten.label UpdatesWritten\n";
21 print "UpdatesWritten.type DERIVE\n";
22 print "DataSetsWritten.label DataSetsWritten\n";
23 print "DataSetsWritten.type DERIVE\n";
24 print "TreeNodesNumber.label TreeNodesNumber\n";
25 print "TreeDepth.label TreeDepth\n";
26 print "JournalBytes.label JournalBytes\n";
27 print "JournalBytes.type DERIVE\n";
28 print "JournalRotate.label JournalRotate\n";
29 print "JournalRotate.type DERIVE\n";
33 my $sock = new IO::Socket::UNIX(
35 Peer => "/var/run/rrdcached.sock",
36 ) or die "Cannot open socket : $!";
38 print $sock "STATS\n";
43 print map { s/: /.value /; $_; } <$sock>;