Nagios check_memcached plug-in can be installed on the memcached server, can also be installed on the Nagios server, I am directly installed on the Nagios server so convenient ..: http: search.cpan.orgCPANauthorsidZZIZIGOROUNagios-Plugins-Memcached-0.02.tar.gz this script is using perl
Check_me of NagiosMcAchEd
This plug-in can be installed on the memcached server or the Nagios server. I directly installed it on the Nagios server for convenience.
:
Http: // search.CpAn.org/CPAN/authors/Id/Z/ZI/ZIGOROU/Nagios-Plugins-Memcached-0.02.tar.gz
This script is compiled using perl, so you must first ensure that your machine has a perl environment.
Installation Method:
- #Cd/Usr/local/src/tarbag
- # Wget http://search.cpan.org/CPAN/authors/id/Z/ZI/ZIGOROU/Nagios-Plugins-Memcached-0.02.tar.gz
- # Tar xzvf Nagios-Plugins-Memcached-0.02.tar.gz-C ../software
- # Cd ../software/Nagios-Plugins-Memcached-0.02
- # Perl MakeFile. PL
After the command is executed, some prompts will appear for you to choose. Press ENTER
- # Make
At this time, some things are downloaded
- # Make install
By default, the check_memcached file is put in/usr/bin/check_memcached.
Make a soft link to the Nagios libExUnder the ec directory.
- Ln-S/usr/bin/check_memcached/usr/local/nagios/libexec/
Modify the configuration file nagios commands. cfg. Add the following content:
- # Memcached
- ### Check responseTime(Msec) for memcached
- Define command {
- Command_name check_memcached_response
- Command_line/usr/local/nagios/libexec/check_memcached-H $ host address $: 12000-w $ ARG1 $-c $ ARG2 $
- }
- ### Check cache size ratio (bytes/limit_maxbytes [%]) for memcached
- Define command {
- Command_name check_memcached_size
- Command_line/usr/local/nagios/libexec/check_memcached-H $ HOSTADDRESS $: 12000 -- size-warning $ ARG1 $ -- size-critical $ ARG2 $
- }
- ### Check cache hit ratio (get_hits/cmd_get [%]) for memcached
- Define command {
- Command_name check_memcached_hit
- Command_line/usr/local/nagios/libexec/check_memcached-H $ HOSTADDRESS $: 12000 -- hit-warning $ ARG1 $ -- hit-critical $ ARG2 $
- }
Port 12000 is my memcached port.
Add the following to the cfg configuration file of the memcached Host:
- # Memcached
- Define service {
- Use local-service; Name of service template to use
- Host_name 10.0.0.204
- Service_description Memcached_response
- Check_command check_memcached_response! 300! 500
- }
- Define service {
- Use local-service; Name of service template to use
- Host_name 10.0.0.204