Service correlation

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
_demo_
Posts: 3
Joined: Mon Dec 16, 2013 5:21 am

Service correlation

Post by _demo_ »

Hi

I'm looking for a simple solution to check the availability of my network connection.
What I am trying to do is something like check_http google.com
if google.com is reachable => network connection ok
if google.com is not reachable => network connection down

The Problem is that sometimes google.com itself is down :-(

My solution would be to check
if google.com and yahoo.com (two websites) are not reachable => network connection down
correlation.jpg
How can I manage such kind of correlation in Nagios? I have just found http://nagios.sourceforge.net/docs/nagi ... ncies.html
but I think this is from another perspective of view.

thanks in advance
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Service correlation

Post by tmcdonald »

I think this might be what you're looking for.
Former Nagios employee
_demo_
Posts: 3
Joined: Mon Dec 16, 2013 5:21 am

Re: Service correlation

Post by _demo_ »

Hm, but parents are relationships between physical hosts??
Within hosts.cfg I can only define hosts with a required address Field.
How can I define "My Network" as a host with the Parents Google and Yahoo %-/ (confused)?

Code: Select all

define host{
        use                     basic-host
        host_name               Internet
        alias                   Internet
        address                 ?????????????????????????????
        parents                 Google,Yahoo
        notifications_enabled   1
        check_interval          5
        retry_interval          1
        max_check_attempts      2
        }

define host{
        use                     basic-host
        host_name               Google
        alias                   Google
        address                 google.com
        check_command           check-host-alive
        notifications_enabled   0
        check_interval          5
        retry_interval          1
        max_check_attempts      1
        }

define host{
        use                     basic-host
        host_name               Yahoo
        alias                   Yahoo
        address                 yahoo.com
        check_command           check-host-alive
        notifications_enabled   0
        check_interval          5
        retry_interval          1
        max_check_attempts      1
        }
This dependency topic hosts vs services is really confusing me.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Service correlation

Post by slansing »

You would create hosts for google and yahoo, then assign them as parents to your current hosts with the "parent" configuration directive mentioned in tmcdonald's post.
_demo_
Posts: 3
Joined: Mon Dec 16, 2013 5:21 am

Re: Service correlation

Post by _demo_ »

But, I want Nagios to tell me that the Internet is down (because google and yahoo are unreachable)

I do not want Nagios to tells me that Host XY ist down because the Internet is down.

Hence I still think, that parent/child solution is not what I am searching for :-(
Better would be a service on the Nagios Host that probes via something like check_http

Code: Select all

define service{
        service_description     www1
        use                     active_service 
        host_name               www.google.com
        check_command           check_http!/!2!5
        notifications_enabled  0
        }
define service{
        service_description     www2
        use                     active_service 
        host_name               www.yahoo.com
        check_command           check_http!/!2!5
        notifications_enabled   0
        }
But then I have do correlate this checks and I don't konw how to do this with Nagios :?: :oops:
like
if www1 and www2 down then www critical
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Service correlation

Post by lmiltchev »

You can probably use the BPI - in can be used not only in Nagios XI but also in Nagios Core...

http://assets.nagios.com/downloads/nagi ... _Addon.pdf

You can create a BPI group "Internet" with two members - google and yahoo. If both members are down, then the Internet is down...
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked