Oct 4, 2010

Zabbix's template to monitor Redis

Today, i'm going to release Zabbix's template & script to monitor Redis.
I copied the perl script from Munin's plugin and modify some parts to make it match with Zabbix. Thank you Munin's plugin developers.

Here are the files


Howto install?

  • If you running your own Redis on port 6379, you don't need to change anything. If you run Redis in another port, just simply use text editor to replace 6379 to your port number.
  • If you running multiple instances of Redis, your could just simply copy the template to your own ports. No need to modify perl script
  • Import template
  • Upload redis.pl to your Redis server at /etc/zabbix/scripts, chmod to 755
  • Make sure that you could run below command and don't get any error.

    sudo su - zabbix --shell=/bin/bash && /etc/zabbib/scripts/redis.pl 127.0.0.1 6379 role
  • Append below line to /etc/zabbix/zabbix_agentd.conf

    UserParameter=redis_stats[*],/etc/zabbix/scripts/redis.pl $1 $2 $3 
  • Restart zabbix-agentd service
  • Check your latest data at Zabbix server via web interface

Good luck.

Oct 1, 2010

Zabbix's template to monitor Memcached

Today's topic is about monitoring Memcached instance. There are several ways/tools to monitor Memcached such as Munin, Nagios and Zabbix. I used to work with several monitoring tools but the most effective & my favorite one is Zabbix. I will discuss my impression about Zabbix later.

How to monitor Memcached's instance by using Zabbix
  1. Import Memcached's template from this link to your Zabbix server
  2. Modify /etc/zabbix/zabbix_agentd.conf and add the following UserParameter (on the Memcached server)
    UserParameter=memcached_stats[*],echo -e "stats\nquit" | nc 127.0.0.1 $1 | grep "STAT $2 " | awk '{print $$3}'
  3. Restart Zabbix agentd service
  4. Link Mecached template to Memcached server
  5. Check the latest data (Application: memcached)
What are inside this template
  • 38 Items (default type is Zabbix Agent Active)
  • 1 trigger
  • 4 graphs
Note
  • This template tries to monitor Memcached instance that running on port 11211
  • If your Memcached instance is running in different port, you could simply replace 11211 with your port number before importing this template
  • If you run more than one Memcached instances, you could simply copy this and modify port number.