Discussion:
Check_dns
Ansgar Schlueter
2010-07-14 15:06:08 UTC
Permalink
Hello,

I updated my icinga installation to version 1.0.2 with IDO. Since then the
check_dns throws the following error:

***** Icinga *****

Notification Type: PROBLEM

Service: DNS
Host: XXXXX
Address: xx.xx.xx.xx
State: UNKNOWN

Date/Time: Wed Jul 14 13:41:27 CEST 2010

Additional Info:

check_dns: Invalid hostname/address -



When using the plugin interactively I get no errors.

***@XXXX:~> /usr/local/icinga/libexec/check_dns --version
check_dns v1.4.14 (nagios-plugins 1.4.14)

***@XXXX:~> /usr/local/icinga/libexec/check_dns -H xx.xx.xx.xx
DNS OK: 0,009 seconds response time. Xx.xx.xx.xx returns
XXXXX.tm.iabg.de.|time=0,008512s;;;0,000000

In /var/log/messages I get the following entry:
Jul 14 17:01:27 XXXXX icinga: SERVICE ALERT:
XXXXX;DNS;UNKNOWN;HARD;3;check_dns: Invalid hostname/address -

What is wrong and how can I get more information from this check or be able
to debug it?

Ansgar
--
Ansgar Schlueter
IABG mbH Aussenstelle Lathen
Hermann-Kemper-Str. 23
49762 Lathen
Germany

phone: +49 5933 62-119
fax: +49 5933 62-20
email: Ansgar.Schlueter-***@public.gmane.org
web: http://www.iabg.de/transrapid

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
Wolfgang
2010-07-14 17:22:24 UTC
Permalink
Post by Ansgar Schlueter
Hello,
I updated my icinga installation to version 1.0.2 with IDO. Since then the
***** Icinga *****
Notification Type: PROBLEM
Service: DNS
Host: XXXXX
Address: xx.xx.xx.xx
State: UNKNOWN
Date/Time: Wed Jul 14 13:41:27 CEST 2010
check_dns: Invalid hostname/address -
When using the plugin interactively I get no errors.
check_dns v1.4.14 (nagios-plugins 1.4.14)
DNS OK: 0,009 seconds response time. Xx.xx.xx.xx returns
XXXXX.tm.iabg.de.|time=0,008512s;;;0,000000
XXXXX;DNS;UNKNOWN;HARD;3;check_dns: Invalid hostname/address -
What is wrong and how can I get more information from this check or be able
to debug it?
Ansgar
Please check that the service and command definition result in the same
call of the plugin as the call on the command line. If unsure please
post both definitions.
Ansgar Schlueter
2010-07-15 06:59:15 UTC
Permalink
Post by Ansgar Schlueter
Post by Ansgar Schlueter
Hello,
I updated my icinga installation to version 1.0.2 with IDO.
Since then the
Post by Ansgar Schlueter
***** Icinga *****
Notification Type: PROBLEM
Service: DNS
Host: XXXXX
Address: xx.xx.xx.xx
State: UNKNOWN
Date/Time: Wed Jul 14 13:41:27 CEST 2010
check_dns: Invalid hostname/address -
When using the plugin interactively I get no errors.
check_dns v1.4.14 (nagios-plugins 1.4.14)
DNS OK: 0,009 seconds response time. Xx.xx.xx.xx returns
XXXXX.tm.iabg.de.|time=0,008512s;;;0,000000
XXXXX;DNS;UNKNOWN;HARD;3;check_dns: Invalid hostname/address -
What is wrong and how can I get more information from this
check or be able
Post by Ansgar Schlueter
to debug it?
Ansgar
Please check that the service and command definition result
in the same
call of the plugin as the call on the command line. If unsure please
post both definitions.
Resource.cfg
# Sets $USER1$ to be the path to the plugins
$USER1$=/usr/local/icinga/libexec

Commands.cfg
# 'check_dns' command definition
define command{
command_name check_dns
command_line $USER1$/check_dns -H $HOSTADDRESS$ $ARG1$
}

Myconfig.cfg
define service{
use generic-service
host_name XXXXX
service_description DNS
check_command check_dns
process_perf_data 0
}

And a direct call of the plugin as user icinga
***@XXXXX:~> /usr/local/icinga/libexec/check_dns -H xx.xx.xx.xx
DNS OK: 0,110 seconds response time. Xx.xx.xx.xx returns
XXXXX.tm.iabg.de.|time=0,110431s;;;0,000000

I haven't touched the configs but did the updates from 1.0 to 1.0.1 and
1.0.2 and this error was introduced by the update to 1.0.2 which otherwise
went very smoothly.

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
Wolfgang
2010-07-15 18:10:36 UTC
Permalink
Post by Ansgar Schlueter
Post by Ansgar Schlueter
Post by Ansgar Schlueter
Hello,
I updated my icinga installation to version 1.0.2 with IDO.
Since then the
Post by Ansgar Schlueter
***** Icinga *****
Notification Type: PROBLEM
Service: DNS
Host: XXXXX
Address: xx.xx.xx.xx
State: UNKNOWN
Date/Time: Wed Jul 14 13:41:27 CEST 2010
check_dns: Invalid hostname/address -
When using the plugin interactively I get no errors.
check_dns v1.4.14 (nagios-plugins 1.4.14)
DNS OK: 0,009 seconds response time. Xx.xx.xx.xx returns
XXXXX.tm.iabg.de.|time=0,008512s;;;0,000000
XXXXX;DNS;UNKNOWN;HARD;3;check_dns: Invalid hostname/address -
What is wrong and how can I get more information from this
check or be able
Post by Ansgar Schlueter
to debug it?
Ansgar
Please check that the service and command definition result
in the same
call of the plugin as the call on the command line. If unsure please
post both definitions.
Resource.cfg
# Sets $USER1$ to be the path to the plugins
$USER1$=/usr/local/icinga/libexec
Commands.cfg
# 'check_dns' command definition
define command{
command_name check_dns
command_line $USER1$/check_dns -H $HOSTADDRESS$ $ARG1$
}
Myconfig.cfg
define service{
use generic-service
host_name XXXXX
service_description DNS
check_command check_dns
process_perf_data 0
}
And a direct call of the plugin as user icinga
DNS OK: 0,110 seconds response time. Xx.xx.xx.xx returns
XXXXX.tm.iabg.de.|time=0,110431s;;;0,000000
I haven't touched the configs but did the updates from 1.0 to 1.0.1 and
1.0.2 and this error was introduced by the update to 1.0.2 which otherwise
went very smoothly.
Hm. Looks ok at first glance. I have no good ideas at the moment so
please enable debugging in icinga.cfg and have look at the debug output.
The following values will get you every information that is available ;-)
debug_level=-1
debug_verbosity=2
Ansgar Schlueter
2010-07-16 06:56:23 UTC
Permalink
Post by Wolfgang
Hm. Looks ok at first glance. I have no good ideas at the moment so
please enable debugging in icinga.cfg and have look at the
debug output.
The following values will get you every information that is
available ;-)
debug_level=-1
debug_verbosity=2
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.

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
Ansgar Schlueter
2010-07-16 07:58:40 UTC
Permalink
Post by Ansgar Schlueter
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

Continue reading on narkive:
Loading...