Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
80 lines (61 sloc) 2.44 KB


Various nagios checks that we use at Wanelo.


This script will use the Joyent tool "jinf" to validate that free RAM on the zone is within specified percentage thresholds.


./check_joyent_zone_mem  [-w <warn_perc>] [-c <critical_perc>]


./check_joyent_zone_mem -w 75 -c 90 
RSS OK : 47% used (4334Mb free)|rss=47%;70;85


Peeks into the Sidekiq queue using redis-cli and validates the queue depth is within a given warning/critical range.


./check_sidekiq_queue [-h host] [-a password] ([-q queue] || [ -s retry|schedule ]) [-n namespace] [-d db] [-w warn_perc] [-c critical_perc]

Defaults: localhost, no password, default queue, no namespace, db=0, warning at 500, critical at 1000.

./check_sidekiq_queue -h -q activity -w 200 -c 1000
SIDEKIQ OK : 0 on activity|sidekiq_queue_activity=0;200;1000

By passing -q flag you will be getting a size of a regular sidekiq queue, while passing -s flag allows checking the size of retry and schedule sidekiq system queues.


Checks transaction log position on a master PostgreSQL host and a replica and warns if the replica is behind by a certain amount of data.

Usage: ./check_postgres_replication [ options ]
   -h   --host       replica host (default
   -m   --master     master fqdn or ip (required)
   -U   --user       database user (default postgres)
   -x   --units      units of measurement to display (KB or MB, default MB)
   -w   --warning    warning threshold in bytes (default 10MB)
   -c   --critical   critical threshold in bytes (default 15MB)

Note that --units is only used in the response. No math is done to translate --warning or --critical, which should be set as bytes. Thus, a 20MB warning would be set as 20971520.


Nagios check that utilizes twemproxy status page, and returns OK/SUCCESS when all backend servers in the sharded cluster are connected, or CRITICAL otherwise.

Usage: ./check_twemproxy [-h host] [-p port]

Dependencies: ruby with JSON parser installed.


check_twemproxy --host
TWEMPROXY CRITICAL : error with redis cluster [twitter_feed] problem shards: shard003,shard006
check_twemproxy --host