DNS CRITICAL - expected ' but got '

Este error aparece en cuando en una generamos consulta DNS con el parámetro -a o “DNS IP Match” (desde el Wizard del Nagios XI).
[root@localhost libexec]# ./check_dns -H -a servidor.dominio.com DNS CRITICAL - expected 'servidor.dominio.com' but got 'servidor.dominio.com.'
Si nos fijamos detenidamente nos falta un punto en nuestra consulta para que funcione correctamente:
./check_dns -H -a servidor.dominio.com.

Si consultamos la ayuda de check_dns podemos observar esta anotación.
[root@localhost libexec]# ./check_dns --help

This plugin uses the nslookup program to obtain the IP address for the given host/domain query.

An optional DNS server to use may be specified.
If no DNS server is specified, the default server(s) specified in /etc/resolv.conf will be used.

Usage:check_dns -H host [-s server] [-a expected-address] [-A] [-t timeout] [-w warn] [-c crit]

-h, --help

Print detailed help screen
-V, --version

Print version information

-H, --hostname=HOST

The name or address you want to query

-s, --server=HOST

Optional DNS server you want to use for the lookup

-a, --expected-address=IP-ADDRESS|HOST

Optional IP-ADDRESS you expect the DNS server to return. HOST must end with a dot (.). This option can be repeated multiple times (Returns OK if any value match). If multiple addresses are returned at once, you have to match the whole string of addresses separated with commas (sorted alphabetically).

-A, --expect-authority

Optionally expect the DNS server to be authoritative for the lookup

-w, --warning=seconds Return warning if elapsed time exceeds value. Default off

-c, --critical=seconds Return critical if elapsed time exceeds value. Default off

-t, --timeout=INTEGER Seconds before connection times out (default: 10)

Ver más noticias