npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

nagios-redis

v1.0.3

Published

Nagios plugin to monitor redis status

Downloads

14

Readme

nagios-check-redis

Simple plugin for nagios to check status or memory usage of a redis server.

Prerequisites

  • NodeJS
  • Nagios
  • NRPE (optional)

Installing

To download the latest version:

npm install -g nagios-redis

Usage

# check ping
check_redis -H localhost -p 6379 -t ping

# check memory
check_redis -H localhost -p 6379 -t memory -w 1GB -c 2GB

check_redis --help

Note on units: when memory size is needed, it is possible to specify it in the usual form of 1k 5GB 4M and so forth.

Edit your commands.cfg and add the following:

define command {
    command_name    check_redis_ping
    command_line    $USER1$/nagios-redis/check_redis.js -H $HOSTADDRESS$ -p $ARG1$ -t ping
}

define command {
    command_name    check_redis_memory
    command_line    $USER1$/nagios-redis/check_redis.js -H $HOSTADDRESS$ -p $ARG1$ -t memory -w $ARG2$ -c $ARG3$
}

Now you can monitor redis servers by adding:

define service {
    use                 	generic-service
    hostgroup_name          Redis servers
    service_description     Redis ping
    check_command           check_redis_ping!6379
}

define service {
    use                 	generic-service
    hostgroup_name          Redis servers
    service_description     Redis memory
    check_command           check_redis_memory!6379!1GB!2GB
}

Usage monitoring remote host with NRPE

Add the command to your NRPE configuration on your remote host:

command[check_redis_ping]=check_redis -t ping
command[check_redis_memory]=check_redis -t memory -w 2GB -c 3GB

Monitor the service on your Nagios host:

define service{
		use                             generic-service
		host_name                       your host
		service_description             Redis ping
		check_command                   check_nrpe!check_redis_ping
		servicegroups					redis
}

define service{
		use                             generic-service
		host_name                       your host
		service_description             Redis memory
		check_command                   check_nrpe!check_redis_memory
		servicegroups					redis
}

P.S. We could provide the arguments from Nagios to the NRPE configuration (with nrpe dont_blame_nrpe set to true) but this is quicker and easier to manage.

License

nope :)