cloudwatch monitoring error

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
abhi321jay
Posts: 69
Joined: Mon May 01, 2017 1:23 am

cloudwatch monitoring error

Post by abhi321jay »

hi,

i"m trying to monitor AWS account with following these steps,

https://www.youtube.com/watch?v=q1UMFfi2FM0&t=555s

while following it i"m giving my AWS access key credential with this command

] # ruby encrypt_credentials.rb
I"m getting below error please help.

encrypt_credentials.rb:86: warning: constant OpenSSL::Cipher::Cipher is deprecated
Error occured while encrypting AWS credentials: key must be 16 bytes
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: cloudwatch monitoring error

Post by mcapra »

Can you share the full output of the following commands executed from the CLI of your Nagios XI machine:

Code: Select all

ssh-keygen -f /etc/cloutomate/cloutomate.pem
ls -al /etc/cloutomate/
As well as the execution of the Ruby script with sensitive credentials sanitized.
Former Nagios employee
https://www.mcapra.com/
abhi321jay
Posts: 69
Joined: Mon May 01, 2017 1:23 am

Re: cloudwatch monitoring error

Post by abhi321jay »

Please find.


[root@nagiosxi@prog cloutomate]# ls -al /etc/cloutomate
total 24
drwxr-xr-x 2 root root 4096 May 9 08:40 .
drwxr-xr-x. 123 root root 12288 May 12 04:40 ..
-rw------- 1 nagios nagios 1675 May 9 08:40 cloutomate.pem
-rw-r--r-- 1 root root 395 May 9 08:40 cloutomate.pem.pub


[root@nagiosxi@prog ~]# ssh-keygen -f /etc/cloutomate/cloutomate.pem
Generating public/private rsa key pair.
/etc/cloutomate/cloutomate.pem already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /etc/cloutomate/cloutomate.pem.
Your public key has been saved in /etc/cloutomate/cloutomate.pem.pub.
The key fingerprint is:
77:64:5d:33:a5:08:f2:99:7c:ab:e6:54:c8:16:25:6a root@[email protected]
The key's randomart image is:
+--[ RSA 2048]----+
| . o . o+|
| = * o oo|
| E * = o |
| . . * . |
| S = + |
| o + |
| + |
| + |
| . |
+-----------------+
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: cloudwatch monitoring error

Post by mcapra »

Can you also share the execution of the Ruby script with sensitive credentials sanitized? It would be helpful to see the full output.
Former Nagios employee
https://www.mcapra.com/
abhi321jay
Posts: 69
Joined: Mon May 01, 2017 1:23 am

Re: cloudwatch monitoring error

Post by abhi321jay »

Hi plz find

[root@ip-172-31-25-159 Downloads]# /usr/local/bin/ruby encrypt_credentials.rb -A AKIAJ6JRCG27BYNBQB4Q -S DUus3xrKqp8vZ/hogbRyGU/xAljpGvtU9jtKlg/+ -f ec2_credentials.cfg
encrypt_credentials.rb:86: warning: constant OpenSSL::Cipher::Cipher is deprecated
Error occured while encrypting AWS credentials: key must be 16 bytes
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: cloudwatch monitoring error

Post by dwhitfield »

There appear to be three different cloudwatch plugins on the exchange. Have you tried all of those? These deprecation warnings appear to be all over ruby girhub pages.

https://github.com/seancdugan/check_clo ... cloudwatch
and
https://github.com/level23/nagios-cloud ... udwatch.sh

both appear to be bash scripts, so should get you around the ruby issues.
abhi321jay
Posts: 69
Joined: Mon May 01, 2017 1:23 am

Re: cloudwatch monitoring error

Post by abhi321jay »

dwhitfield wrote:There appear to be three different cloudwatch plugins on the exchange. Have you tried all of those? These deprecation warnings appear to be all over ruby girhub pages.

https://github.com/seancdugan/check_clo ... cloudwatch
and
https://github.com/level23/nagios-cloud ... udwatch.sh

both appear to be bash scripts, so should get you around the ruby issues.


hii ,

i ahve tried both of your script but not being able to monitor my account,please help me with this.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: cloudwatch monitoring error

Post by dwhitfield »

We are going to need some logs or error messages to be of any use.

For clarity, we did not write these scripts. I would suggest posting an issue on their githubs:
https://github.com/seancdugan/check_cloudwatch/issues
https://github.com/level23/nagios-cloud ... ics/issues
abhi321jay
Posts: 69
Joined: Mon May 01, 2017 1:23 am

Re: cloudwatch monitoring error

Post by abhi321jay »

now its done but still not getting add in nagios XI
giving error
Permission denied @ rb_sysopen /root/Downloads/ec2_credentials.cfg
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: cloudwatch monitoring error

Post by dwhitfield »

Are you using Core or XI? That looks like a Core location to me.

Assuming this is XI, can you PM me your Profile? You can download it by going to Admin > System Config > System Profile and click the ***Download Profile*** button towards the top. If for whatever reason you *cannot* download the profile, please put the output of View System Info (5.3.4+, Show Profile if older) in the thread (that will at least get us some info). This will give us access to many of the logs we would otherwise ask for individually. If security is a concern, you can unzip the profile take out what you like, and then zip it up again. We may end up needing something you remove, but we can ask for that specifically.

After you PM the profile, please update this thread. Updating this thread is the only way for it to show back up on our dashboard.
Locked