> Enabling debugging didn't give any more information. Macro 
> processing showed
> that the command string is the one I used interactively 
> except that it has a
> trailing space.
> 
> '/usr/local/icinga/libexec/check_dns -H xx.xx.xx.xx '
> 
> Check result are then stored in a temporary file but this 
> file is removed
> very quickly afterwards, so there is no chance to check that.
> 
> After issuing the check_dns command via execv there is no 
> more detailed
> information available. Maybe I need a wrapper for check_dns to get
> additional debug information.

I found a work around to get this check running normally.

I installed a wrapper perl script to get all STDERR and STDOUT information
but this didn't solve the problem.

-------
 2010-6-16 9:31:35 ------ debugging
cmd=[/usr/local/icinga/libexec/check_dns '-H' 'xx.xx.xx.xx' '']
output=[check_dns: Invalid hostname/address -
]
retcode=3

So this error is really raised inside of the check_dns command.

Since I was puzzled by the railing space I extend the command definition for
check_dns with an trailing '-v':

# 'check_dns' command definition
define command{
        command_name    check_dns
        command_line    $USER1$/capture.pl $USER1$/check_dns -H
$HOSTADDRESS$ $ARG1$ -v
        }

'-v' is actually not speicified in the help (./check_dns --help) but it
returns the used nslookup command as well.

And from now the check works as expected.

 2010-6-16 9:51:35 ------ debugging
cmd=[/usr/local/icinga/libexec/check_dns '-H' 'xx.xx.xx.xx' '-v']
output=[/usr/bin/nslookup -sil xx.xx.xx.xx
Server:         xx.xx.xx.xx
Address:        xx.xx.xx.xx#53

Xx.xx.xx.xx.in-addr.arpa        name = XXXXX.tm.iabg.de.

DNS OK: 0.012 seconds response time. Xx.xx.xx.xx returns
XXXXX.tm.iabg.de.|time=0.011628s;;;0.000000
]
retcode=0
-------

Ansgar

Industrieanlagen-Betriebsgesellschaft mbH
Vorsitzender des Aufsichtsrats: RA Engelbert Kupka MdL a.D.
Geschaeftsfuehrung: Prof. Dr.-Ing. Rudolf F. Schwarz
Sitz der Gesellschaft: Einsteinstrasse 20, 85521 Ottobrunn
Registergericht: Amtsgericht Muenchen
Handelsregister Nr.: HRB 5499

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
icinga-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/icinga-users

Reply via email to