Ad Widget

Collapse

Using user macros inside keys (on discovery rule)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • i5513
    Junior Member
    • Nov 2011
    • 12

    #1

    Using user macros inside keys (on discovery rule)

    [ PLEASE IGNORE THIS POST , it was caused by my browser cache , it was displaying the error caused by a erroneus key ]
    [ keys with macros works fine ]

    Hello,

    I tried to find any solution o any bug, but I did not find.

    Imagine you have a tomcat host, with user macros:

    host.tomcat1 {$HTTP_PORT} == 8080

    and you have a user parameter script (get_url) which return urls when you pass the port as parameter:

    { "data": [
    "{#URL}": "/mycontext1",
    "{#URL}": "/mycontext2"
    ] }

    Creating a new discover rule with key:

    get_url[{$HTTP_PORT}]

    will fail because it contains "$"

    Why user macros cannot be used inside discover rule key ?

    Maybe user parameters could access to host macro defined though environment variables or similar hack. If there is a way, it is not document, I would like to ask you before I open a wishlist issue on zabbix support

    Thank you very much
    Last edited by i5513; 17-05-2016, 08:05. Reason: SOLVED [ wrong question ]
Working...