Toru Yamaguchi > Nagios-Plugins-Memcached-0.02 > Nagios::Plugins::Memcached

Download:
Nagios-Plugins-Memcached-0.02.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  6
View/Report Bugs
Module Version: 0.02   Source  

NAME ^

Nagios::Plugins::Memcached - Nagios plugin to observe memcached.

VERSION ^

version 0.02

SYNOPSIS ^

  use Nagios::Plugins::Memcached;

  my $np = Nagios::Plugins::Memcached->new;
  $np->run;

DESCRIPTION ^

Please setup your nagios config.

  ### check response time(msec) for memcached
  define command {
    command_name    check_memcached_response
    command_line    /usr/bin/check_memcached -H $HOSTADDRESS$ -w 3 -c 5
  }

  ### check cache size ratio(bytes/limit_maxbytes[%]) for memcached
  define command {
    command_name    check_memcached_size
    command_line    /usr/bin/check_memcached -H $HOSTADDRESS$ --size-warning 60 --size-critical 80
  }

  ### check cache hit ratio(get_hits/cmd_get[%]) for memcached
  define command {
    command_name    check_memcached_hit
    command_line    /usr/bin/check_memcached -H $HOSTADDRESS$ --hit-warning 40 --size-critical 20
  }

This plugin can execute with all threshold options together.

Command Line Options

Usage for check_memcached command.

  Usage: check_memcached [-H host] [-w warnings] [-c critical] [--size-warnng size-warnng] [--size-critical size-critical] [--hit-warning hit-warning] [--hit-critical hit-critical] [-t timeout] [-v] [-h] [-?] [-V] [--extra-opts section@config_file]
  
   -?, --usage
     Print usage information
   -h, --help
     Print detailed help screen
   -V, --version
     Print version information
   --extra-opts=[<section>[@<config_file>]]
     Section and/or config_file from which to load extra options (may repeat)
   -H, --hosts=ADDRESS[:PORT] or HOSTNAME[:PORT] or UNIX_SOCKET
      Available multiple value. default is localhost:11211
   -w, --warnings=INTEGER
     Time threshold on warning. This unit of the value is msec.
   -c, --critical=INTEGER
     Time threshold on critical. This unit of the value is msec.
   --size-warning=INTEGER
     Size threshold on warning. This unit of the value is percent.
   --size-critical=INTEGER
     Size threshold on critical. This unit of the value is percent.
   --hit-warning=INTEGER
     Hit threshold on warning. This unit of the value is percent.
   --hit-critical=INTEGER
     Hit threshold on critical. This unit of the value is percent.
   -t, --timeout=INTEGER
     Seconds before plugin times out (default: 15)
   -v, --verbose
     Show details for command-line debugging (can repeat up to 3 times)

PROPERTIES ^

$TIMEOUT(=4)

Default value of connection timeout(sec) between the memcached server.

METHODS ^

new()

create instance.

setup()

setup this plugin.

setup_args()

setup arguments.

run()

run checks.

check_time($cache, $stats, $args)

check execute times of stats.

check_size($cache, $stats, $args)

check using bytes ratio.

check_hit($cache, $stats, $args)

check cache hit ratio.

detect_runmodes

Detecting runmode.

normalize_host

Add default port(11211) if not exists specified port.

AUTHOR ^

Toru Yamaguchi, <zigorou@cpan.org>

BUGS ^

Please report any bugs or feature requests to bug-nagios-plugins-memcached@rt.cpan.org, or through the web interface at http://rt.cpan.org. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

COPYRIGHT & LICENSE ^

Copyright 2007 Toru Yamaguchi, All Rights Reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: