How to monitor machines with different subnets in nagios

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.
Jessuzz94
Posts: 162
Joined: Thu Jun 04, 2015 12:08 pm

How to monitor machines with different subnets in nagios

Post by Jessuzz94 »

Hi good morning, i have Nagios 4 and i am testing monitoring switches and servers, but in a local network, i mean , all devices (switches, routers, servers) has in the same network (192.168.1.0), but im going to implement the nagios server in one Site with a lot of servers and routers to monitor, my question is, how to see the other subnets to monitor the devices in my nagios server? for example all the machines in the sites are in one private network, (ex. 10.1.0.0) how to see other machines if my nagios is 10.1.10.0 and other machines are 10.1.4.0, 10.1.5.0 ....

Thanks !
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: How to monitor machines with different subnets in nagios

Post by jdalrymple »

If the networks are routable then it's a trivial task. If they're not (and I'm assuming they aren't) our distributed monitoring options are kind of as follows and documented fairly well:

1) Passive checks (Nagios needs to be routable itself)
2) Use an NRPE service as a springboard into the remote networks
3) Use a remote Nagios instance and submit passive checks, not much different than option 1
4) Put a gearman worker in the remote networks
5) Use a Fusion server to aggregate the results of multiple distributed Nagios instances

This is the document we published for performing this task with our commercial product:
https://assets.nagios.com/downloads/gen ... utions.pdf

At the end of the day there is no 1 solution, and realistically the problem is a matter of layer 3 and 4 transport moreso than an upper layer software problem. How you choose to solve those problems is kind of up to you, but the list above helps to simplify.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: How to monitor machines with different subnets in nagios

Post by ssax »

In addition to jdalrymple's answer, if your asking about basic routing, your router/switch/firewall would usually grant the ability to access different subnets, you basically need a route.

Nothing needs to be done on the XI server, you could technically add another network card that is on the subnet and handle it that way but really the above solution is how most organizations handle it.
Jessuzz94
Posts: 162
Joined: Thu Jun 04, 2015 12:08 pm

Re: How to monitor machines with different subnets in nagios

Post by Jessuzz94 »

Oh okay, so, if the networks isn´t routable, the best solution is to use passive checks?, or what solution is more efficent for you. Thanks!
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: How to monitor machines with different subnets in nagios

Post by abrist »

If nagios cannot route to the subnet, but the subnet can route to the nagios server, passive checks are your *only* option.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Jessuzz94
Posts: 162
Joined: Thu Jun 04, 2015 12:08 pm

Re: How to monitor machines with different subnets in nagios

Post by Jessuzz94 »

And if nagios cannot route, or ping to the subnet and cannot route or ping the subnet to the nagios, what can i do?
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: How to monitor machines with different subnets in nagios

Post by tmcdonald »

Is there an intermediary host that can talk to both networks? You could proxy in the traditional sense, or use something like NRPE which fulfills roughly the same purpose.
Former Nagios employee
Jessuzz94
Posts: 162
Joined: Thu Jun 04, 2015 12:08 pm

Re: How to monitor machines with different subnets in nagios

Post by Jessuzz94 »

how proxy in traditional sense?,

The test i am doing is that i have one switch, one ubuntu server client and other ubuntu server with the nagios,they are connected to the switch. In the ubuntu server client i putted the address 192.168.2.10, and my ubuntu nagios server has the 192.168.1.10, how i can ping it or see the ubuntu server client?, with passive checks?, for example configuring NSCA?
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: How to monitor machines with different subnets in nagios

Post by ssax »

Are you really just looking to establish network connectivity between the two? If so, you need to setup a route on your switch so that one subnet can talk with the other subnet.

It doesn't really sound like you are looking to proxy, you just want them to be able to communicate, right? Passive checks will not fix the problem if your client cannot communicate with the XI server on the network.

Passive checks mean Client to XI Server.
Active checks mean XI Server to Client.

But if there is no route for either of the servers to communicate with eachother and/or no other server that can access both to use as a proxy, then it won't work until you establish network communication.
Jessuzz94
Posts: 162
Joined: Thu Jun 04, 2015 12:08 pm

Re: How to monitor machines with different subnets in nagios

Post by Jessuzz94 »

Then, if in the Site all servers and routers are connected to switches and have a route protocol and they can ping to my nagios server, i will need pasive checks?

If nagios can ping the devices too, the monitoring config will be easy not?
Locked