"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "plugins/node.d/memcached_.in" between
munin-2.0.66.tar.gz and munin-2.0.67.tar.gz

About: Munin is a tool for graphing all sorts of information about one or more servers and displaying it in a web interface (requires Perl and RRDTool).

memcached_.in  (munin-2.0.66):memcached_.in  (munin-2.0.67)
skipping to change at line 18 skipping to change at line 18
# bytes # bytes
# counters # counters
# #
# For each of them, symlink the memcached_ script to memcached_FOO where foo is # For each of them, symlink the memcached_ script to memcached_FOO where foo is
# the datset name. # the datset name.
# #
# Parameters supported: # Parameters supported:
# #
# config # config
# autoconf # autoconf
# suggest
# #
# Configurable variables # Configurable variables
# #
# host Host of the memcache daemon # host Host of the memcache daemon
# port Port of the memcache daemon # port Port of the memcache daemon
# #
# Author: Robin H. Johnson <robbat2@gentoo.org> # Author: Robin H. Johnson <robbat2@gentoo.org>
# Slightly based on the original version by Joshua Thijssen # Slightly based on the original version by Joshua Thijssen
# <jthijssen@noxlogic.nl> # <jthijssen@noxlogic.nl>
# #
# Included in trunk for 1.4 by Nicolai Langfeldt. Set family to contrib
# and disabled autoconf due to lack of "suggest".
#
# Magic markers: # Magic markers:
#%# family=contrib #%# family=contrib
#%# capabilities=noautoconf #%# capabilities=autoconf
use strict; use strict;
my $ret = undef; my $ret = undef;
if (! eval "require Cache::Memcached;") { if (! eval "require Cache::Memcached;") {
$ret = "Cache::Memcached not found"; $ret = "Cache::Memcached not found";
} }
my $HOST = exists $ENV{'host'} ? $ENV{'host'} : "127.0.0.1"; my $HOST = exists $ENV{'host'} ? $ENV{'host'} : "127.0.0.1";
my $PORT = exists $ENV{'port'} ? $ENV{'port'} : 11211; my $PORT = exists $ENV{'port'} ? $ENV{'port'} : 11211;
if ( exists $ARGV[0] and $ARGV[0] eq "autoconf" ) { if ( exists $ARGV[0] and $ARGV[0] eq "autoconf" ) {
if ($ret) { if ($ret) {
print "no ($ret)\n"; print "no ($ret)\n";
exit 0; } else {
use Net::Ping;
my $p = Net::Ping->new();
$p->port_number($PORT);
if ($p->ping($HOST, 1)) {
print "yes\n";
exit 0;
}
print "no (cannot connect to $HOST on port $PORT)\n";
} }
# Todo: we can always connect to a memcache server without any errors so I canno exit 0;
t really }
# find a way to detect the presence of a memcache instance. Maybe a forced write
/read/delete if (exists $ARGV[0] and $ARGV[0] eq "suggest") {
# but there should be a better way somewhere... print "bytes\n";
print "yes\n"; print "counters\n";
print "rates\n";
exit 0; exit 0;
} }
if($ret) { if($ret) {
print "no ($ret)\n"; # refuse to execute "config" or "fetch" due to a missing requirement
print "memcached_ plugin fails to run: $ret\n";
exit 1; exit 1;
} }
# We do everything by this array # We do everything by this array
my %all_vars = ( my %all_vars = (
rates => { rates => {
master => { master => {
graph_title => 'Memcached - Commands', graph_title => 'Memcached - Commands',
graph_args => '--base 1000', graph_args => '--base 1000',
graph_vlabel => '/${graph_period}', graph_vlabel => '/${graph_period}',
 End of changes. 6 change blocks. 
12 lines changed or deleted 20 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)