Coder Social home page Coder Social logo

zbx_redis_template's Introduction

#zbx_redis_template

Zabbix template for Redis (node.js or python) ##System requirements

For use node.js version script

For use python version script

Install

You can monitor your redis in zabbix agent mode or through trap-messages.

In zabbix agent mode, zabbix will periodically send request to an agent for every parameter, and agent will answer it.

In trap-message mode, script will be periodically accumulate redis's parameters and will send it to zabbix as a one message.

If you planning to capture many redis parameters and do it often. I would recomend to use trap-message mode.

Note: trap-message works only with python script

Install in trap-message mode

  1. Put zbx_redis_stats.py into your monitoring scripts path (like: /etc/zabbix/script/redis/).

  2. Change next section in zbx_redis_stats.py, to your configuration:

zabbix_host = '127.0.0.1'	# Zabbix Server IP
zabbix_port = 10051			# Zabbix Server Port
hostname = 'redis.srv.name'	# Name of monitored server, like it shows in zabbix web ui
  1. In script path (/etc/zabbix/script/redis/) do:
pip install redis
chmod +x zbx_redis_stats.py
  1. Configure cron to run script every one minute with redis server params as arguments
$ sudo crontab -e

*/1 * * * * /etc/zabbix/script/redis/zbx_redis_stats.py localhost -p 6379 -a mypassword
  1. Import zbx_redis_trapper_template.xml into zabbix in Tepmplate section web gui.

That is all :)

Install in Zabbix Agent mode

  1. Put zbx_redis.conf into your zabbix_agentd.conf config subdirectory (like: /etc/zabbix/zabbix_agentd.d/).

  2. Change script name in zbx_redis.conf to use zbx_redis_stats.py if need it (by default there is a .js version script). Redis server params can be passed to the python script as arguments e.g.:

zbx_redis_stats.py localhost -p 6379 -a mypassword
  1. Change your zabbix_agentd.conf config so it will include this file:
Include=/etc/zabbix/zabbix_agentd.d/
  1. Put zbx_redis_stats.js or zbx_redis_stats.py into your zabbix_agentd.conf config subdirectory (like: /etc/zabbix/script/redis/).

  2. Change paths in zbx_redis.conf if need it.

  3. In working dir (/etc/zabbix/script/redis/) do:

For use node.js verson script:

npm install redis
chmod +x zbx_redis_stats.js

For use python verson script:

pip install redis
chmod +x zbx_redis_stats.py
  1. Import zbx_redis_template.xml into zabbix in Tepmplate section web gui.

zbx_redis_template's People

Contributors

adubkov avatar fridus avatar yackushevas avatar jumping avatar kuozo avatar i-trofimtschuk avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.