2015年9月15日火曜日

Nagios plugin for Amazon SQS

https://github.com/takeshiyako2/nagios-check_sqs_messages

This is nagios plugin for message queue of Amazon SQS.
You can check count of message queue.

Setup
# gem install aws-sdk
# gem list | grep aws-sdk
aws-sdk (2.1.20)
aws-sdk-core (2.1.20)
aws-sdk-resources (2.1.20)
If you use aws-sdk-v1, use check_sqs_messages_aws_sdk_v1.rb

Usage
ruby check_sqs_messages.rb -c 10 -w 5 -q  -a  -s  -r 
Example
ruby check_sqs_messages.rb -c 10 -w 5 -q my-queue-name -a XXXX -s YYYY -r ap-northeast-1
OK - my-queue-name message count is 3 |message=3

See also.
http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/sqs-metricscollected.html

Titile pic form Alexandre Duret-Lutz Queue