Ad Widget

Collapse

Feature request: Macros for scripts

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dotneft
    Senior Member
    • Nov 2008
    • 699

    #1

    Feature request: Macros for scripts

    Need macros, example {ITEM.KEY}, which would be a key item returns.

    Example:
    Script
    zabbix_get -s {HOST.CONN} -p 10050 -k {ITEM.KEY}

    It is required to verify the value at this time.
  • nelsonab
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2006
    • 1233

    #2
    How would that work? zabbix_get is a command line utility. What are you trying to accomplish?
    RHCE, author of zbxapi
    Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
    Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

    Comment

    • dotneft
      Senior Member
      • Nov 2008
      • 699

      #3
      Originally posted by nelsonab
      How would that work? zabbix_get is a command line utility. What are you trying to accomplish?
      You can add a script, which can be dashboard to learn the current value item. Or make a button in the frontend, to see the current value of item (realtime check).

      Comment

      • Calimero
        Senior Member
        • Nov 2006
        • 481

        #4
        Originally posted by nelsonab
        How would that work? zabbix_get is a command line utility. What are you trying to accomplish?
        Maybe setting a bunch of environment variables before the external script is run ?

        Comment

        • Alexei
          Founder, CEO
          Zabbix Certified Trainer
          Zabbix Certified SpecialistZabbix Certified Professional
          • Sep 2004
          • 5654

          #5
          Originally posted by dotneft
          Need macros, example {ITEM.KEY}, which would be a key item returns.

          Example:
          Script
          zabbix_get -s {HOST.CONN} -p 10050 -k {ITEM.KEY}

          It is required to verify the value at this time.
          Currently the scripts work on host level, so when you call it Zabbix has absolutely no idea what item to choose.
          Alexei Vladishev
          Creator of Zabbix, Product manager
          New York | Tokyo | Riga
          My Twitter

          Comment

          Working...