Page 2 of 3

Re: Monitoring with SNMP

Posted: Mon Aug 01, 2016 12:35 pm
by tgriep
The filtered state output from the nmap command is pointing to a firewall / device that is blocking SNMP information to be polled by the Nagios server.
Can you verify that the firewall is allowing inbound connections to UDP port 161 and that there is not a device between the Nagios server and the host that could be blocking as well?
The nmap command should show an open state for it's output if the port is open.

Re: Monitoring with SNMP

Posted: Mon Aug 01, 2016 2:38 pm
by ednaldojta
Iptables is inactive.
afflows imagem.

Re: Monitoring with SNMP

Posted: Mon Aug 01, 2016 2:57 pm
by tgriep
Edit the /etc/snmp/snmpd.conf file and replace it with the following.

Code: Select all

com2sec notConfigUser  default       public
group   notConfigGroup v1           notConfigUser
group   notConfigGroup v2c           notConfigUser
view    systemview    included   .1.3.6.1.2.1.1
view    systemview      included  .1.3.6.1.2.1.25
view    systemview          included        interfaces.ifTable.ifEntry.ifAdminStatus
view    systemview          included        .1 80
access  notConfigGroup ""      any       noauth    exact  systemview none none
syslocation Unknown (edit /etc/snmp/snmpd.conf)
syscontact Root <root@localhost> (configure /etc/snmp/snmp.local.conf)
dontLogTCPWrappersConnects yes
Then restart the SNMP daemon by running
service snmpd restart

The above settings allow all hosts to access the SNMP Daemon on that host using version 2c and the community name of public.
Try that out and let us know if this fixes it for you.

Re: Monitoring with SNMP

Posted: Tue Aug 02, 2016 6:41 am
by ednaldojta
Friends got communication, however I think there is still something for me.
When set up to monitor via snmp for linux, it happens the following message.

Re: Monitoring with SNMP

Posted: Tue Aug 02, 2016 12:00 pm
by tgriep
Can you login to the Nagios server, run the following and post the output?

Code: Select all

/usr/local/nagios/libexec/check_snmp_storage_wizard.pl -H 10.10.60.52 -C public --v2c -m Physical -w 90 -c 99 -f
Can you run this command and post the /tmp/walk.txt file so we can review it?

Code: Select all

snmpwalk 10.10.60.52 -c public -v 2c >/tmp/walk.txt
If you changed the community string to something other that public, update the above commands.

Re: Monitoring with SNMP

Posted: Tue Aug 02, 2016 12:11 pm
by ednaldojta
afflowers

Re: Monitoring with SNMP

Posted: Tue Aug 02, 2016 12:24 pm
by tgriep
The output of the snmpwalk shows that the remote system cannot be polled using SNMP so there is still something wrong with it.
Did you update the snmpd.conf file on that server with what I posted and restart the SNMP Daemon?
Is the IP address remote system you are trying to monitor 10.10.60.52?
What is the Operating System running on the remote server and it's version number?

Re: Monitoring with SNMP

Posted: Wed Aug 03, 2016 7:10 am
by ednaldojta
Yes, I updated! Follows the two arquivos.conf of the two machines.
OS versions of the machines are.

Nagios Server - CentOS - 6.7 (Final)
Remote Machine - CentOS 07/02/1511 (Core)

Iptables the two are disabled.

Re: Monitoring with SNMP

Posted: Wed Aug 03, 2016 9:54 am
by tgriep
If the nmap command below still shows that the UDP port 161 is filtered, then something is blocking the connection to the remote system. Run this from the Nagios XI server.

Code: Select all

nmap 10.10.60.52 -sU -p 161
If the port is open, the output of the nmap should look like this showing that the port is open.

Code: Select all

Nmap scan report for 192.168.112.130
Host is up (0.0055s latency).
PORT    STATE SERVICE
161/udp open  snmp
The only thing I can think of is that there is something between the 2 systems blocking the SNMP Polls.

Re: Monitoring with SNMP

Posted: Wed Aug 03, 2016 10:49 am
by ednaldojta
Follows as requested. However iptables is Down.
Both in Nagios as the remote machine.