Ad Widget

Collapse

agent defined macros

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • warchild
    Junior Member
    • Jul 2010
    • 10

    #1

    agent defined macros

    freebsd 8.0, zfs, zabbix 1.8.2.

    I found at the bottom of my agentd.conf the following section:

    "####### USER-DEFINED MONITORED PARAMETERS #######"

    ### Option: UserParameter
    # User-defined parameter to monitor. There can be several user-defined parameters.
    # Format: UserParameter=<key>,<shell command>
    # Note that shell command must not return empty string or EOL only.
    # Example: UserParameter=system.test,who|wc -l
    #UserParameter=system.test,who|wc -l
    ### Set of parameters for monitoring MySQL server (v3.23.42 and later)
    ### Change -u<username> and add -p<password> if required
    #UserParameter=mysql.ping,mysqladmin -uroot ping|grep alive|wc -l
    #UserParameter=mysql.uptime,mysqladmin -uroot status|cut -f2 -d":"|cut -f1 -d"T"

    I then found the following link to supplement the above and give me a clear picture on how to get this to work:

    http://www.zabbix.com/documentation/...xtending_agent

    So, I made my own.. This is to monitor if a zfs pool has an error

    UserParamater=zfspoolstatus,zpool status -x | grep "all pools are healthy" | wc -l

    If they are all healthy I get a 1, if they are not.. I get a 0. Pretty simple. I put this into the config of the agent.

    Now, in zabbix I went to my freebsd_template. You can see that configuration atached to this as a picture.

    But I continue to receive:

    "70168:20100728:091329.869 Item [flash:zfspoolstatus] error: Not supported by Zabbix Agent" in my logs... why? What am I missing?
    Attached Files
  • warchild
    Junior Member
    • Jul 2010
    • 10

    #2
    I worked out my problem, Paramater is spelt Parameter.

    Comment

    Working...