As a total newbie to Nagios, I would very much appreciate any insight on this. I've got a feeling that I'm just missing some dependency that the plugin needs (I did verify that the `nslookup` command is available), but I'm not sure what it is.gcc -DLOCALEDIR=\"/usr/local/nagios/share/locale\" -DHAVE_CONFIG_H -I. -I.. -I.. -I../lib -I../gl -I../intl -I/usr/include -DNP_VERSION='"1.4.16"' -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 ‘main’:
check_dns.c:106: error: ‘NSLOOKUP_COMMAND’ undeclared (first use in this function)
check_dns.c:106: error: (Each undeclared identifier is reported only once
check_dns.c:106: error: for each function it appears in.)
make: *** [check_dns.o] Error 1
check_dns plugin not created
-
RobCarleski
- Posts: 5
- Joined: Sun Aug 25, 2013 11:44 am
check_dns plugin not created
So, I could very well be missing something obvious here, but I don't seem to have the 'check_dns' plugin available to me in /usr/local/nagios/libexec (where $USER1$ points to). On a whim, I went to the original nagios plugins folder I snagged, and I do see check_dns.c sitting there. Just for kicks, I tried to do `make check_dns`, thinking that this might create the plugin for me. Not sure if that even made sense to do, but just in case, here's the output from that:
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: check_dns plugin not created
Looks like your system doesn't have nslookup... Can you run
What OS is it?
I believe on CentOS and RHEL you need
Code: Select all
which nslookupI believe on CentOS and RHEL you need
Code: Select all
yum install bind-utils-
RobCarleski
- Posts: 5
- Joined: Sun Aug 25, 2013 11:44 am
Re: check_dns plugin not created
Hi, Scott! Thanks for the response. I was thinking the same thing, but I appear to have it installed already.
Running `which nslookup` gives me: /usr/bin/nslookup
The OS is CentOS 6.4, and running `yum install bind-utils` just tells me the package is already installed and the latsest version.
Any other thoughts?
Running `which nslookup` gives me: /usr/bin/nslookup
The OS is CentOS 6.4, and running `yum install bind-utils` just tells me the package is already installed and the latsest version.
Any other thoughts?
scottwilkerson wrote:Looks like your system doesn't have nslookup... Can you runWhat OS is it?Code: Select all
which nslookup
I believe on CentOS and RHEL you needCode: Select all
yum install bind-utils
-
RobCarleski
- Posts: 5
- Joined: Sun Aug 25, 2013 11:44 am
Re: check_dns plugin not created
Update: 9/6/13
So, I just went into the check_dns.c file and manually created the NSLOOKUP_COMMAND variable, setting the value to "/usr/bin/nslookup". Upon trying to make the module again, it appears to have succeeded. I'll play around with it to be sure it's working, but I think this one is a closed case. Thanks again, Scott!
So, I just went into the check_dns.c file and manually created the NSLOOKUP_COMMAND variable, setting the value to "/usr/bin/nslookup". Upon trying to make the module again, it appears to have succeeded. I'll play around with it to be sure it's working, but I think this one is a closed case. Thanks again, Scott!
-
RobCarleski
- Posts: 5
- Joined: Sun Aug 25, 2013 11:44 am
Re: check_dns plugin not created
Hm... close, but no cigar. Now, whenever I run `check_dns` with arguments, I get 'segmentation fault'. If I run it without args, it says 'Unable to process arguments'. I'll keep looking into this, but any thoughts on it would be greatly appreciated
-
RobCarleski
- Posts: 5
- Joined: Sun Aug 25, 2013 11:44 am
Re: check_dns plugin not created
Got it!
Honestly, I don't know C, and I just declared the variable wrong in the check_dns.c file. I had it as...
when it needed to be...
Thanks again, Scott! Hopefully this thread will help some poor soul in the future! Case closed!
Honestly, I don't know C, and I just declared the variable wrong in the check_dns.c file. I had it as...
Code: Select all
char NSLOOKUP_COMMAND = "/usr/bin/nslookup";Code: Select all
char *NSLOOKUP_COMMAND = "/usr/bin/nslookup";Re: check_dns plugin not created
Closed it is 
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.