1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-25 02:18:08 +00:00

Category Tree: Reduce number of categories

memcached -> memory (memcached)
This commit is contained in:
dipohl 2017-02-27 00:25:28 +01:00
parent 8d9fe5bdde
commit 78b99b8595
15 changed files with 33 additions and 33 deletions

View file

@ -11,7 +11,7 @@ if ($cmd eq 'config') {
print "graph_title Memcached bytes used\n";
print "graph_args --base 1024 -l 0\n";
print "graph_vlabel bytes\n";
print "graph_category memcached\n";
print "graph_category memory\n";
print "graph_info This graph monitors the size of the memcached cache.\n";
print "bytes.label bytes used\n";
print "bytes.info Number of bytes currently used\n";

View file

@ -40,7 +40,7 @@ if ($cmd eq 'config') {
print "graph_title Memcached bytes used for all instances\n";
print "graph_args --base 1024 -l 0\n";
print "graph_vlabel bytes\n";
print "graph_category memcached\n";
print "graph_category memory\n";
print "graph_info This graph monitors the size of the memcached cache for every instance.\n";
foreach my $instance_name (keys(%instances)) {

View file

@ -11,7 +11,7 @@ if ($cmd eq 'config') {
print "graph_title Memcached connections\n";
print "graph_args --base 1000 -l 0\n";
print "graph_vlabel connections\n";
print "graph_category memcached\n";
print "graph_category memory\n";
print "graph_info This graph monitors the connections to the memcached server.\n";
print "connections.label connections\n";
print "connections.info Number of connections to memcached\n";

View file

@ -0,0 +1,57 @@
#!/usr/bin/env perl
# ex:ts=4
use strict;
use warnings;
use Cache::Memcached;
# Based on original plugin, extended to unix socket use
# https://github.com/western, westroads@gmail.com
=head1 example config for /plugin-conf.d/munin-node
[memcached_bytes_1]
env.server 127.0.0.1:11211
env.label "first local server"
[memcached_bytes_2]
env.server /var/run/memcached/memcached.sock
env.label "second local server"
=cut
my $label = exists $ENV{'label'} ? $ENV{'label'} : '';
unless( $label ){
if( $0 =~ /memcached_ext_bytes_([\d\w]+)$/ ){
$label = $1;
}
}
my $cmd = shift || '';
if ($cmd eq 'config') {
print "graph_title Memcached bytes used on $label\n";
print "graph_args --base 1024 -l 0\n";
print "graph_vlabel bytes\n";
print "graph_category memory\n";
print "graph_info This graph monitors the size of the memcached cache.\n";
print "bytes.label bytes used\n";
print "bytes.info Number of bytes currently used\n";
print "bytes.min 0\n";
print "bytes.draw AREA\n";
print "maxbytes.label maximum available\n";
print "maxbytes.info The configured cache size\n";
print "maxbytes.min 0\n";
exit 0;
}
my $server = exists $ENV{'server'} ? $ENV{'server'} : '127.0.0.1:11211';
my $memd = new Cache::Memcached { 'servers' => [$server] };
my $memstats = $memd->stats(['misc']);
print "bytes.value " . $memstats->{hosts}->{$server}->{misc}->{bytes} . "\n";
print "maxbytes.value " .
$memstats->{hosts}->{$server}->{misc}->{limit_maxbytes} . "\n";

View file

@ -0,0 +1,53 @@
#!/usr/bin/env perl
# ex:ts=4
use strict;
use warnings;
use Cache::Memcached;
# Based on original plugin, extended to unix socket use
# https://github.com/western, westroads@gmail.com
=head1 example config for /plugin-conf.d/munin-node
[memcached_connections_1]
env.server 127.0.0.1:11211
env.label "first local server"
[memcached_connections_2]
env.server /var/run/memcached/memcached.sock
env.label "second local server"
=cut
my $label = exists $ENV{'label'} ? $ENV{'label'} : '';
unless( $label ){
if( $0 =~ /memcached_ext_connections_([\w\d]+)$/ ){
$label = $1;
}
}
my $cmd = shift || '';
if ($cmd eq 'config') {
print "graph_title Memcached connections on $label\n";
print "graph_args --base 1000 -l 0\n";
print "graph_vlabel connections\n";
print "graph_category memory\n";
print "graph_info This graph monitors the connections to the memcached server.\n";
print "connections.label connections\n";
print "connections.info Number of connections to memcached\n";
print "connections.min 0\n";
print "connections.draw AREA\n";
exit 0;
}
my $server = exists $ENV{'server'} ? $ENV{'server'} : '127.0.0.1:11211';
my $memd = new Cache::Memcached { 'servers' => [$server] };
my $memstats = $memd->stats(['misc']);
print "connections.value " .
$memstats->{hosts}->{$server}->{misc}->{curr_connections} . "\n";

View file

@ -0,0 +1,60 @@
#!/usr/bin/env perl
# ex:ts=4
use strict;
use warnings;
use Cache::Memcached;
# Based on original plugin, extended to unix socket use
# https://github.com/western, westroads@gmail.com
=head1 example config for /plugin-conf.d/munin-node
[memcached_hits_1]
env.server 127.0.0.1:11211
env.label "first local server"
[memcached_hits_2]
env.server /var/run/memcached/memcached.sock
env.label "second local server"
=cut
my $label = exists $ENV{'label'} ? $ENV{'label'} : '';
unless( $label ){
if( $0 =~ /memcached_ext_hits_([\w\d]+)$/ ){
$label = $1;
}
}
my $cmd = shift || '';
if ($cmd eq 'config') {
print "graph_title Memcached cache hits and misses on $label\n";
print "graph_args --base 1000 -l 0\n";
print "graph_vlabel requests\n";
print "graph_category memory\n";
print "graph_info This graph monitors the number of cache hits and misses.\n";
print "hits.label hits\n";
print "hits.info Number of cache hits\n";
print "hits.min 0\n";
print "hits.type DERIVE\n";
print "misses.label misses\n";
print "misses.info Number of cache misses\n";
print "misses.min 0\n";
print "misses.type DERIVE\n";
print "misses.draw AREA\n";
exit 0;
}
my $server = exists $ENV{'server'} ? $ENV{'server'} : '127.0.0.1:11211';
my $memd = new Cache::Memcached { 'servers' => [$server] };
my $memstats = $memd->stats(['misc']);
print "hits.value " . $memstats->{hosts}->{$server}->{misc}->{get_hits} . "\n";
print "misses.value " .
$memstats->{hosts}->{$server}->{misc}->{get_misses} . "\n";

View file

@ -0,0 +1,53 @@
#!/usr/bin/env perl
# ex:ts=4
use strict;
use warnings;
use Cache::Memcached;
# Based on original plugin, extended to unix socket use
# https://github.com/western, westroads@gmail.com
=head1 example config for /plugin-conf.d/munin-node
[memcached_items_1]
env.server 127.0.0.1:11211
env.label "first local server"
[memcached_items_2]
env.server /var/run/memcached/memcached.sock
env.label "second local server"
=cut
my $label = exists $ENV{'label'} ? $ENV{'label'} : '';
unless( $label ){
if( $0 =~ /memcached_ext_items_([\w\d]+)$/ ){
$label = $1;
}
}
my $cmd = shift || '';
if ($cmd eq 'config') {
print "graph_title Memcached cached items on $label\n";
print "graph_args --base 1000 -l 0\n";
print "graph_vlabel items\n";
print "graph_category memory\n";
print "graph_info This graph monitors the number of items stored by the memcached server.\n";
print "items.label items\n";
print "items.info Number of cached items\n";
print "items.min 0\n";
print "items.draw AREA\n";
exit 0;
}
my $server = exists $ENV{'server'} ? $ENV{'server'} : '127.0.0.1:11211';
my $memd = new Cache::Memcached { 'servers' => [$server] };
my $memstats = $memd->stats(['misc']);
print "items.value " .
$memstats->{hosts}->{$server}->{misc}->{curr_items} . "\n";

View file

@ -0,0 +1,59 @@
#!/usr/bin/env perl
# ex:ts=4
use strict;
use warnings;
use Cache::Memcached;
# Based on original plugin, extended to unix socket use
# https://github.com/western, westroads@gmail.com
=head1 example config for /plugin-conf.d/munin-node
[memcached_requests_1]
env.server 127.0.0.1:11211
env.label "first local server"
[memcached_requests_2]
env.server /var/run/memcached/memcached.sock
env.label "second local server"
=cut
my $label = exists $ENV{'label'} ? $ENV{'label'} : '';
unless( $label ){
if( $0 =~ /memcached_ext_requests_([\w\d]+)$/ ){
$label = $1;
}
}
my $cmd = shift || '';
if ($cmd eq 'config') {
print "graph_title Memcached requests on $label\n";
print "graph_args --base 1000 -l 0\n";
print "graph_vlabel requests\n";
print "graph_category memory\n";
print "graph_info This graph monitors the number of get and set requests.\n";
print "gets.label gets\n";
print "gets.info Number of get requests\n";
print "gets.min 0\n";
print "gets.type DERIVE\n";
print "gets.draw AREA\n";
print "sets.label sets\n";
print "sets.info Number of set requests\n";
print "sets.min 0\n";
print "sets.type DERIVE\n";
print "sets.draw STACK\n";
exit 0;
}
my $server = exists $ENV{'server'} ? $ENV{'server'} : '127.0.0.1:11211';
my $memd = new Cache::Memcached { 'servers' => [$server] };
my $memstats = $memd->stats(['misc']);
print "gets.value " . $memstats->{hosts}->{$server}->{misc}->{cmd_get} . "\n";
print "sets.value " . $memstats->{hosts}->{$server}->{misc}->{cmd_set} . "\n";

View file

@ -0,0 +1,60 @@
#!/usr/bin/env perl
# ex:ts=4
use strict;
use warnings;
use Cache::Memcached;
# Based on original plugin, extended to unix socket use
# https://github.com/western, westroads@gmail.com
=head1 example config for /plugin-conf.d/munin-node
[memcached_traffic_1]
env.server 127.0.0.1:11211
env.label "first local server"
[memcached_traffic_2]
env.server /var/run/memcached/memcached.sock
env.label "second local server"
=cut
my $label = exists $ENV{'label'} ? $ENV{'label'} : '';
unless( $label ){
if( $0 =~ /memcached_ext_traffic_([\w\d]+)$/ ){
$label = $1;
}
}
my $cmd = shift || '';
if ($cmd eq 'config') {
print "graph_title Memcached network traffic on $label\n";
print "graph_args --base 1000 -l 0\n";
print "graph_vlabel bits per \${graph_period}\n";
print "graph_category memory\n";
print "graph_info This graph monitors the network traffic of the memcached server.\n";
print "up.label bits in\n";
print "up.info Traffic received by memcached\n";
print "up.min 0\n";
print "up.cdef up,8,*\n";
print "up.type COUNTER\n";
print "up.draw AREA\n";
print "down.label bits out\n";
print "down.info Traffic sent by memcached\n";
print "down.min 0\n";
print "down.cdef down,8,*\n";
print "down.type COUNTER\n";
exit 0;
}
my $server = exists $ENV{'server'} ? $ENV{'server'} : '127.0.0.1:11211';
my $memd = new Cache::Memcached { 'servers' => [$server] };
my $memstats = $memd->stats(['misc']);
print "up.value " . $memstats->{hosts}->{$server}->{misc}->{bytes_read} . "\n";
print "down.value " . $memstats->{hosts}->{$server}->{misc}->{bytes_written} . "\n";

View file

@ -18,7 +18,7 @@ if ($cmd eq 'config') {
print "graph_title Memcached cache hits and misses -- $title\n";
print "graph_args --base 1000 -l 0\n";
print "graph_vlabel requests\n";
print "graph_category memcached\n";
print "graph_category memory\n";
print "graph_info This graph monitors the number of cache hits and misses.\n";
print "hits.label hits\n";
print "hits.info Number of cache hits\n";

View file

@ -11,7 +11,7 @@ if ($cmd eq 'config') {
print "graph_title Memcached cached items\n";
print "graph_args --base 1000 -l 0\n";
print "graph_vlabel items\n";
print "graph_category memcached\n";
print "graph_category memory\n";
print "graph_info This graph monitors the number of items stored by the memcached server.\n";
print "items.label items\n";
print "items.info Number of cached items\n";

View file

@ -183,7 +183,7 @@ $graphs{items} = {
config => {
args => '--base 1000 --lower-limit 0',
vlabel => 'Items in Memcached',
category => 'memcached',
category => 'memory',
title => 'Items',
info => 'Number of items in use by memcached',
},
@ -197,7 +197,7 @@ $graphs{memory} = {
config => {
args => '--base 1024 --lower-limit 0',
vlabel => 'Bytes Used',
category => 'memcached',
category => 'memory',
title => 'Memory Usage',
info => 'Memory consumption of memcached',
},
@ -212,7 +212,7 @@ $graphs{bytes} = {
args => '--base 1000',
vlabel => 'bits in (-) / out (+)',
title => 'Network Traffic',
category => 'memcached',
category => 'memory',
info => 'Network traffic in (-) / out (+) of the machine',
order => 'bytes_read bytes_written',
},
@ -228,7 +228,7 @@ $graphs{conns} = {
config => {
args => '--base 1000 --lower-limit 0',
vlabel => 'Connections per ${graph_period}',
category => 'memcached',
category => 'memory',
title => 'Connections',
info => 'Number of connections being handled by memcached',
order => 'max_conns curr_conns avg_conns',
@ -244,7 +244,7 @@ $graphs{commands} = {
config => {
args => '--base 1000 --lower-limit 0',
vlabel => 'Commands per ${graph_period}',
category => 'memcached',
category => 'memory',
title => 'Commands',
info => 'Number of commands being handled by memcached',
},
@ -290,7 +290,7 @@ $graphs{evictions} = {
config => {
args => '--base 1000 --lower-limit 0',
vlabel => 'Evictions per ${graph_period}',
category => 'memcached',
category => 'memory',
title => 'Evictions',
info => 'Number of evictions per second',
},
@ -308,7 +308,7 @@ $graphs{unfetched} = {
config => {
args => '--base 1000 --lower-limit 0',
vlabel => 'Unfetched Items per ${graph_period}',
category => 'memcached',
category => 'memory',
title => 'Unfetched Items',
info => 'Number of items that were never touched get/incr/append/etc before X occurred',
},
@ -324,7 +324,7 @@ $graphs{slabchnks} = {
config => {
args => '--base 1000 --lower-limit 0',
vlabel => 'Available Chunks for this Slab',
category => 'memcached',
category => 'memory',
title => 'Chunk Usage for Slab: ',
info => 'This graph shows you the chunk usage for this memory slab.',
},
@ -339,7 +339,7 @@ $graphs{slabhits} = {
config => {
args => '--base 1000 --lower-limit 0',
vlabel => 'Hits per Slab per ${graph_period}',
category => 'memcached',
category => 'memory',
title => 'Hits for Slab: ',
info => 'This graph shows you the successful hit rate for this memory slab.',
},
@ -359,7 +359,7 @@ $graphs{slabevics} = {
config => {
args => '--base 1000 --lower-limit 0',
vlabel => 'Evictions per Slab per ${graph_period}',
category => 'memcached',
category => 'memory',
title => 'Evictions for Slab: ',
info => 'This graph shows you the eviction rate for this memory slab.',
},
@ -377,7 +377,7 @@ $graphs{slabevictime} = {
config => {
args => '--base 1000 --lower-limit 0',
vlabel => ' since Request for LEI',
category => 'memcached',
category => 'memory',
title => 'Eviction Request Time for Slab: ',
info => 'This graph shows you the time since we requested the last evicted item',
},
@ -391,7 +391,7 @@ $graphs{slabitems} = {
config => {
args => '--base 1000 --lower-limit 0',
vlabel => 'Items per Slab',
category => 'memcached',
category => 'memory',
title => 'Items in Slab: ',
info => 'This graph shows you the number of items and reclaimed items per slab.',
},
@ -405,7 +405,7 @@ $graphs{slabitemtime} = {
config => {
args => '--base 1000 --lower-limit 0',
vlabel => ' since item was stored',
category => 'memcached',
category => 'memory',
title => 'Age of Eldest Item in Slab: ',
info => 'This graph shows you the time of the eldest item in this slab',
},
@ -418,7 +418,7 @@ $graphs{slabunfetched} = {
config => {
args => '--base 1000 --lower-limit 0',
vlabel => 'Unfetched Items per ${graph_period}',
category => 'memcached',
category => 'memory',
title => 'Unfetched Items in Slab: ',
info => 'Number of items that were never touched get/incr/append/etc before X occurred',
},
@ -863,7 +863,7 @@ sub print_rootmulti_config {
# Lets tell munin about the graph we are referencing and print the main config
print "multigraph memcached_multi_$plugin\n";
while ( my ($key, $value) = each(%graphconf)) {
if ($key eq 'category') { $value = 'memcached' };
if ($key eq 'category') { $value = 'memory' };
print "graph_$key $value\n";
}
# Lets tell munin about our data values and how to treat them

View file

@ -18,7 +18,7 @@ if ($cmd eq 'config') {
print "graph_title Memcached requests -- $title\n";
print "graph_args --base 1000 -l 0\n";
print "graph_vlabel requests\n";
print "graph_category memcached\n";
print "graph_category memory\n";
print "graph_info This graph monitors the number of get and set requests.\n";
print "gets.label gets\n";
print "gets.info Number of get requests\n";

View file

@ -93,31 +93,31 @@ if ($cmd eq 'config') {
print "graph_title Memcached bytes used\n";
print "graph_args --base 1024 -l 0\n";
print "graph_vlabel bytes\n";
print "graph_category memcached\n";
print "graph_category memory\n";
print "graph_info This graph monitors the size of the memcached cache.\n";
} elsif ($mode eq 'hits') {
print "graph_title Memcached cache hits and misses\n";
print "graph_args --base 1000 -l 0\n";
print "graph_vlabel requests\n";
print "graph_category memcached\n";
print "graph_category memory\n";
print "graph_info This graph monitors the number of cache hits and misses.\n";
} elsif ($mode eq 'items') {
print "graph_title Memcached cached items\n";
print "graph_args --base 1000 -l 0\n";
print "graph_vlabel items\n";
print "graph_category memcached\n";
print "graph_category memory\n";
print "graph_info This graph monitors the number of items stored by the memcached server.\n";
} elsif ($mode eq 'requests') {
print "graph_title Memcached requests\n";
print "graph_args --base 1000 -l 0\n";
print "graph_vlabel requests\n";
print "graph_category memcached\n";
print "graph_category memory\n";
print "graph_info This graph monitors the number of get and set requests.\n";
} elsif ($mode eq 'traffic') {
print "graph_title Memcached network traffic\n";
print "graph_args --base 1000 -l 0\n";
print "graph_vlabel bits per \${graph_period}\n";
print "graph_category memcached\n";
print "graph_category memory\n";
print "graph_info This graph monitors the network traffic of the memcached server.\n";
}

View file

@ -11,7 +11,7 @@ if ($cmd eq 'config') {
print "graph_title Memcached network traffic\n";
print "graph_args --base 1000 -l 0\n";
print "graph_vlabel bits per \${graph_period}\n";
print "graph_category memcached\n";
print "graph_category memory\n";
print "graph_info This graph monitors the network traffic of the memcached server.\n";
print "up.label bits in\n";
print "up.info Traffic received by memcached\n";