Hi All,
As attached picture show syntax_error as i already follow instruction to make sure everything work fine but still having error
After checking on terminal which still show syntax error
Looking forward if anything that i can provide.
check_dns error message
Re: check_dns error message
Something must of corrupted the plugin when it was compiled or installed on the server.
Try reinstalling the plugins on the server or follow this link for compiling the plugins from source to see if it fixes that plugin.
https://support.nagios.com/kb/article/n ... e-569.html
Try reinstalling the plugins on the server or follow this link for compiling the plugins from source to see if it fixes that plugin.
https://support.nagios.com/kb/article/n ... e-569.html
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: check_dns error message
Seem still same as after per checking existing plugin tar files is excluded check_dns. Where should i need to get check_dns?
Re: check_dns error message
While I notice that check_dns was not been compile by default, I follow https://support.nagios.com/forum/viewto ... =7&t=11660 to make check_dns again from source but there is some error come out. And also cannot find [char NSLOOKUP_COMMAND = "/usr/bin/nslookup";] in check_dns.c.
root@raspberrypi:~/nagios-plugins-release-2.2.1/plugins# make check_dns
2.2.1.git
gcc -DLOCALEDIR=\"/usr/local/nagios/share/locale\" -DHAVE_CONFIG_H -I. -I.. -I.. -I../lib -I../gl -I../intl -I/usr/include -DNP_VERSION='"2.2.1.git"' -g -O2 -MT check_dns.o -MD -MP -MF .deps/check_dns.Tpo -c -o check_dns.o check_dns.c
check_dns.c: In function ‘check_new_address’:
check_dns.c:88:65: error: ‘NSLOOKUP_COMMAND’ undeclared (first use in this function)
die (STATE_CRITICAL, "%s%s%s\n", _("DNS CRITICAL - '"), NSLOOKUP_COMMAND, _("' returned empty host name string"));
^~~~~~~~~~~~~~~~
check_dns.c:88:65: note: each undeclared identifier is reported only once for each function it appears in
check_dns.c: In function ‘main’:
check_dns.c:129:44: error: ‘NSLOOKUP_COMMAND’ undeclared (first use in this function)
xasprintf (&command_line, "%s %s %s %s", NSLOOKUP_COMMAND, query_type, query_address, dns_server);
^~~~~~~~~~~~~~~~
Makefile recipe for target 'check_dns.o' failed
make: *** [check_dns.o] Error 1
Looking forward your great reply.
root@raspberrypi:~/nagios-plugins-release-2.2.1/plugins# make check_dns
2.2.1.git
gcc -DLOCALEDIR=\"/usr/local/nagios/share/locale\" -DHAVE_CONFIG_H -I. -I.. -I.. -I../lib -I../gl -I../intl -I/usr/include -DNP_VERSION='"2.2.1.git"' -g -O2 -MT check_dns.o -MD -MP -MF .deps/check_dns.Tpo -c -o check_dns.o check_dns.c
check_dns.c: In function ‘check_new_address’:
check_dns.c:88:65: error: ‘NSLOOKUP_COMMAND’ undeclared (first use in this function)
die (STATE_CRITICAL, "%s%s%s\n", _("DNS CRITICAL - '"), NSLOOKUP_COMMAND, _("' returned empty host name string"));
^~~~~~~~~~~~~~~~
check_dns.c:88:65: note: each undeclared identifier is reported only once for each function it appears in
check_dns.c: In function ‘main’:
check_dns.c:129:44: error: ‘NSLOOKUP_COMMAND’ undeclared (first use in this function)
xasprintf (&command_line, "%s %s %s %s", NSLOOKUP_COMMAND, query_type, query_address, dns_server);
^~~~~~~~~~~~~~~~
Makefile recipe for target 'check_dns.o' failed
make: *** [check_dns.o] Error 1
Looking forward your great reply.
Re: check_dns error message
Did you install the bind-utils package on the server before re-compiling the plugin?
If not, make sure you installed it by running this as root
If not, make sure you installed it by running this as root
Code: Select all
yum install -y bind-utils
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: check_dns error message
I am using raspberry Pi as my Nagios Core and I do to apt-get install dnsutils but it is already latest packages.
I do able to do nslookup 8.8.8.8 and able to getting output as well.
I do able to do nslookup 8.8.8.8 and able to getting output as well.
Re: check_dns error message
When compiling the source, you have to run the configure script. When the configure script runs, it searches the system for all of the commands, paths, etc it needs to compile the software.
Run through all of the commands in the Installing Nagios Plugins From Source articke and see if it finds the nslookup command and compiles the check_dns plugin.
Run through all of the commands in the Installing Nagios Plugins From Source articke and see if it finds the nslookup command and compiles the check_dns plugin.
Be sure to check out our Knowledgebase for helpful articles and solutions!