nagios plugin for checking value in a memcached server
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
LICENSE
README.pod
check_memcached_val.pl

README.pod

NAME

check_memcached_val.pl - nagios plugin for checking value in a memcached server.

SYNOPSIS

usage: check_memcached_val.pl -H host -P port -w 0.1 -c 0.2 -t 10 -k getkey

DESCRIPTION

check_memcached_val is nagios plugin to retrieve a value from memcached server and check status

ARGUMENTS

-h, --help

Display help message

-H, --hostname=STRING

Host name or IP Address

-P, --port=INTEGER

Port number (default 11211)

-k, --key=STRING

key name to get

-s, --string=STRING

Return OK state if STRING is an exact match

-r, --ereg=REGEX

Return OK state if extended regular expression REGEX matches

-R, --eregi=REGEX

Return OK state if case-insensitive extended REGEX matches

Invert search result (CRITICAL if found)

-w, --warning=THRESHOLD

Warning threshold range

See http://nagiosplug.sourceforge.net/developer-guidelines.html#THRESHOLDFORMAT for THRESHOLD format and examples

-c, --critical=THRESHOLD

Critical threshold range

-t, --timeout=INTEGER

Seconds before connection times out.

--rate

Enable rate calculation. See 'Rate Calculation' below

--rate-multiplier=INTEGER

Converts rate per second. For example, set to 60 to convert to per minute

Rate Calculation

check_memcached_val can rate calculation like a check_snmp plugin. check_memcached_val stores previous data in a file and calculate rate per second. This is useful when combination with the memcached incr.

On the first run, there will be no prior state - this will return with OK. The state is uniquely determined by the arguments to the plugin, so changing the arguments will create a new state file

INSTALL

just copy this script to nagios's libexec directory.

$ curl https://raw.github.com/kazeburo/check_memcached_val/master/check_memcached_val.pl > check_memcached_val.pl
$ chmod +x check_memcached_val.pl
$ cp check_memcached_val.pl /path/to/nagios/libexec

AUTHOR

Masahiro Nagano <kazeburo@gmail.com>

LICENSE

Copyright (C) Masahiro Nagano

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