Unable to add HP Switch with SNMPv2

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
cdipoce
Posts: 7
Joined: Tue Apr 28, 2015 1:57 pm

Unable to add HP Switch with SNMPv2

Post by cdipoce »

I am trying to add two of our core switches in two different location. I have been able to add multiple switches and routers but I keep getting the same error

[root@localhost ~]# /usr/bin/cfgmaker --show-op-down --noreversedns --zero-speed '100000000' '[email protected]:161::::2'
--base: Get Device Info on [email protected]:161::::2 SNMP Error:
no response received
SNMPv2c_Session (remote host: "10.10.100.1" [10.10.100.1].161)
community: "NAGIOS"
request ID: 1084060992
PDU bufsize: 8000 bytes
timeout: 2s
retries: 5
backoff: 1)
at /usr/bin/../lib/mrtg2/SNMP_util.pm line 651 SNMPWALK Problem for 1.3.6.1.2.1.1 on [email protected]:161::::2:v4only
at /usr/bin/cfgmaker line 951
WARNING: Skipping [email protected]:161::::2 as no info could be retrieved

Use of uninitialized value $comment_sysdescr in substitution (s///) at /usr/bin/cfgmaker line 379.
Use of uninitialized value $sysname in concatenation (.) or string at /usr/bin/cfgmaker line 412.
Use of uninitialized value $comment_sysdescr in concatenation (.) or string at /usr/bin/cfgmaker line 412.
Use of uninitialized value $syscontact in concatenation (.) or string at /usr/bin/cfgmaker line 412.
Use of uninitialized value $syslocation in concatenation (.) or string at /usr/bin/cfgmaker line 412.
# Created by
# /usr/bin/cfgmaker --show-op-down --noreversedns --zero-speed 100000000 [email protected]:161::::2


### Global Config Options

# for UNIX
# WorkDir: /home/http/mrtg

# or for NT
# WorkDir: c:\mrtgdata

### Global Defaults

# to get bits instead of bytes and graphs growing to the right # Options[_]: growright, bits

EnableIPv6: no

######################################################################
# System:
# Description:
# Contact:
# Location:
######################################################################


[root@localhost ~]#
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Unable to add HP Switch with SNMPv2

Post by jdalrymple »

Hi cdipoce,

I did receive your E-mail, but lets handle this problem here instead of through E-mail. This way you have everyone at Nagios helping, not just me :)

So I think the first thing we need to do is just try to snmpwalk this beast, can you run something like:

Code: Select all

snmpwalk -v 2c -c NAGIOS 10.10.100.1
And show us the output? I'm wondering if that community string "NAGIOS" is correct.
cdipoce
Posts: 7
Joined: Tue Apr 28, 2015 1:57 pm

Re: Unable to add HP Switch with SNMPv2

Post by cdipoce »

login as: root
[email protected]'s password:
Last login: Thu May 14 10:45:53 2015 from 10.10.111.163 ]0;root@localhost:~ [?1034h[root@localhost ~]# snmpwalk -v 2c -c NAGIOS 10.10.100.1
Timeout: No Response from 10.10.100.1
]0;root@localhost:~ [root@localhost ~]#
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Unable to add HP Switch with SNMPv2

Post by jdalrymple »

cdipoce wrote: Timeout: No Response from 10.10.100.1
]0;root@localhost:~ [root@localhost ~]#
So herein lies the problem. This could be network related or it could be related to the config being improper somewhere.

Can you run nmap against the switch and see if we're talking to the port OK?

Code: Select all

[jdalrymple@localhost libexec]$ sudo nmap -sU -p 161 10.10.100.1
cdipoce
Posts: 7
Joined: Tue Apr 28, 2015 1:57 pm

Re: Unable to add HP Switch with SNMPv2

Post by cdipoce »

This is for the switch that isn't working
[root@localhost ~]# sudo nmap -sU -p 161 10.10.100.1

Starting Nmap 5.51 ( http://nmap.org ) at 2015-05-14 14:47 MST
Nmap scan report for 10.10.100.1
Host is up (0.00042s latency).
PORT STATE SERVICE
161/udp open|filtered snmp

Nmap done: 1 IP address (1 host up) scanned in 0.28 seconds

This is for a switch that is working
[root@localhost ~]# sudo nmap -sU -p 161 10.10.100.13

Starting Nmap 5.51 ( http://nmap.org ) at 2015-05-14 14:47 MST
Nmap scan report for 10.10.100.13
Host is up (0.0042s latency).
PORT STATE SERVICE
161/udp open snmp

Nmap done: 1 IP address (1 host up) scanned in 0.05 seconds
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Unable to add HP Switch with SNMPv2

Post by ssax »

Filtered means that a firewall, filter, or other network obstacle is blocking the port so that nmap cannot tell whether it is open or closed
Source: http://nmap.org/book/man.html

Are you sure the XI server has access to that switch?
cdipoce
Posts: 7
Joined: Tue Apr 28, 2015 1:57 pm

Re: Unable to add HP Switch with SNMPv2

Post by cdipoce »

It's only happening on that Switch, do you know a way of unfiltering? We don''t have a firewall for internal traffic.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Unable to add HP Switch with SNMPv2

Post by abrist »

Well, it is most likely the configuration on the switch itself - either the nagios server ip has not been allowed, or the community string is wrong. You could also try walking the switch with snmp v1 (I have seen some older switches only respond through v1):

Code: Select all

snmpwalk -v 1 -c NAGIOS 10.10.100.1
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.
cdipoce
Posts: 7
Joined: Tue Apr 28, 2015 1:57 pm

Re: Unable to add HP Switch with SNMPv2

Post by cdipoce »

I ran this command snmp-server response-source 10.10.100.1 and it started working which is the IP for the default VLAN

Thank you for all your help.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Unable to add HP Switch with SNMPv2

Post by jdalrymple »

Glad that worked cdipoce - OK to lock and mark solved?
Locked