Ad Widget

Collapse

Zabbix 1.8.1 custom parameter, not liking "-" symbol

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Twirrim
    Junior Member
    • Nov 2009
    • 12

    #1

    Zabbix 1.8.1 custom parameter, not liking "-" symbol

    I've got a custom script on the box that will pull out some specific metrics I'm interested in when provided with the process name.

    For testing I've got the entry in zabbix_agent.conf:

    UserParameter=dirty[*],/usr/local/bin/dirty $1

    running it with part of the process name:

    Code:
    /usr/local/sbin/zabbix_agent -t dirty[8115]
    dirty[/usr/local/bin/dirty 8115]     [t|579.578]
    if I try and run it with a little bit more:

    Code:
    /usr/local/sbin/zabbix_agent -t dirty[8115-alf]
    dirty[/usr/local/bin/dirty /usr/local/bin/dirty $1]  [m|ZBX_NOTSUPPORTED]
    as soon as I add in that "-" it switches to NOTSUPPORTED, and if you look at the command line it says it's running its decided to repeat the name of the script, and not substitute in the $1 I passed it..

    Running the script manually works fine:
    Code:
    /usr/local/bin/dirty 8115-alf
    579.32
    Is this a bug in the agent or am I missing something obvious?
  • RohrbaGe
    Senior Member
    • Aug 2005
    • 167

    #2
    Some characters are not supported as parameters.
    If you want to still use it or need it you need to set an
    option in zabbix_agentd to support this special chars.
    I have not in mind the parameter, but have is used it somewhere already, as I had similiar probs.

    Gerald

    Comment

    Working...