Page 1 of 1
Sending passive alerts from central server for multi hosts?
Posted: Fri Jul 24, 2015 10:08 am
by skynardo
I have an existing script that monitors our central backup server every 15 minutes and sends alerts for backup failures or errors. It sends an alert for each failure/host it finds when querying the last 15 minutes of activity. I need to convert this to a Nagios plugin or have it perform the same way it does today and I'm not sure how to go about this. I was thinking about using send_nrdp.pl to send multiple alerts and specifying -H hostname for the machine that had the failure. I would need to create this new service on the nodes that get backed up by this system, I guess loop through the existing systems with send_nrdp.pl to create the unconfigured objects. Is there a way to specify a template using this method? I'm not sure how to handle new systems after my initial roll out/object creation. If I don't pre-create the service then the first time an alert is sent will create an unconfigured object and we won't get that alert. Does anyone have any advice or alternative solutions/suggestions before I start down this path?
Re: Sending passive alerts from central server for multi hos
Posted: Fri Jul 24, 2015 11:54 am
by lmiltchev
If I don't pre-create the service then the first time an alert is sent will create an unconfigured object and we won't get that alert. Does anyone have any advice or alternative solutions/suggestions before I start down this path?
This is correct. You will need to configure unconfigured objects on the new machines. Is passive checks the only option for you? I suppose you can use NRPE. Set up a command on the backup server, then call it via check_nrpe from each host.
Re: Sending passive alerts from central server for multi hos
Posted: Fri Jul 24, 2015 11:58 am
by ssax
You could get around adding the systems (unless you want do it that way) by adding your backup server, writing the plugin or using an already made one (depends on where the data is coming from) and then have your backup server service check the data and alert/pull the hostname from the data during the notification. This way you would always get the alert whether they are in the system or not.
If you want them to go into unconfigured objects you could assign templates to hostgroups and/or servicegroups and select the hostgroups and/or servicegroups during the unconfigured object setup.
Re: Sending passive alerts from central server for multi hos
Posted: Fri Jul 24, 2015 2:11 pm
by skynardo
ssax wrote:You could get around adding the systems (unless you want do it that way) by adding your backup server, writing the plugin or using an already made one (depends on where the data is coming from) and then have your backup server service check the data and alert/pull the hostname from the data during the notification.
I did consider this initially, but this monitor may report multiple backup alerts for different hosts that may have different notification / handling requirements. It checks for any issues that happened in the prior 15 min. so not sure how to do this.
Re: Sending passive alerts from central server for multi hos
Posted: Mon Jul 27, 2015 9:05 am
by ssax
Ok, I would probably just use send_nrpe.pl and have your backup server send the passive results to reduce the load on the XI server, then you would just have to check or write a script that would alert if there are unconfigured objects.