Page 1 of 1

Unable to add HP Switch with SNMPv2

Posted: Wed May 13, 2015 12:21 pm
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 ~]#

Re: Unable to add HP Switch with SNMPv2

Posted: Wed May 13, 2015 3:12 pm
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.

Re: Unable to add HP Switch with SNMPv2

Posted: Thu May 14, 2015 3:25 pm
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 ~]#

Re: Unable to add HP Switch with SNMPv2

Posted: Thu May 14, 2015 4:15 pm
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

Re: Unable to add HP Switch with SNMPv2

Posted: Thu May 14, 2015 4:48 pm
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

Re: Unable to add HP Switch with SNMPv2

Posted: Thu May 14, 2015 4:54 pm
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?

Re: Unable to add HP Switch with SNMPv2

Posted: Fri May 15, 2015 10:30 am
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.

Re: Unable to add HP Switch with SNMPv2

Posted: Fri May 15, 2015 11:01 am
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

Re: Unable to add HP Switch with SNMPv2

Posted: Fri May 15, 2015 11:45 am
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.

Re: Unable to add HP Switch with SNMPv2

Posted: Fri May 15, 2015 11:59 am
by jdalrymple
Glad that worked cdipoce - OK to lock and mark solved?