Ad Widget

Collapse

UserParameter passing multiple variables to script

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sbadger
    Member
    • Dec 2005
    • 81

    #1

    UserParameter passing multiple variables to script

    I am trying to pass multiple variables to a UserParameter script, but when I relaunch the agent it gives me the following error:

    Can't add user specified key "san[*". Can't parse key!

    Here is the my entry in the zabbix_agentd.conf:

    UserParameter=san[*,*],/home/zabbix/san.sh

    I know it is dieing at the first comma, but my question is how can I pass multiple items from zabbix to a shell script without is seeing the comma?
  • Alexei
    Founder, CEO
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2004
    • 5654

    #2
    No need to use comma!

    UserParameter=san[*],/home/zabbix/san.sh $1 $2 $3

    In ZABBIX frontend: san[param1,param2,param3]
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    • sbadger
      Member
      • Dec 2005
      • 81

      #3
      It worked

      That worked!!

      Comment

      • hamedaj
        Junior Member
        • Mar 2018
        • 1

        #4
        Originally posted by Alexei
        No need to use comma!

        UserParameter=san[*],/home/zabbix/san.sh $1 $2 $3

        In ZABBIX frontend: san[param1,param2,param3]
        Hi
        I need to use more than 9 arguments in calling my script, like this:
        UserParameter=san[*],/home/zabbix/san.sh $1 $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 ....
        How can i do it???

        Comment

        Working...