Page 1 of 1

Check_ec2 has timed out.

Posted: Wed Oct 10, 2018 2:14 pm
by rclanton
I have spun up an AWS EC2 instance and installed Nagios XI primarily to test built-in AWS capability. I added an EC2 instance via the wizard and all the checks come back with "Check_ec2 has timed out." and the status of each service is unknown. Initially I could not run the check manually but after setting http_proxy and https_proxy env vars I can run the check manually as the nagios user but I still get this same status for the service.

Details:
Nagios XI 5.5.4
CentOS Linux release 7.5.1804 (Core)
64-bit
Installed manually using the install.sh script.
During initial configuration I could connect via http and https but I did tell it ssl only during initial config.
This is an EC2 instance and does need to use a proxy to get external. I set this in the admin section and the update check works fine.

Is there something here I am missing? We are looking at XI primarily for the built-in AWS functionality to implement this quickly and, hopefully, easily.

Thanks for any assistance!

Re: Check_ec2 has timed out.

Posted: Wed Oct 10, 2018 2:57 pm
by scottwilkerson
You are likely going to need to modify the check_ec2 command in the CCM -> Commands to something line this to get the environment variables set for nagios to use them:

Code: Select all

/usr/bin/env http_proxy="http://your.proxy" https_proxy="https://your.proxy" $USER1$/check_ec2.py $ARG1$

Re: Check_ec2 has timed out.

Posted: Wed Oct 10, 2018 4:19 pm
by rclanton
That did it, thanks for the quick reply!

Re: Check_ec2 has timed out.

Posted: Wed Oct 10, 2018 4:22 pm
by scottwilkerson
rclanton wrote:That did it, thanks for the quick reply!
Great! Locking thread