Ad Widget

Collapse

Zabbix Plugin - ZBX_NOTSUPPORTED - why?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jsosic
    Member
    • Apr 2008
    • 47

    #1

    Zabbix Plugin - ZBX_NOTSUPPORTED - why?

    Hi!

    I have the following User Parameters:
    Code:
    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 }'
    The produce simple number on the output, like -1.300.

    Why is Zabbix Agent marking this ones as ZBX_NOTSUPPORTED, and disabling them on the server ?!?!
  • jsosic
    Member
    • Apr 2008
    • 47

    #2
    OK, I've traced this one a little bit. I'm using an Include directive in my zabbix_agentd.conf, and it looks like this:

    Code:
    ####### INCLUDE CONFIGURATIONS #######
    Include=/etc/zabbix/agent-conf.d
    And, for example, my "/etc/zabbix/agent-conf.d/ntpd.conf" looks like this:
    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 }'
    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 weirdes thing is that I have some plugins added this way that work ok, and other's not...

    Alexei? Somebody? I seems to me that I'm going to go through the Agent's code as well...

    Comment

    Working...