SNMP Checks unable to query host error
SNMP Checks unable to query host error
Hi there,
Version: Nagios Core 4.4.5
OS: CentOS 7
I am attempting to apply SNMP monitoring checks for our QNAP NAS device. I have a storage check utilizing a script which points to the information on our QNAP device (see screenshot). I downloaded the MIB file from QNAP, renamed to QNAP-MIB.txt and copied to directory /user/share/snmp/mibs. I updated the community key and trap IP address (IP of Nagios server). However, I continue to receive a Warning error: CRITICAL : Unable to SNMP query $HOST. Please see screenshots for further information. I can provide a copy or excerpt of the script we are using if that helps diagnose the issue. Thanks!
Version: Nagios Core 4.4.5
OS: CentOS 7
I am attempting to apply SNMP monitoring checks for our QNAP NAS device. I have a storage check utilizing a script which points to the information on our QNAP device (see screenshot). I downloaded the MIB file from QNAP, renamed to QNAP-MIB.txt and copied to directory /user/share/snmp/mibs. I updated the community key and trap IP address (IP of Nagios server). However, I continue to receive a Warning error: CRITICAL : Unable to SNMP query $HOST. Please see screenshots for further information. I can provide a copy or excerpt of the script we are using if that helps diagnose the issue. Thanks!
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: SNMP Checks unable to query host error
From your Nagios server if you run the following do you get a response?
If not how about a generic walk?
Code: Select all
snmpwalk -v 2c -c 'w2ghi_fte_' -m /usr/share/snmp/mibs/QNAP-MIB.txt ph-qnap-001 NAS-MIB::SysVolumeFreeSize.1
Code: Select all
snmpwalk -v 2c -c 'w2ghi_fte_' ph-qnap-001
Last edited by scottwilkerson on Fri Sep 27, 2019 10:42 am, edited 1 time in total.
Reason: edited command
Reason: edited command
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: SNMP Checks unable to query host error
Ok, your system doesn't know how to resolve the host ph-qnap-001 that's the problem
Re: SNMP Checks unable to query host error
Ok if that's the case, where should I be looking to resolve? In the Nagios script, configuration, QNAP configuration?
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: SNMP Checks unable to query host error
Either your DNS administrator or on the Nagios XI system you could add the IP/host to /etc/hostsmtripodi wrote:Ok if that's the case, where should I be looking to resolve? In the Nagios script, configuration, QNAP configuration?
example
Code: Select all
192.168.18.235 ph-qnap-001
Re: SNMP Checks unable to query host error
The host config is there for the QNAP. I'm using Nagios Core on CentOS 7 so it's located here: /user/local/nagios/etc/objects/hosts/
All service checks are working except for this one. So i'm thinking the script/command is not able to see the host.
All service checks are working except for this one. So i'm thinking the script/command is not able to see the host.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: SNMP Checks unable to query host error
The script you have had this line
I would suggest changing it to something your server can resolve such as possibly
or the IP of the server
Code: Select all
HOST='ph-qnap-001'
Code: Select all
HOST='ph-qnap-001.kobo.corp'
Code: Select all
HOST='xxx.xxx.xxx.xxx'
Re: SNMP Checks unable to query host error
i did that to no effect. Further suggestions?
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: SNMP Checks unable to query host error
can you ping ph-qnap-001.kobo.corp from the Nagios Server?
Code: Select all
ping ph-qnap-001.kobo.corp