Use CHECK_TCP to monitor memcached and Redis instances

Source: Internet
Author: User

In the intranet Environment monitoring external network ECS in the Intranet service port, tried several methods are unsuccessful, and finally consider using CHECK_TCP to monitor, output command information, monitoring results very detailed, great! Share to everyone, hope to help you.

First, check_tcp monitoring memcached

By entering stats to get the parameters, enter quit to quit
So you can use CHECK_TCP to get memcached response time, uptime and other information, the specific command format is as follows:

/usr/local/nagios/libexec/check_tcp-h 192.168.2.11-p 11211-t 5-e-S ' stats\r\nquit\r\n '-e ' uptime '-M crit

The following is the output of the command: Oh, enough detail. It is more important to have the appropriate time, and you can also telnet or tcrmgr inform (Remote Administration tool,tcrmgr inform-port 11209-st 192.168.2.9) results are filtered to get the desired parameters set their own thresholds for more detailed monitoring

Tcp ok - 0.000 second response time on port 11211 [stat  pid 17689STAT uptime 365034STAT time 1432451978STAT version  1.4.15stat libevent 1.4.13-stablestat pointer_size 64stat rusage_user  7.746822stat rusage_system 4.885257stat curr_connections 5stat total_connections  20STAT connection_structures 6STAT reserved_fds 20STAT cmd_get 0STAT  Cmd_set 0stat cmd_flush 0stat cmd_touch 0stat get_hits 0stat get_ misses 0stat delete_misses 0stat delete_hits 0stat incr_misses 0stat  Incr_hits 0stat decr_misses 0stat decr_hits 0stat cas_misses 0stat cas _hits 0stat cas_badval 0stat touch_hits 0stat touch_misses 0stat auth_ Cmds 0stat auth_errors 0stat bytes_read 89stat bytes_written 4140stat limit_maxbytes 2621440000stat  accepting_conns 1stat listen_disabled_num 0stat threads 4stat conn_yields  0stat hash_power_level 16stat hash_bytes 524288stat hash_is_expanding 0stat  bytes 0STAT curr_items 0STAT total_items 0STAT expired_unfetched  0stat evicted_unfetched 0stat evictions 0stat reclaimed]|time=0.000413s;;;0. 000000;5.000000

Add to Nrpe.cfg inside

Command[check_memcached_11211]=/usr/local/nagios/libexec/check_tcp-h 192.168.2.11-p 11211-t 5-e-S ' stats\r\nquit\r \ n '-e ' uptime '-M crit

Second, check_tcp monitoring Redis

Redis does not support stats need to change to Info command format as above

/usr/local/nagios/libexec/check_tcp-h 192.168.2.11-p 6379-t 5-e-S ' info\r\nquit\r\n ' -e ' Uptim E ' -M crit

This article is from the "Huangyi blog" blog, please be sure to keep this source http://linuxpython.blog.51cto.com/10015972/1654694

Use CHECK_TCP to monitor memcached and Redis instances

Related Article

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.