<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4611.1300" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><SPAN class=234031817-27122002><FONT face="Comic Sans MS" color=#000080
size=2>You're missing the "-l <lookup string>" in your check_dig command
definition. It's difficult to test the lookup capability if you don't
specify a host to lookup. ;-)</FONT></SPAN></DIV>
<DIV><SPAN class=234031817-27122002><FONT face="Comic Sans MS" color=#000080
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=234031817-27122002><FONT face="Comic Sans MS" color=#000080
size=2>Before definining it in checkcommands.cfg, play around with it on the
command line until you're satisfied with an invocation you can live
with.</FONT></SPAN></DIV>
<DIV><SPAN class=234031817-27122002><FONT face="Comic Sans MS" color=#000080
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=234031817-27122002><FONT face="Comic Sans MS" color=#000080
size=2>Do a "./check_dig --help" for more info.</FONT></SPAN></DIV>
<DIV><SPAN class=234031817-27122002><FONT face="Comic Sans MS" color=#000080
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=234031817-27122002><FONT face="Comic Sans MS" color=#000080
size=2>jc</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Eric Gregory
[mailto:eric@gatewayconnections.com]<BR><B>Sent:</B> Friday, December 27, 2002
10:52 AM<BR><B>To:</B> nagios-users@lists.sourceforge.net<BR><B>Subject:</B>
[Nagios-users] check_dig woes<BR><BR></FONT></DIV>
<DIV><FONT face=Arial size=2>I'm trying to monitor DNS service using the
check_dig command, unfortunately it doesn't seem to compile into the
checkcommands.cfg by defualt so I'm guessing I have to add it manually, I've
done so using section 1 below, I then added section 2 to services.cfg to
implement a check of the server. I'm sure I've done it wrong but I can't
find an example of the right way to do it. status.cgi tells me the
status is unknown and the status information is <FONT face="Times New Roman"
size=3>DNS problem - No ANSWER SECTION found </FONT></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>I am running on freebsd 4.5, nagios
1.0, apache2.0 Can anyone tell me what I've done wrong, I'm pretty
sure it's in my checkcommands.cfg but I couldn't find a proper configuration
for the command anywhere.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks</FONT></DIV>
<DIV><FONT face=Arial size=2>Eric</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>-----Section 1------</FONT></DIV>
<DIV><FONT face=Arial size=2>From checkcommands.cfg</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2># 'check_dig' command definition<BR>define
command{<BR>
command_name
check_dig<BR>
command_line $USER1$/check_dig -H
$HOSTADDRESS$<BR>}</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>-----Section 2------</FONT></DIV>
<DIV><FONT face=Arial size=2>from services.cfg</FONT></DIV>
<DIV><FONT face=Arial size=2>define
service{<BR>
use
generic-service<BR>
<BR>
host_name
ns<BR>
service_description
DNS <BR>
is_volatile
0 <BR>
check_period
24x7<BR>
max_check_attempts
3 <BR>
normal_check_interval
5 <BR>
retry_check_interval
1<BR>
contact_groups
admin<BR>
notification_interval
240 <BR>
notification_period
24x7<BR>
notification_options
c,r <BR>
check_command
check_dig<BR>
}<BR>
</FONT></DIV></BLOCKQUOTE></BODY></HTML>