Hi, we need to monitor a particular service in 2 hosts.
If the service ( process check or other checks) is running in either host1 or host2 , then nagios service check should return OK status.
If the service ( process check or other checks) is NOT running on both the hosts, then the service should through a CRITICAL alert.
Is there any way to configure above requirement ?
Do we need to use clustering of service, if yes, can you please share the docs ?
I tried to create a host with common name and added 2 hosts in address field , but it throwed an Invalid hostname/address error.
hosts/ XXXX_YYY_host_check.cfg file :
define host {
host_name XXXX_YYY_host_check
use xiwizard_linuxserver_host
address host1 / host2
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
contact_groups xi_contactgroup_all
notification_interval 60
notification_period xi_timeperiod_24x7
notifications_enabled 1
icon_image redhat.png
statusmap_image redhat.png
_xiwizard sshproxy
register 1
}
Service.cfg file
define service {
host_name XXXX_YYY_host_check
service_description Process - XXX_YYY
use generic-service
check_command check_xi_by_ssh! -C "/usr/local/nagios/libexec/check_services -p abc" -l test -q!!!!!!!
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 10
notification_period xi_timeperiod_24x7
notifications_enabled 1
contact_groups xi_contactgroup_all
_xiwizard sshproxy
register 1
}
1 Service check to monitor in 2 hosts
-
gsl_ops_practice
- Posts: 151
- Joined: Thu Apr 09, 2015 9:14 pm
1 Service check to monitor in 2 hosts
Last edited by dwhitfield on Tue Oct 18, 2016 4:04 pm, edited 1 time in total.
Reason: marking with green check mark
Reason: marking with green check mark
Re: 1 Service check to monitor in 2 hosts
There is a built in tool in XI called 'BPI" - using this, you can group together as many hosts / services as you like and configure a threshold for the group. Refer to this doc:
https://assets.nagios.com/downloads/nag ... BPI_v2.pdf
https://assets.nagios.com/downloads/nag ... BPI_v2.pdf
Be sure to check out the Knowledgebase for helpful articles and solutions!
-
gsl_ops_practice
- Posts: 151
- Joined: Thu Apr 09, 2015 9:14 pm
Re: 1 Service check to monitor in 2 hosts
Thank you, we are looking into the BPI tool now to see how get it to do what we need.
One issue we ran into - the SNMP Trap sender. Even if the notifications for a service are disabled, an SNMP trap still gets sent out into the global monitoring view tool. The only way to prevent this from happening is to have the original service in Scheduled Downtime mode, which is not really a viable long-term solution.
With BPI, we will see the correct status in NagiosXI, but how would we go about not sending SNMP traps for all the events that make up the final BPI group status?
Thanks.
One issue we ran into - the SNMP Trap sender. Even if the notifications for a service are disabled, an SNMP trap still gets sent out into the global monitoring view tool. The only way to prevent this from happening is to have the original service in Scheduled Downtime mode, which is not really a viable long-term solution.
With BPI, we will see the correct status in NagiosXI, but how would we go about not sending SNMP traps for all the events that make up the final BPI group status?
Thanks.
Re: 1 Service check to monitor in 2 hosts
You may be able to do it by passing in if the host/service has notifications disabled, would that work for you? It would require a little modification to the snmptrapsender component and the command but should be doable.
-
gsl_ops_practice
- Posts: 151
- Joined: Thu Apr 09, 2015 9:14 pm
Re: 1 Service check to monitor in 2 hosts
Thanks for that.
Can you please advise how we may be able to modify the snmp trap sender component? In the Admin page there are no configurable options except sending events during downtime.
Can you please advise how we may be able to modify the snmp trap sender component? In the Admin page there are no configurable options except sending events during downtime.
-
gsl_ops_practice
- Posts: 151
- Joined: Thu Apr 09, 2015 9:14 pm
Re: 1 Service check to monitor in 2 hosts
I have now successfully set up the BPI to show green if one of the two hosts has the correct processes running. Your help in disabling notifications in the SNMP Trap sender for the components of the BPI checks will be very much appreciated.
-
avandemore
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: 1 Service check to monitor in 2 hosts
Does this document answer your questions? Using Nagios BPI
Previous Nagios employee
-
gsl_ops_practice
- Posts: 151
- Joined: Thu Apr 09, 2015 9:14 pm
Re: 1 Service check to monitor in 2 hosts
This document does not address my issue at all; however, I tested and came up with a working solution - set all service checks that make up the BPI group to 10 years of scheduled maintenance.
BPI doesn't seem to care if a check in scheduled maintenance or not, so I was able to get the behavior I need (not sending SNMP traps for every status change of individual checks that make up the BPI groups).
Kindly consider this issue resolved.
BPI doesn't seem to care if a check in scheduled maintenance or not, so I was able to get the behavior I need (not sending SNMP traps for every status change of individual checks that make up the BPI groups).
Kindly consider this issue resolved.
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: 1 Service check to monitor in 2 hosts
Glad to hear it is resolved. I am going to lock the thread. Please feel free to post again if you have you another issue. Thank you for using the Nagios forums!