Nagios monitoring Memcached

Source: Internet
Author: User
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:

  1. #Cd/Usr/local/src/tarbag
  2. # Wget http://search.cpan.org/CPAN/authors/id/Z/ZI/ZIGOROU/Nagios-Plugins-Memcached-0.02.tar.gz
  3. # Tar xzvf Nagios-Plugins-Memcached-0.02.tar.gz-C ../software
  4. # Cd ../software/Nagios-Plugins-Memcached-0.02
  5. # Perl MakeFile. PL

After the command is executed, some prompts will appear for you to choose. Press ENTER

  1. # Make

At this time, some things are downloaded

  1. # 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.

  1. Ln-S/usr/bin/check_memcached/usr/local/nagios/libexec/
Modify the configuration file nagios commands. cfg. Add the following content:
  1. # Memcached
  2. ### Check responseTime(Msec) for memcached
  3. Define command {
  4. Command_name check_memcached_response
  5. Command_line/usr/local/nagios/libexec/check_memcached-H $ host address $: 12000-w $ ARG1 $-c $ ARG2 $
  6. }
  7. ### Check cache size ratio (bytes/limit_maxbytes [%]) for memcached
  8. Define command {
  9. Command_name check_memcached_size
  10. Command_line/usr/local/nagios/libexec/check_memcached-H $ HOSTADDRESS $: 12000 -- size-warning $ ARG1 $ -- size-critical $ ARG2 $
  11. }
  12. ### Check cache hit ratio (get_hits/cmd_get [%]) for memcached
  13. Define command {
  14. Command_name check_memcached_hit
  15. Command_line/usr/local/nagios/libexec/check_memcached-H $ HOSTADDRESS $: 12000 -- hit-warning $ ARG1 $ -- hit-critical $ ARG2 $
  16. }

Port 12000 is my memcached port.

Add the following to the cfg configuration file of the memcached Host:

  1. # Memcached
  2. Define service {
  3. Use local-service; Name of service template to use
  4. Host_name 10.0.0.204
  5. Service_description Memcached_response
  6. Check_command check_memcached_response! 300! 500
  7. }
  8. Define service {
  9. Use local-service; Name of service template to use
  10. Host_name 10.0.0.204

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.