Page 1 of 2
service monitoring in dual fail over servers
Posted: Fri Jul 14, 2017 4:39 am
by padu_3891
Hello Team ,
I have situation here that i want to monitor set of services for monitoring an application in HostA or HostB . Host A and B are kind of fail over environment , i mean the application will be running at any one of the host at a time . Application will be switched to other server automatically when the currentserver is down .
Is there any idea to have both the server IP for a single host and then we can have all the services mapped to this new comman host .
Service should check the host which have the application up .
Re: service monitoring in dual fail over servers
Posted: Fri Jul 14, 2017 2:26 pm
by bolson
Hello,
Can you please provide more information, ie: what OS? What application? What mechanism for "failing over" to HostB? and what version of Nagios Core?
Thank you!
Re: service monitoring in dual fail over servers
Posted: Fri Jul 14, 2017 2:28 pm
by tgriep
You could use the plugin called check_multi and it could be configured to generate an alert when both of the services are down on both hosts if that is what you are looking for.
https://exchange.nagios.org/directory/P ... ti/details
Take a look at it and see if this is what you are looking for.
Else, you can search that site for another plugin.
Re: service monitoring in dual fail over servers
Posted: Thu Jul 20, 2017 8:25 am
by padu_3891
Sorry for delay in repond .
The above link provided explains about the chek..but the download URL is not working . i think this check is been removed .
Re: service monitoring in dual fail over servers
Posted: Thu Jul 20, 2017 8:59 am
by mcapra
Here's the github page for
check_multi in case the previous website isn't working for you:
https://github.com/flackem/check_multi
Re: service monitoring in dual fail over servers
Posted: Thu Jul 20, 2017 10:53 am
by Pitone_Maledetto
Hi,
you could use custom macros.
I have this setup so I can check the ILO and the host in the same host configuration.
host_address ip_of_server_A
_serverB_ip ip_of_server_B
You need to configure the service and commands to suite this configuration but works pretty good.
If you reckon that this is a good solution for you I could provide some configuration examples.
Regards
Sent from the mobile client - Forum Talker
Re: service monitoring in dual fail over servers
Posted: Thu Jul 20, 2017 4:57 pm
by tmcdonald
Thanks for the assist,
@Pitone_Maledetto!
Re: service monitoring in dual fail over servers
Posted: Fri Jul 21, 2017 2:32 am
by Pitone_Maledetto
@tmcdonald you are welcome
just an example of how I would roughly make it work.
Command definition
Code: Select all
# 'check_load_ssh'
define command{
command_name check_serverB_load
command_line $USER1$/check_by_ssh -H $_HOSTBADDRESS$ -l your_log_name -C "/usr/lib/nagios/plugins/check_load -w $ARG1$ -c $ARG2$"
}
Host definition
Code: Select all
define host{
use generic-host
host_name serverA
alias serverA and serverB
hostgroups your_hostgroup
address serverA_ip
_BADDRESS serverB_ip
}
Service definition
Code: Select all
# LOAD CHECK
define service {
use generic-service
name serverB_Load
service_description serverB Load
check_command check_serverB_load!7.2,5.6,4.8!8,6.4,5.6
normal_check_interval 5
notification_interval 10
notification_options w,c,r
}
Re: service monitoring in dual fail over servers
Posted: Fri Jul 21, 2017 9:29 am
by tacolover101
as another side note, why not assign a VIP between your active / passive services and then monitor the VIP?
Re: service monitoring in dual fail over servers
Posted: Fri Jul 21, 2017 11:56 am
by dwhitfield
@padu_3891, did you have any other questions or are we ready to lock this up?