Ad Widget

Collapse

Macro in trigger URL field?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • clarkritchie
    Member
    • Aug 2013
    • 46

    #1

    Macro in trigger URL field?

    I don't think this is possible, or is it? I read this and this, but testing has not worked...

    e.g.

  • chojin
    Member
    Zabbix Certified Specialist
    • Jul 2011
    • 64

    #2
    EDIT: I misread you question, and posted a way to solve this in the Inventory URL field, not the trigger URL field..
    EDIT2: Using this method, The URL will be available when you click on the hostname in the dashboard and you can use {INVENTORY.URL.A<1-9>} macro's in your trigger based notifications (the URL would be host dependent and not trigger dependent, but maybe this would suffice for you?).


    I think, the best way to solve this problem is to create an item in your hosts(-template) which would return the wanted URL and which will populate the URL inventory-field..

    Step-by-step:
    - Create a script (bash, perl, ruby, whatever..) that simply echo's back any given command-line parameters. make it executable and put it in your externalscripts directory
    - Create an item in your host/template of the type external script
    -- Refer in this item to the 'echo'-script with parameter "http://www.mysite.com/{HOST.NAME}" (which will work as macro usage in item keys is supported)
    -- Make this item populate the URL inventory-field
    - Make sure the host inventory settings is set to "Automatic"

    You can use this 'echo' script to easily populate other inventory field in the same way.
    Last edited by chojin; 28-09-2013, 23:11.

    Comment

    • chojin
      Member
      Zabbix Certified Specialist
      • Jul 2011
      • 64

      #3
      Something similar is discussed here:
      Trigger Status - Open custom URL for a host

      Comment

      • richlv
        Senior Member
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Oct 2005
        • 3112

        #4
        resurrecting an old thread, but if you were interested, you should follow this issue : https://support.zabbix.com/browse/ZBXNEXT-1128
        Zabbix 3.0 Network Monitoring book

        Comment

        Working...