Nagios Monitoring ASG in AWS

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
JGCG
Posts: 45
Joined: Fri Sep 29, 2017 6:31 am

Nagios Monitoring ASG in AWS

Post by JGCG »

Hi,

I've been tasked to see if it is possible for Nagios to monitor the health/services running on EC2 instances that are within an autoscaling group in AWS. (i.e. serverA is removed from the ASG, serverB takes it's place and Nagios starts monitoring the resource usage/services of this new host).

Am I right in thinking that out of the box Nagios doesn't come with the functionality to monitor an ASG and to dynamically add/remove the hosts/services when required?

No doubt it can be done with a bit of effort using the Nagios API/scripts on the AWS side to register/deregister hosts in Nagios, but if there is a simpler solution please let me know.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Nagios Monitoring ASG in AWS

Post by ssax »

Technically, you're correct, there's isn't any out of box functionality for this.

The only other way (other than using the API) would be to setup an agent with passive service checks setup on your ASG hosts so whenever the hosts start up, they immediately starts firing in passive check results into XI. Then you could enable Admin > Unconfigured Objects > Auto Configure Settings to automatically import them and apply configuration to be monitored.

You could use NCPA, NRDS, or NSClient++ for setting up the passives:

https://assets.nagios.com/downloads/ncp ... Checks.pdf
- Note that NCPA doesn't currently support NRDS centralized management yet, but will still do NRDP passive checks

NRDS does support centralized config/plugin management:

https://assets.nagios.com/downloads/nag ... h_NRDS.pdf
https://assets.nagios.com/downloads/nag ... DS-Win.pdf

Then you could setup Deadpool to clear out the no-longer-operational ones:

Code: Select all

https://assets.nagios.com/downloads/nagiosxi/docs/How-To-Use-Deadpool-In-Nagios-XI.pdf
Another option that may not work for your use case would be to setup the hostnames on the passive check definitions to be the same, so if server6 goes out of commission but the new system that comes up has server6 in the passive check definitions then they would go to the same one that's already setup in XI. That may not meed your needs for this scenario but it could in others so I'm mentioning it.

We're not familiar with AWS ASG here but if there's the ability to run commission/decommission scripts on the hosts when coming up/going down you can also call the API as you've found.

Let us know if you have any questions.
Locked