maglub / nagios-cloudwatch Goto Github PK
View Code? Open in Web Editor NEWNagios check for AWS Cloudwatch statistics/metrics
Nagios check for AWS Cloudwatch statistics/metrics
No metrics can be fetched from ALB loadbalancers. Works fine with classics but not for ALB.
If a customer need to include certain tags in the output of a listing.
I.e. tags like Team, DeploymentState, etc.
Could be included in the config.yml file
The management packs for op5 Monitor are not configured to prompt for the custom variables (
This results in a host wizard that does not ask for these IDs and therefore failing checks.
The thresholds for the following service checks need to be set to 0, not 1 (they will never be triggered as the arguments are using soft threshold config, AGR+)
A customer reported that only 4 out of 6 configured and running instances were listed with:
./check_cloudwatch.rb --ec2
Showing power state for an EC2 instance, with the possibility to monitor power state of the instance.
root@monitor-test-app1:/opt/plugins/custom/nagios-cloudwatch# ./check_cloudwatch.rb --ec2 -i i-c9dd4c2d -C stage.yml --powerstate -c :1+
ERROR: - undefined method `[]' for nil:NilClass
If the plugin is used with a pair of faulty keys it does not throw a describing error message like "Invalid access or secret key", but one that looks something like this:
ERROR: Could not get cloudwatch stats: NetworkOut
./check_cloudwatch.rb:838: undefined method `[]' for nil:NilClass (NoMethodError)
Would be great to be able to use the Role of the EC2 instance you're running on in order to avoid the need for credentials to be stored anywhere. Seems pretty simple to support - I've done a very quick and dirty local hack to accomplish this.
References:
If the wrong config file is used (i.e wrong credentials to connect to collect metrics for a certain instance), it is not visible in OP5.
For example as an extra parameter
http://maglub.github.io/nagios-cloudwatch/
It appears that the versions listed on the Github pages site is not locked, causing the v2 of aws-sdk
to install. Could that get updated? The repo itself is clear on version locking this, making it a non-issue if someone reads here first.
The --powerstate outputs a different timestamp (different timezone) than the other metrics, since the script takes the timestamp from the local server, not from the AWS metrics. This since there are no timestamps delivered in the metric data.
Option 1: Check which timezone the instance resides in, and convert the time to this.
Option 2: Remove the timestamp, since the information is redundant. The info is shown in the "last checked" column in the web gui of most nagios installations.
For portability and Nagios-ness I would recommend using custom variables for the access and secret keys. This would allow the user to enter these during the host wizard and remove the need to create a config.yml file on the host system.
It could also be great for people running managed environments where every instance might not be using the same AWS API keys for monitoring.
[email protected]:/Users/malu/dev/nagios-cloudwatch $./check_cloudwatch.rb --elb --list-instances
Name: vpn-v001ec2 Id: i-91f62199 privateIp: 192.168.99.6 State: Zone: running
Name: kmg-test002ec2 Id: i-7ef62176 privateIp: 192.168.99.10 State: Zone: running
Name: win-test003ec2 Id: i-9956e691 privateIp: 192.168.99.20 State: Zone: stopped
Name: hilti-azb-v001ec2 Id: i-8e6bef86 privateIp: 10.5.2.10 State: Zone: running
Name: hilti-aza-v001ec2 Id: i-1b7bde10 privateIp: 10.5.1.10 State: Zone: running
I was unable to see any difference in execution time of the script when the --no-run-check flag was used. If I enabled debugging I could still see something like this:
Is this feature currently implemented?
A user contacted me, asking for custom metric monitoring.
Hi,
Im implementing your cloudwatch plugin for our amazon environment, and im having some issues with collecting metrics from custom metrics I have added to my instances.
For instance amazon has not added RAM usage, but this is something that I have added, and can see in cloudwatch.
If I take one of those instances, and --list-metrics from it, that metric is not available.
Have you done anything like this before with custom metrics?
Regards,
Henrik Hjelm
He added the following link in a follow up email:
http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/mon-scripts-perl.html
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.