Page 1 of 1

AWS Cloudwatch monitoring

Posted: Mon Sep 23, 2019 10:19 am
by vlachopoulosd
After inheriting an AWS infrastructure, I must put it into XI.

An account has been created and granted access for monitoring through cloudwatch (and only this access). What is the recommended path to begin monitoring?

I already tried through the AWS wizard for EC2, but can't get "available instances".

I tried with Check_AWS_CloudWatch_metrics from Nagios Exchange, but I can't get past the error described in :

https://support.nagios.com/forum/viewto ... =6&t=43791
and
https://support.nagios.com/forum/viewto ... =6&t=51249

that is when I run:
# ruby encrypt_credentials.rb
I get:
encrypt_credentials.rb:86: warning: constant OpenSSL::Cipher::Cipher is deprecated
Error occured while encrypting AWS credentials: key must be 16 bytes

It seems that both of the guys in the above threads found the solution, but didn't share... :x I have been fighting for this for a whole day, but can't find a solution. Monitoring AWS Cloudwatch shouldn't be that hard, especially when there are wizards in XI "advertising" this functionality...

Please Help!

Re: AWS Cloudwatch monitoring

Posted: Mon Sep 23, 2019 10:58 am
by mbellerue

Code: Select all

It seems that both of the guys in the above threads found the solution, but didn't share... :x
Obligatory XKCD reference. https://xkcd.com/979/

Yes, unfortunately sometimes applications on the Exchange become out of date. But to address the issue with encrypt_credentials.rb, the issue is on line 86. It's specifying a depricated cipher, bf-cbc. If you specify a newer cipher, say aes-192-cbc, it should work. That's my off-the-cuff assessment of the file, though, so without testing I can't know for sure. There may also be some restriction as to what ciphers work with Amazon, and/or in that plugin. Maybe bf-cbc is referenced in the other scripts/config files, in which case it would need to be changed there, too.

We can also troubleshoot the EC2 wizard, because that should be pretty straight forward. Were you following this document for running the EC2 wizard?
https://assets.nagios.com/downloads/nag ... -Cloud.pdf