I'm running Nagios XI (trial) on VMware player. I downloaded and installed the VM from the Nagios website.
I'm having some issues with setting up monitoring a device behind a port forward. (i.e. I port forwarded port 161 [snmp] to a device behind a firewall).
I used the "SNMP Monitor Wizard" to create the device and added the services I wanted to monitor, however it doesn't work.
I looked into the service detail for one of the MIBs i'm trying to capture and found this:
CMD: /usr/bin/snmpget -t 1 -r 5 -m RFC1213-MIB -v 2c [authpriv] ipvegas.hotelwifi.com:64161:161 ifOperStatus.3
As you can see, it's adding port 161 (:161) after the port forward which I'm guessing is the reason it is not working.
Can someone help me with this?
Best,
Rafael
SNMP check through a port foward
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: SNMP check through a port foward
Did you forward 161 TCP or UDP?
-
rafaelvdberg
- Posts: 39
- Joined: Fri Aug 24, 2012 1:24 pm
Re: SNMP check through a port foward
Yes - but as you can see Nagios is adding a :161 to the end of the address.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: SNMP check through a port foward
I'm sorry, I didn't realize you were adding it to the host.
Instead of doing that you should add the port to the $ARG1$ field with check_snmp 's -p parameter.
Instead of doing that you should add the port to the $ARG1$ field with check_snmp 's -p parameter.
Code: Select all
-p 64161-
rafaelvdberg
- Posts: 39
- Joined: Fri Aug 24, 2012 1:24 pm
Re: SNMP check through a port foward
Okay, thanks.
So currently the $ARG1$ is: -o ifOperStatus.3 v2c -C c0c01509hki -m RFC1213-MIB -r "1"
I should change this to read: -o ifOperStatus.3 v2c -C c0c01509hki -m RFC1213-MIB -r "1" -p 64161
Right?
So currently the $ARG1$ is: -o ifOperStatus.3 v2c -C c0c01509hki -m RFC1213-MIB -r "1"
I should change this to read: -o ifOperStatus.3 v2c -C c0c01509hki -m RFC1213-MIB -r "1" -p 64161
Right?
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
-
rafaelvdberg
- Posts: 39
- Joined: Fri Aug 24, 2012 1:24 pm
Re: SNMP check through a port foward
Okay, that worked (I had to put -p 64161 ) in front.
However, it still shows my host as down, with the services (SNMP services) up.
I looked into the host and it seems that this is because the host is being monitored by ICMP. Here is what is shows under host detail: check_icmp: Failed to resolve ipvegas.hotelwifi.com:64161
ICMP obviously won't work in this scenerio. I'd rather have it do a HTTP check to port 50011 to check host status. How do I change it to that?
Best,
Rafael
However, it still shows my host as down, with the services (SNMP services) up.
I looked into the host and it seems that this is because the host is being monitored by ICMP. Here is what is shows under host detail: check_icmp: Failed to resolve ipvegas.hotelwifi.com:64161
ICMP obviously won't work in this scenerio. I'd rather have it do a HTTP check to port 50011 to check host status. How do I change it to that?
Best,
Rafael