SNMP configuration issue from Nagios XI

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
raamardhani7
Posts: 459
Joined: Tue Jun 02, 2015 12:36 am

SNMP configuration issue from Nagios XI

Post by raamardhani7 »

Hi Team,

I am trying to configure poll up/down (icmp) and also T1 interface utilization (snmp) for the WAN link (xx.xx.xx.xx)

./check_tcp -H xx.xx.xx.xx -p 161
connect to address xx.xx.xx.xx and port 161: Connection refused

Could someone help me with this please..
raamardhani7
Posts: 459
Joined: Tue Jun 02, 2015 12:36 am

Re: SNMP configuration issue from Nagios XI

Post by raamardhani7 »

snmpwalk -v 3 -u userID -l authPriv -a sha -A USER333333 -x aes -X USER333334 xx.xx.xx.xx
Timeout: No Response from xx.xx.xx.xx
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: SNMP configuration issue from Nagios XI

Post by jolson »

./check_tcp -H xx.xx.xx.xx -p 161
connect to address xx.xx.xx.xx and port 161: Connection refused
This tells me that either your SNMP agent is listening on UDP or a firewall rule/ACL is blocking access to the TCP port here. You may have to do some testing on your end to figure out which is likely.
snmpwalk -v 3 -u userID -l authPriv -a sha -A USER333333 -x aes -X USER333334 xx.xx.xx.xx
Are you certain that the above command is correct? You might double-check your SNMP configuration on the remote device you're attempting to check.
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
raamardhani7
Posts: 459
Joined: Tue Jun 02, 2015 12:36 am

Re: SNMP configuration issue from Nagios XI

Post by raamardhani7 »

jolson wrote:
./check_tcp -H xx.xx.xx.xx -p 161
connect to address xx.xx.xx.xx and port 161: Connection refused
This tells me that either your SNMP agent is listening on UDP or a firewall rule/ACL is blocking access to the TCP port here. You may have to do some testing on your end to figure out which is likely.
snmpwalk -v 3 -u userID -l authPriv -a sha -A USER333333 -x aes -X USER333334 xx.xx.xx.xx
Are you certain that the above command is correct? You might double-check your SNMP configuration on the remote device you're attempting to check.

Hi Jolson,

You are correct, it is listening to UDP 161.

Below are the details I can paste from the Nagios XI server:

# ./check_tcp -H xx.xx.xx.xx -p 161
connect to address xx.xx.xx.xx and port 161: Connection refused
You have new mail in /var/spool/mail/root
# telnet xx.xx.xx.xx 161
Trying xx.xx.xx.xx...
telnet: connect to address xx.xx.xx.xx: Connection refused
# nmap xx.xx.xx.xx -p 161

Starting Nmap 5.51 ( http://nmap.org ) at 2015-08-10 01:07 CDT
Nmap scan report for xx.xx.xx.xx
Host is up (0.00039s latency).
PORT STATE SERVICE
161/tcp closed snmp

Nmap done: 1 IP address (1 host up) scanned in 0.11 seconds
# iptables -nL | grep 161
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:161

netstat -an | grep -i 161

There is no output for this command.

Please let me know if I can share any other information. Thanks.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: SNMP configuration issue from Nagios XI

Post by Box293 »

SNMP is UDP which makes it hard to test if a remote device is accepting UDP requests, which makes using check_tcp hard.

An SNMP Walk is the best test there is.

Is Nagios and the device in the same subnet? If not, do the router(s)/firewall(s) that separate them allow UDP 161 traffic?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
raamardhani7
Posts: 459
Joined: Tue Jun 02, 2015 12:36 am

Re: SNMP configuration issue from Nagios XI

Post by raamardhani7 »

Box293 wrote:SNMP is UDP which makes it hard to test if a remote device is accepting UDP requests, which makes using check_tcp hard.

An SNMP Walk is the best test there is.

Is Nagios and the device in the same subnet? If not, do the router(s)/firewall(s) that separate them allow UDP 161 traffic?
Hi,

Both are in different subnets and there is no firewall issues is the information I received from the client.

I am using snmpwalk command as advised, but finding challanges, as the password is having ! wild characters in it.
EX: D*ABC!EF$!Ghi&J

And I have created a argument in resource.cfg
$USER333333$=D*ABC!EF$!Ghi&J

And trying with snmpwalk, and still facing the issue. Any insights please on this.??
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: SNMP configuration issue from Nagios XI

Post by jdalrymple »

If you're using snmpwalk and it's failing that means there is some fundamental communications issue. It could be firewall related, it could be permissions related, it's truly hard to say what the cause is because as Box293 pointed out - troubleshooting stateless UDP is not an easy process. The best thing to do at this point would be to debug it from the service end. Is this a Cisco device? If so you can use the debug snmp packets and debug snmp requests commands to identify the problem.
raamardhani7
Posts: 459
Joined: Tue Jun 02, 2015 12:36 am

Re: SNMP configuration issue from Nagios XI

Post by raamardhani7 »

jdalrymple wrote:If you're using snmpwalk and it's failing that means there is some fundamental communications issue. It could be firewall related, it could be permissions related, it's truly hard to say what the cause is because as Box293 pointed out - troubleshooting stateless UDP is not an easy process. The best thing to do at this point would be to debug it from the service end. Is this a Cisco device? If so you can use the debug snmp packets and debug snmp requests commands to identify the problem.
Hi..

It's a FORTINET device, will try debugging it from service end. will give a shot. thanks.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: SNMP configuration issue from Nagios XI

Post by hsmith »

Let us know what you come up with.

Thank you.
Former Nagios Employee.
me.
raamardhani7
Posts: 459
Joined: Tue Jun 02, 2015 12:36 am

Re: SNMP configuration issue from Nagios XI

Post by raamardhani7 »

Hi Team,

I have checked with the client for the firewall issues, they said they are not having any blocking of UDP 161 and 162 for SNMP and SNMPtraps.

password is having exclamatory mark ! in it and whenever snmpwalk command is coming across ! it is terminating.

snmpwalk -v 3 -u username -l authPriv -a sha -A A*ABC!FM$!Tue&A -x aes -X P*QRS!FM$!Tue&P xx.xx.xx.xx

-bash: !FM$!Tue: event not found.

I defined arguments in resource.cfg.
$USER3333$=A*
ABC!FM$!Tue&A
$USER4444$=P*QRS!FM$!Tue&P

snmpwalk -v 3 -u fslsnmpusr -l authPriv -a sha $USER3333$ -x aes -X $USER4444$ xx.xx.xx.xx
No log handling enabled - turning on stderr logging
Error: passphrase chosen is below the length requirements of the USM (min=8).
snmpwalk: (The supplied password length is too short.)
Error generating a key (Ku) from the supplied privacy pass phrase.

snmpwalk -v 3 -u fslsnmpusr -l authPriv -a sha USER3333 -x aes -X USER4444 xx.xx.xx.xx
No log handling enabled - turning on stderr logging
getaddrinfo: USER3333 Name or service not known
snmpwalk: Invalid address (USER3333)

Can someone help me here.. I suspect the issue is with the special characters in the password.
Locked