Hi I was thinking of creating a series of tests to catch some possible misconfigurations, like:
1. {HOST.IP} or {HOST.DNS} disagreeing with what's actually registered in DNS.
2. misconfigured or lacking reverse DNS
3. /etc/hosts disagreeing with DNS
etc
(The tests must be templated, so I can apply to all hosts.)
I have created a super simple /etc/zabbix/externalscripts/dig-s.sh
#! /bin/sh
exec dig +short "$@"
And these items work great:
DNS IP4 address dig-s.sh[a,{HOST.DNS}.]
DNS IP4 reverse dig-s.sh[ptr,-x,{HOST.IP}]
BUT it seems impossible to compare the results of these items, as {HOST.DNS} and {HOST.IP} are not available in trigger expressions, thus
{host:dig-s.sh[a,{HOST.DNS}.].count(#1,"{HOST.IP}",eq)}#1
does not work as expected.
Any ideas?
1. {HOST.IP} or {HOST.DNS} disagreeing with what's actually registered in DNS.
2. misconfigured or lacking reverse DNS
3. /etc/hosts disagreeing with DNS
etc
(The tests must be templated, so I can apply to all hosts.)
I have created a super simple /etc/zabbix/externalscripts/dig-s.sh
#! /bin/sh
exec dig +short "$@"
And these items work great:
DNS IP4 address dig-s.sh[a,{HOST.DNS}.]
DNS IP4 reverse dig-s.sh[ptr,-x,{HOST.IP}]
BUT it seems impossible to compare the results of these items, as {HOST.DNS} and {HOST.IP} are not available in trigger expressions, thus
{host:dig-s.sh[a,{HOST.DNS}.].count(#1,"{HOST.IP}",eq)}#1
does not work as expected.
Any ideas?