service monitoring in dual fail over servers

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

service monitoring in dual fail over servers

Postby padu_3891 » Fri Jul 14, 2017 4:39 am

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 .
padu_3891
 
Posts: 19
Joined: Thu Sep 05, 2013 10:12 pm

Re: service monitoring in dual fail over servers

Postby bolson » Fri Jul 14, 2017 2:26 pm

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!
Brian Olson
Nagios Support Team
---
Nagios Enterprises, LLC
Email: customersupport@nagios.com
Web: https://www.nagios.com/
User avatar
bolson
 
Posts: 61
Joined: Tue Jul 11, 2017 10:34 am

Re: service monitoring in dual fail over servers

Postby tgriep » Fri Jul 14, 2017 2:28 pm

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/Plugins/Others/check_multi/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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
tgriep
Madmin
 
Posts: 5634
Joined: Thu Oct 30, 2014 9:02 am

Re: service monitoring in dual fail over servers

Postby padu_3891 » Thu Jul 20, 2017 8:25 am

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 .
padu_3891
 
Posts: 19
Joined: Thu Sep 05, 2013 10:12 pm

Re: service monitoring in dual fail over servers

Postby mcapra » Thu Jul 20, 2017 8:59 am

Here's the github page for check_multi in case the previous website isn't working for you:
https://github.com/flackem/check_multi
Former Nagios employee - https://github.com/mcapra/
User avatar
mcapra
 
Posts: 2561
Joined: Thu May 05, 2016 3:54 pm

Re: service monitoring in dual fail over servers

Postby Pitone_Maledetto » Thu Jul 20, 2017 10:53 am

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
"It is impossible to work in information technology without also engaging in social engineering"
Jaron Lanier
User avatar
Pitone_Maledetto
 
Posts: 38
Joined: Fri Jul 01, 2016 4:11 am

Re: service monitoring in dual fail over servers

Postby tmcdonald » Thu Jul 20, 2017 4:57 pm

Thanks for the assist, @Pitone_Maledetto!
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
tmcdonald
Support Manager
 
Posts: 8544
Joined: Mon Sep 23, 2013 8:40 am

Re: service monitoring in dual fail over servers

Postby Pitone_Maledetto » Fri Jul 21, 2017 2:32 am

@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
        }
"It is impossible to work in information technology without also engaging in social engineering"
Jaron Lanier
User avatar
Pitone_Maledetto
 
Posts: 38
Joined: Fri Jul 01, 2016 4:11 am

Re: service monitoring in dual fail over servers

Postby tacolover101 » Fri Jul 21, 2017 9:29 am

as another side note, why not assign a VIP between your active / passive services and then monitor the VIP?
User avatar
tacolover101
 
Posts: 148
Joined: Mon Apr 10, 2017 11:55 am

Re: service monitoring in dual fail over servers

Postby dwhitfield » Fri Jul 21, 2017 11:56 am

@padu_3891, did you have any other questions or are we ready to lock this up?
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
dwhitfield
The Doctor
 
Posts: 3239
Joined: Wed Sep 21, 2016 10:29 am
Location: Nagios Enterprises, LLC

Next

Return to Nagios Core

Who is online

Users browsing this forum: Bing [Bot], Nagios_Admin_M and 27 guests