Page 1 of 1

Why snmpget doesnt work to one switch

Posted: Wed Aug 12, 2015 4:00 pm
by Jessuzz94
Hi, the issue is this, i have nagios installed with the net-snmp and net-snmp-utils , the snmp works monitoring to one switch directly connected to my nagios servers, but now i want monitor one router that is not direclty connected but it is in the same network so i can ping to the router, i put the service PING and it shows OK, but now i want to but snmp services for the router, like the check_uptime, i test a snmpget to try if the snmp work:

Code: Select all

snmpget -v 2c -c public "router-ip" sysUpTime.0
And shows me : Timeout: No response from "router-ip"

What can i do?, it can be problem of the snmp community configured in the router?

Re: Why snmpget doesnt work to one switch

Posted: Wed Aug 12, 2015 5:12 pm
by lgroschen
I would first check to see if your system has a firewall running, if it does you need to allow port 161.

Also, I would check your snmpd.conf file to see if you are allowing connections from specific IP's or allowing all connections here:
/etc/snmp/snmpd.conf

then run:

Code: Select all

service snmpd restart
Then see what you get for a return from the snmpget.

Re: Why snmpget doesnt work to one switch

Posted: Thu Aug 13, 2015 11:12 am
by Jessuzz94
i think allowing 161 port works,thanks!, just one thing, if another switch or router that i want to monitor is in other subnet, and if a route protocol is configured, no matter if nagios and the router have differents subnets, im going to be able to monitor ping, bandwidth, and uptime of the router/switch?

Re: Why snmpget doesnt work to one switch

Posted: Thu Aug 13, 2015 11:59 am
by hsmith
Jessuzz94 wrote:i think allowing 161 port works,thanks!, just one thing, if another switch or router that i want to monitor is in other subnet, and if a route protocol is configured, no matter if nagios and the router have differents subnets, im going to be able to monitor ping, bandwidth, and uptime of the router/switch?
As long as you have a route there, and can ping you should be just fine. Is there anything else you need help with, or are we all right to close this one?

Re: Why snmpget doesnt work to one switch

Posted: Thu Aug 13, 2015 12:33 pm
by Jessuzz94
another D:, i what cases i will need to configure passive checks?

Re: Why snmpget doesnt work to one switch

Posted: Thu Aug 13, 2015 2:57 pm
by tgriep
Take a look at this link for a few reasons to use passive checks.
https://assets.nagios.com/downloads/nag ... hecks.html

Re: Why snmpget doesnt work to one switch

Posted: Thu Aug 13, 2015 3:33 pm
by Jessuzz94
Oki doki, thanks!

Re: Why snmpget doesnt work to one switch

Posted: Thu Aug 13, 2015 3:43 pm
by hsmith
Jessuzz94 wrote:Oki doki, thanks!
Is there anything else that we can do for you regarding this, or are we free to lock this topic?

Re: Why snmpget doesnt work to one switch

Posted: Thu Aug 13, 2015 3:52 pm
by Jessuzz94
Can lock :D !

Re: Why snmpget doesnt work to one switch

Posted: Thu Aug 13, 2015 4:05 pm
by hsmith
Jessuzz94 wrote:Can lock :D !
Thank you.

Please let us know if you have any more questions!