Page 1 of 2

Getting SNMP error for Nexus Switches

Posted: Thu Mar 31, 2016 11:46 am
by mlk0506
I have been tasked with setting up nagios to monitor 4 nexus switches. After a few road blocks i managed to successfully get one of them configured and is now being monitored. I found 2 plugins from the nagios exchange for the nexus switches. Anyways, the 2nd one i'm trying to configure gets this error " UNKNOWN: SNMP get_request : No response from remote host '10.155.9.121'" when i try to add the service i made for it to check the hardware and memory usage to the 2nd nexus switch. I added the 2nd switch and it is configure exactly like the 1st one except ip address of course, but it has the same SNMP as the 1st one. I'm very new to nagios in general and to using linux commands/codes. I've probably missed a step or two and i don't know where to look. I guess a better question is, what kind of info do you all need to be able to help me? or is it maybe that i can't use the same check commands( services) twice for 2 different hosts?

Re: Getting SNMP error for Nexus Switches

Posted: Thu Mar 31, 2016 12:43 pm
by hsmith
Are you able to communicate with port 161 for that IP? You can attempt to check this by using telnet.

Re: Getting SNMP error for Nexus Switches

Posted: Thu Mar 31, 2016 12:48 pm
by bwallace
From Nagios XI server, try doing an snmpwalk against the non-working Nexus switch:
snmpwalk -v2c -c <community> <IP ADDRESS OF HOST>

or snmpget
snmpget -v2c -c <community> <IP ADDRESS OF HOST>

Was the walk successful? Please post the output and the nagios exchange link to the plugin you're using so we can check that out as well - thanks -

Re: Getting SNMP error for Nexus Switches

Posted: Thu Mar 31, 2016 1:52 pm
by mlk0506
@ hsmith - Our network admin doesn't have it setup with a port, he said he uses SSH connection. the Nexus switches are able to be pinged, they are up and the 1st one is using the plugin services just fine. the 2nd has a status of up and can be pinged, the plugin services just come back unknown.


@bwallace
https://exchange.nagios.org/directory/P ... re/details
https://exchange.nagios.org/directory/P ... em/details

those are the two plugins.

the output of snmpwalk is: No response from 10.155.9.121

the output of snmpget just gives me a table of options?
i'm sorry i'm not sure how to give you a screenshot or copy and paste. when it comes to linux, i am truly a beginner.

Re: Getting SNMP error for Nexus Switches

Posted: Thu Mar 31, 2016 4:48 pm
by bwallace
Thanks for the info. The table of OIDs is correct = that's a good sign. To get us a copy, from the XI machine run:

snmpget -v2c -c <community> <IP ADDRESS OF HOST> -w snmpgetTest.txt

(it will write the file to the directory you issue the command from)

Then use WinScp to retrieve the file
https://winscp.net/eng/download.php

Re: Getting SNMP error for Nexus Switches

Posted: Fri Apr 01, 2016 12:30 pm
by mlk0506
so i ran that script, and then i downloaded the winscp from the link you gave me, but i cannot for the life of me figure out how to use it.

Re: Getting SNMP error for Nexus Switches

Posted: Fri Apr 01, 2016 1:47 pm
by hsmith
What issue in particular are you running into with WinSCP?

Re: Getting SNMP error for Nexus Switches

Posted: Fri Apr 01, 2016 1:51 pm
by tgriep
Take a look at the WinSCP guide at this link for any help on downloading files from the XI server.
https://winscp.net/eng/docs/guides

Re: Getting SNMP error for Nexus Switches

Posted: Fri Apr 01, 2016 2:27 pm
by mlk0506
Ok, thank you i got it now, sorry...
However, i just realized that when the script is ran it says " snmpget: invalid option --'w'

Re: Getting SNMP error for Nexus Switches

Posted: Fri Apr 01, 2016 2:33 pm
by tgriep
Actually, there isn't a -w option for the snmpget command, must be a typo.
Can you run the following command to see if the port 161 UDP is open on your switch?

Code: Select all

nmap -sU -p 161 xxx.xxx.xxx.xxx
Replace the xxx.xxx.xxx.xxx with the IP address of the switch and post the output of the command.