How to Monitor servers in multiple Subnets?

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.
shiv
Posts: 4
Joined: Mon Sep 04, 2017 2:42 am

How to Monitor servers in multiple Subnets?

Post by shiv »

Hi Team,

I am completely new to Nagios Monitoring.. I have to implement monitoring for all my infrastructure servers which are in multiple Vlans (No Restrictions between Vlans) as below.

10.6.*.*
10.5.*.*
10.4.*.*
10.10.*.*

My Nagios server has been built in 10.6.* Vlan and I was able to monitor the servers and Switch which are in same Vlan. But I when I try to monitor a server or switch in different Vlan ( Ex: 10.5.*.*) I am not getting the Response.

Can you please suggest what configuration i have to use to implement monitoring for the servers in All the Vlans.

Note: We have Flat network where we don't have any restrictions between the Vlans (Any to Any).

Please help me to fix this.

Thanks
Shiv
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: How to Monitor servers in multiple Subnets?

Post by scottwilkerson »

It sounds like it is a networking setup issue, but lets start here.

Can you reach machines on different vlans from the nagios server with simple ping commands?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
DiegoAnjos
Posts: 49
Joined: Thu Feb 14, 2013 9:32 am

Re: How to Monitor servers in multiple Subnets?

Post by DiegoAnjos »

Maybe it is a firewall configuration that you need to setup.

I have different LANs (some throught VPN) and I can reach them with Nagios, due to firewall rules that make the redirection.

As some of them are on different subnets, they should not reach each other.
User avatar
tacolover101
Posts: 432
Joined: Mon Apr 10, 2017 11:55 am

Re: How to Monitor servers in multiple Subnets?

Post by tacolover101 »

i'm with the guys above, either a firewall, or networking issue.

for instance, we only have specific routes set to specific subnets, from x subnet.

on top of that, we also have firewall rules assigned to each subnet.

your networking team should be able to help you out, if either of those is the problem.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: How to Monitor servers in multiple Subnets?

Post by scottwilkerson »

@shiv let us know if you need further assistance
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
shiv
Posts: 4
Joined: Mon Sep 04, 2017 2:42 am

Re: How to Monitor servers in multiple Subnets?

Post by shiv »

Hi All...

As I said earlier We don't have any firewall configuration In between the Vlans. We have Flat network ( Any to Any Vlan Connection).

I can able to ping the servers from one Vlan to Another Vlan.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: How to Monitor servers in multiple Subnets?

Post by scottwilkerson »

shiv wrote:Hi All...

As I said earlier We don't have any firewall configuration In between the Vlans. We have Flat network ( Any to Any Vlan Connection).

I can able to ping the servers from one Vlan to Another Vlan.
If you can ping them from the Nagios server and there are no firewalls, then you should be able to run the commands from the command line and get a response.

Can you give an example of what isn't working? What command are you running (or expecting Nagios to run)?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
shiv
Posts: 4
Joined: Mon Sep 04, 2017 2:42 am

Re: How to Monitor servers in multiple Subnets?

Post by shiv »

scottwilkerson,

I am able to ping the machines, Switches from my nagios server but when I try to run Snmpwalk I am not getting the response.

Below is the commands which I tried to run for a windows machine 10.10.20.XX ( XX- I have replaced the actual digits after pasting the output here)

[root@NAGIOSSERVER ~]# ping 10.10.20.XX
PING 10.10.20.XX (10.10.20.XX) 56(84) bytes of data.
64 bytes from 10.10.20.XX: icmp_seq=1 ttl=127 time=0.291 ms
64 bytes from 10.10.20.XX: icmp_seq=2 ttl=127 time=0.187 ms
64 bytes from 10.10.20.XX: icmp_seq=3 ttl=127 time=0.281 ms
64 bytes from 10.10.20.XX: icmp_seq=4 ttl=127 time=0.231 ms
64 bytes from 10.10.20.XX: icmp_seq=5 ttl=127 time=0.280 ms
^C
--- 10.10.20.XX ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4222ms
rtt min/avg/max/mdev = 0.187/0.254/0.291/0.039 ms

[root@NAGIOSSERVER ~]# snmpwalk -v1 -c public 10.10.20.XX -m ALL .1
Timeout: No Response from 10.10.20.XX

[root@NAGIOSSERVER libexec]# pwd
/usr/local/nagios/libexec


[root@NAGIOSSERVER libexec]# ./check_snmp -C public -o .1.3.6.1.2.1.1.3.0 -H 10.10.20.XX
CRITICAL - Plugin timed out while executing system call

Additional Tests which I did for UDP port was successful.

[root@NAGIOSSERVER libexec]# nc -vzu 10.10.20.XX 161
Connection to 10.10.20.XX 161 port [udp/snmp] succeeded!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: How to Monitor servers in multiple Subnets?

Post by scottwilkerson »

Can you do the SNMP test using the same community string from the same subnet and get a response?

Does 10.10.20.XX have a snmp configuration to specify which IP's it responds to?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
shiv
Posts: 4
Joined: Mon Sep 04, 2017 2:42 am

Re: How to Monitor servers in multiple Subnets?

Post by shiv »

Yes I was able to monitor the same subnet hosts and switch the same community string.

yes I have added nagios server in allowed hosts of SNMP service properties in 10.20.XX.XX

only concern is that why I am not able to monitor outside the vlan where I was able to ping the servers in different vlan.

Please suggest any checks from network end? so that I will work with my network team to validate.
Locked