I'm using an Include directive in my zabbix_agentd.conf, and it looks like this:
And, for example, my "/etc/zabbix/agent-conf.d/ntpd.conf" looks like this:
Now, I'm puzzled, when I strace zabbix_agentd, this file is listed as opened, but ntp.offset, ntp.jitter and ntp.delay seems to be ZBX_NOTSUPPORTED from the logs. If I move the enteries from ntpd.conf to zabbix_agentd.conf, then everything seems to work fine.
Is this a bug with the agent, and Include directive?! The weirdest thing is that I have some plugins added this way that work ok, and other's dont...
I really would not like to have to go through Agent code and to debug it, I just don' have the time... And the patch for zabbix_sender I wrote isn't even commented on this forums by anybody, so I guess it's pointless.
Code:
...snip... ####### INCLUDE CONFIGURATIONS ####### Include=/etc/zabbix/agent-conf.d ...snip...
Code:
# ntpd
UserParameter=ntp.offset,/usr/sbin/ntpq -pn | /usr/bin/gawk 'BEGIN { offset=1000 } $1 ~ /\*/ { offset=$9 } END { print offset }'
UserParameter=ntp.jitter,/usr/sbin/ntpq -pn | /usr/bin/gawk 'BEGIN { offset=1000 } $1 ~ /\*/ { offset=$10 } END { print offset }'
UserParameter=ntp.delay,/usr/sbin/ntpq -pn | /usr/bin/gawk 'BEGIN { offset=1000 } $1 ~ /\*/ { offset=$8 } END { print offset }'
Is this a bug with the agent, and Include directive?! The weirdest thing is that I have some plugins added this way that work ok, and other's dont...
I really would not like to have to go through Agent code and to debug it, I just don' have the time... And the patch for zabbix_sender I wrote isn't even commented on this forums by anybody, so I guess it's pointless.
Comment