Connecting to AWS EC2 Instances

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
userman73
Posts: 21
Joined: Thu Dec 19, 2019 8:28 am

Connecting to AWS EC2 Instances

Post by userman73 »

I am trying to monitor instances of EC2 on my AWS account. It says "The Access Key ID of the instance to be monitored.", but the only "Access Key ID" I know about is the Access Key to make calls to the AWS CLI.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Connecting to AWS EC2 Instances

Post by scottwilkerson »

userman73 wrote:I am trying to monitor instances of EC2 on my AWS account. It says "The Access Key ID of the instance to be monitored.", but the only "Access Key ID" I know about is the Access Key to make calls to the AWS CLI.
That is the Access Key ID it is referring to.
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
userman73
Posts: 21
Joined: Thu Dec 19, 2019 8:28 am

Re: Connecting to AWS EC2 Instances

Post by userman73 »

I fill in the information, but on the next page, I am presented with an empty table.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Connecting to AWS EC2 Instances

Post by scottwilkerson »

userman73 wrote:I fill in the information, but on the next page, I am presented with an empty table.
Before clicking next did you click the "Get Available Instances" in the blue box?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
userman73
Posts: 21
Joined: Thu Dec 19, 2019 8:28 am

Re: Connecting to AWS EC2 Instances

Post by userman73 »

Yes, and it says "There were no instances found. Verify your AWS credentials and try again."
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Connecting to AWS EC2 Instances

Post by scottwilkerson »

Hmm, are you sure you have valid access key and secret? Does this XI server have remote access to the Internet to reach AWS?

If so can you run the following from the command line and show the output (replacing ACCESSKEYID and SECRET)?

Code: Select all

/usr/local/nagios/libexec/check_ec2.py --getinstances --accesskeyid='ACCESSKEYID' --secretaccesskey='SECRET'
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
userman73
Posts: 21
Joined: Thu Dec 19, 2019 8:28 am

Re: Connecting to AWS EC2 Instances

Post by userman73 »

Capture.PNG
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Connecting to AWS EC2 Instances

Post by scottwilkerson »

Look's like:

Code: Select all

AWS was not able to validate the provided access credentials
scottwilkerson wrote:Hmm, are you sure you have valid access key and secret?
scottwilkerson wrote:Does this XI server have remote access to the Internet to reach AWS?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
userman73
Posts: 21
Joined: Thu Dec 19, 2019 8:28 am

Re: Connecting to AWS EC2 Instances

Post by userman73 »

Yes and Yes.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Connecting to AWS EC2 Instances

Post by scottwilkerson »

Are you sure these keys have the ability to call the DescribeRegions AWS API Call?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked