Amazon Web Services (AWS) Monitoring With Nagios

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
kiranadiraju

Amazon Web Services (AWS) Monitoring With Nagios

Post by kiranadiraju »

I'm exploring Check_AWS_EC2_instance_status plugin. I'm trying to run the following command to encrypt AWS credentials,

"ruby encrypt_credentials.rb -A XXXXXXXXXXXXXXXXXXXX -S XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -f ec2_credentials.cfg . I am getting the following error",

Error:- ** Encrypting AWS Credentials: access_key_id: ********************, secret_access_key: ****************************************
Error occured while encrypting AWS credentials: uninitialized constant Digest

Refer link: https://exchange.nagios.org/directory/P ... us/details.
Please help me to resolve the error.
User avatar
tacolover101
Posts: 432
Joined: Mon Apr 10, 2017 11:55 am

Re: Amazon Web Services (AWS) Monitoring With Nagios

Post by tacolover101 »

you probably want to contact the author of the plugin because these guys at Nagios didn't write it. it would see if you can debug it further with a verbose option.

it also looks rather old, there might be a better working one that could be found here - https://exchange.nagios.org/index.php?o ... chword=aws
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Amazon Web Services (AWS) Monitoring With Nagios

Post by mcapra »

Thanks @tacolover101!

I would suggest trying other AWS plugins. My ruby is a bit too rusty to say why the encryption is failing. It looks like your Ruby environment is missing the Digest module, though. I would start there.

See if this one works for your environment:
https://exchange.nagios.org/directory/P ... hp/details
Former Nagios employee
https://www.mcapra.com/
kiranadiraju

Re: Amazon Web Services (AWS) Monitoring With Nagios

Post by kiranadiraju »

Thanks @tacolover101

I will follow as per your suggestion. I hope my issue will be resolved as early as possible. It seems as per the plugins in ruby some dependencies are missing, so now I'll try in PHP.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Amazon Web Services (AWS) Monitoring With Nagios

Post by mcapra »

Let us know if you encounter problems with the PHP based plugin!
Former Nagios employee
https://www.mcapra.com/
kiranadiraju

Re: Amazon Web Services (AWS) Monitoring With Nagios

Post by kiranadiraju »

mcapra wrote:Let us know if you encounter problems with the PHP based plugin!
Hello mcapra

How are you doing? Last time I was followed your inputs towards PHP based plugin for solving my issues/queries regarding AWS monitoring with Nagios XI. Still I'm getting errors in Nagios XI UI. As I was installed ec2 php based plugin directly through Nagios XI UI, after that plugin service configuration required right? at there I'm getting the same errors. So please guide me for proceeding further.

I have done the process like -> Admin- Manage Plugins- Uploaded PHP based plugin - Configure - commands - loaded with command line - services - service management config. And also I'm attaching you the screnshot which I have got error even when using ruby process also the same I'm getting now too.

Here I'm attaching you screenshots. Plz have a look.
You do not have the required permissions to view the files attached to this post.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Amazon Web Services (AWS) Monitoring With Nagios

Post by mcapra »

It looks like your service definition is missing a host. Services cannot exist without a relationship with a host. Try assigning this service to your AWS host via the Core Config Manager.

Judging by your XI appearance, it might look something like this:
2017_04_17_14_11_00_Nagios_XI_Nagios_Core_Config_Manager.png
You do not have the required permissions to view the files attached to this post.
Former Nagios employee
https://www.mcapra.com/
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Amazon Web Services (AWS) Monitoring With Nagios

Post by tgriep »

In addition of what @mcapra says to do, the check_ec2_instance plugin needs the AWS SDK for PHP installed on the XI server to function.
The link below are the instructions for downloading and installing the AWS SDK.
http://aws.amazon.com/sdkforphp/
Also, the plugin Requires SDK installed somewhere in the include path (/usr/share/php) and requires authentication keys to be set in SDK.
It expects to receive the instance id passed on the command line.
The above was from the exchange site
https://exchange.nagios.org/directory/P ... hp/details
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked