Monitoring hosts, services and the connections on the servic

Hi,

I’m new to Nagios so if this is covered somewhere i’m sorry just give me the link :wink:

I need to monitor several linux servers, each server has several identical services running I need to monitor each separately. Easy so far!

The problem is, each service creates several “connections” that also need to be monitored. The if a connection doesn’t start / does down then Nagios needs to email everyone and say so (the same as if the service or host goes down).

And ideally I would like a 3 tier display in the web interface:

Host1 Up/Ok
Service1 Up/Ok

     Connection1    Disconnected
     Connection2    Up/Ok
     Connection3    Disconnected

Service2 Down

     Connection1    Disconnected
     Connection2    Disconnected
  • Service3 Up/Ok*

     Connection1    Up/Ok
     Connection2    Up/Ok
     Connection3    Up/Ok
    

Host2 Up/Ok

Anyone have any suggestions on how to do this?

Thank you in advance!

Hi,

what I would do, in short:
define host1
define host2

then:
define service{
use generic-service
host_name host1, host2 …
service_description service_name
check_command your_check_command
}

and then, for each connection, you define a new service
define service{
use generic-service
host_name host1
service_description Connection1
check_command your_check_command
}

But, depending on the number of host/connections, what I usually do is:
enter everything in a database
create a script that reads the database
create a script that create the cfg file for all the data :slight_smile:
create a script that backup the old file, takes the new file, puts it in place and restart nagios

that’s quite an effort to do that, but then … it’s so easy to maintain :wink: (well, if your tests change from time to time anyway)

We have 20+ connections per service and about 10 - 20 services per host. All of which are configured by database, so you had better believe I’ll be making something to generate the cfg files. :slight_smile:

What you said was kinda what I thought but the only thing i’m not sure on is relating the connection to the service… If a connection goes down we need to know the service it’s on as well as the host.

I then thought how will it function with several Connection1’s on the same server or will I have to do something like Service1_Connection1?

On a side, we have quite a few connections that can go up/down regularly, (no alerts needed just visibility) so a web interface that is configurable is quite important too. How can do you configure the web interface?

well; why not ? :slight_smile: that’s what we did for the alteons.

not sure I understood the question, as the web interface comes with nagios; and the “how to” comes in the docs :slight_smile: