Build precise queries to find exactly what you need
Press ESC to close
For ELB and RDS you don’t need to define the instance_id so updated code to take hostname and shorten it for the elb/rds name. You can then use $HOSTNAME$ in the Nagios service check
check_cloudwatch_status.rb! YOURPATH/nagios/plugins/check_cloudwatch_status.rb -a $HOSTNAME$ -f ec2_credentials.cfg -L RequestCount -S Sum
line 348 :-
if namespace.eql?(AWS_NAMESPACE_EC2) dimensions = “InstanceId=#{instance_id}” elsif namespace.eql?(AWS_NAMESPACE_RDS) # Strip off the name from the address instance_id, *restofvalues = address.split(‘.’) instance_id = instance_id.split(‘-‘)[0…-1].join(‘-‘) dimensions = “DBInstanceIdentifier=#{instance_id}” elsif namespace.eql?(AWS_NAMESPACE_ELB) # Strip off the name Load-Balancer-Name from the address Load-Balancer-Name-123456789.elb.amazon.com instance_id, *restofvalues = address.split(‘.’) instance_id = instance_id.split(‘-‘)[0…-1].join(‘-‘) dimensions = “LoadBalancerName=#{instance_id}” end
We’ve completely redesigned the world’s largest repository of Nagios plugins and monitoring tools. Join thousands of users sharing monitoring solutions for servers, applications, and everything in between.
Due to our redesign, all existing accounts require a password reset to access your account again.
Ready to explore 6,100+ projects and contribute to the community?
Reset Password Create Account
Happy Monitoring!