error adding cisco switch

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
michaewlewis
Posts: 22
Joined: Wed Sep 05, 2018 11:10 am

error adding cisco switch

Post by michaewlewis »

I'm trying to add a cisco switch and am getting some errors. I am able to get snmp data from the switch from my computer and verified that I'm not blocking ports.


[root@nagios ~]#
[root@nagios ~]# /usr/bin/cfgmaker --no-down --noreversedns --if-template=/usr/local/nagiosxi/html/includes/configwizards/000' --enablesnmpv3 --snmp-options=:161::::3 --username='nagiossnmp' --authprotocol='sha' --authpassword='v3password''v3password' --contextengineid=0 '10.13.200.245'
--base: SNMP V3 libraries found, SNMP V3 enabled.
--base: Get Device Info on public@10.13.200.245:161::::3
SNMPopen failed: Received usmStatsWrongDigests.0 Report-PDU with value 10 during synchronization
at /usr/bin/../lib/mrtg2/Net_SNMP_util.pm line 1580.
Net_SNMP_util::snmpopen('public@10.13.200.245:161::::3:v4only', 0, 'ARRAY(0x2cead58)') called at /usr/bin/../lib/m
Net_SNMP_util::snmpwalk_flg('public@10.13.200.245:161::::3:v4only', undef, 'HASH(0x26e50a8)', 1.3.6.1.2.1.1) calletil.pm line 786
Net_SNMP_util::snmpwalk('public@10.13.200.245:161::::3:v4only', 'HASH(0x26e50a8)', 1.3.6.1.2.1.1) called at /usr/b
main::DeviceInfo('public@10.13.200.245:161::::3', 'HASH(0x26e5348)', 'HASH(0x26e50a8)') called at /usr/bin/cfgmake
main::main() called at /usr/bin/cfgmaker line 161
SNMPWALK Problem for public@10.13.200.245:161::::3:v4only at /usr/bin/cfgmaker line 954.
WARNING: Skipping public@10.13.200.245:161::::3 as no info could be retrieved

Use of uninitialized value $syscontact in substitution (s///) at /usr/bin/cfgmaker line 380.
Use of uninitialized value $syslocation in substitution (s///) at /usr/bin/cfgmaker line 381.
Use of uninitialized value $comment_sysdescr in substitution (s///) at /usr/bin/cfgmaker line 382.
Use of uninitialized value $sysname in concatenation (.) or string at /usr/bin/cfgmaker line 415.
Use of uninitialized value $comment_sysdescr in concatenation (.) or string at /usr/bin/cfgmaker line 415.
Use of uninitialized value $syscontact in concatenation (.) or string at /usr/bin/cfgmaker line 415.
Use of uninitialized value $syslocation in concatenation (.) or string at /usr/bin/cfgmaker line 415.
# Created by
# /usr/bin/cfgmaker --no-down --noreversedns --if-template=/usr/local/nagiosxi/html/includes/configwizards/switch/templatev3 --snmp-options=:161::::3 --username=nagiossnmp --authprotocol=sha --authpassword=v3password --privprotocol=aes --pengineid=0 10.13.200.245

### 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:
######################################################################

enablesnmpv3: yes
[root@nagios ~]#
You do not have the required permissions to view the files attached to this post.
User avatar
swolf
Developer
Posts: 361
Joined: Tue Jun 06, 2017 9:48 am

Re: error adding cisco switch

Post by swolf »

Hi @michaewlewis, thanks for reaching out.

There are a couple of things I'd want to check. The first is that your initial command doesn't match the command in the "Created by" comment in the file:

Code: Select all

/usr/bin/cfgmaker --no-down --noreversedns --if-template=/usr/local/nagiosxi/html/includes/configwizards/000' --enablesnmpv3 --snmp-options=:161::::3 --username='nagiossnmp' --authprotocol='sha' --authpassword='v3password''v3password' --contextengineid=0 '10.13.200.245'

Code: Select all

/usr/bin/cfgmaker --no-down --noreversedns --if-template=/usr/local/nagiosxi/html/includes/configwizards/switch/templatev3 --snmp-options=:161::::3 --username=nagiossnmp --authprotocol=sha --authpassword=v3password --privprotocol=aes --pengineid=0 10.13.200.245
You'll want to figure out which command was actually run - the first one seems to have a messed up 'authpassword' entry, and the second has a privacy protocol with no password.

Second, it's not clear to me what the security level for these credentials are - you may want to verify 1) What authentication protocol you're using, 2) whether you're using a privacy protocol, and 3) if you are using a privacy protocol, you'll want to make sure you're specifying a privacy password.

Let me know if that gets you anywhere, or if you have any further questions or concerns.
-Sebastian
Developer @ Nagios 2017-05-15 thru 2024-08-06
michaewlewis
Posts: 22
Joined: Wed Sep 05, 2018 11:10 am

Re: error adding cisco switch

Post by michaewlewis »

I recopied the command from the troubleshooting tip in the wizard and it looks like the created by command matches this time.
One thing that I noticed is the "public@10.13.200.245:161" referenced is weird. I'm not using public for my snmp community name or user or password. Does that need to change or is that just a default thing that doesn't matter?


[root@nagios ~]#
[root@nagios ~]# /usr/bin/cfgmaker --no-down --noreversedns --if-template=/usr/local/nagiosxi/html/includes/configwizards/switch/template --zero-speed '1000000000' --enablesnmpv3 --snmp-options=:161::::3 --username='nagiossnmp' --authprotocol='sha' --authpassword='v3password' --privprotocol='aes' --privpassword='v3password' --contextengineid=0 '10.13.200.245'
--base: SNMP V3 libraries found, SNMP V3 enabled.
--base: Get Device Info on public@10.13.200.245:161::::3
SNMPopen failed: Received usmStatsWrongDigests.0 Report-PDU with value 11 during synchronization
at /usr/bin/../lib/mrtg2/Net_SNMP_util.pm line 1580.
Net_SNMP_util::snmpopen('public@10.13.200.245:161::::3:v4only', 0, 'ARRAY(0x2bc7d58)') called at /usr/bin/../lib/mrtg2/Net_SNMP_util.pm line 1690
Net_SNMP_util::snmpwalk_flg('public@10.13.200.245:161::::3:v4only', undef, 'HASH(0x25c20a8)', 1.3.6.1.2.1.1) called at /usr/bin/../lib/mrtg2/Net_SNMP_util.pm line 786
Net_SNMP_util::snmpwalk('public@10.13.200.245:161::::3:v4only', 'HASH(0x25c20a8)', 1.3.6.1.2.1.1) called at /usr/bin/cfgmaker line 954
main::DeviceInfo('public@10.13.200.245:161::::3', 'HASH(0x25c2348)', 'HASH(0x25c20a8)') called at /usr/bin/cfgmaker line 143
main::main() called at /usr/bin/cfgmaker line 161
SNMPWALK Problem for public@10.13.200.245:161::::3:v4only at /usr/bin/cfgmaker line 954.
WARNING: Skipping public@10.13.200.245:161::::3 as no info could be retrieved

Use of uninitialized value $syscontact in substitution (s///) at /usr/bin/cfgmaker line 380.
Use of uninitialized value $syslocation in substitution (s///) at /usr/bin/cfgmaker line 381.
Use of uninitialized value $comment_sysdescr in substitution (s///) at /usr/bin/cfgmaker line 382.
Use of uninitialized value $sysname in concatenation (.) or string at /usr/bin/cfgmaker line 415.
Use of uninitialized value $comment_sysdescr in concatenation (.) or string at /usr/bin/cfgmaker line 415.
Use of uninitialized value $syscontact in concatenation (.) or string at /usr/bin/cfgmaker line 415.
Use of uninitialized value $syslocation in concatenation (.) or string at /usr/bin/cfgmaker line 415.
# Created by
# /usr/bin/cfgmaker --no-down --noreversedns --if-template=/usr/local/nagiosxi/html/includes/configwizards/switch/template --zero-speed 1000000000 --enablesnmpv3 --snmp-options=:161::::3 --username=nagiossnmp --authprotocol=sha --authpassword=v3password --privprotocol=aes --privpassword=v3password --contextengineid=0 10.13.200.245

### 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:
######################################################################


enablesnmpv3: yes
[root@nagios ~]#
michaewlewis
Posts: 22
Joined: Wed Sep 05, 2018 11:10 am

Re: error adding cisco switch

Post by michaewlewis »

If it makes any difference for troubleshooting, it looks like I can do an snmp v1 or v2 successfully.