Ad Widget

Collapse

Sending Parameters to Userdefined UserParameter functions

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SATux
    Junior Member
    • Dec 2006
    • 10

    #1

    Sending Parameters to Userdefined UserParameter functions

    Hi,

    Is it possible to setup a UserParameter function that passes a parameter to a script?

    Something like:

    UserParameter=mysql.ping[*],mysqladmin -P<portnum> ......

    where <portnum> is provided to the script.

    Thanks
    SATux
  • Calimero
    Senior Member
    • Nov 2006
    • 481

    #2
    Yes it is (but not on the Windows agent). On Linux (and other *nix plateforms zabbix supports, I guess) you can:

    UserParameter=my_key[*],command -x $1 -y $2...

    On zabbix server, configure your items like this:
    my_key[arg1,arg2]

    which will run as:
    command -x arg1 -y arg2

    Comment

    Working...