Ad Widget

Collapse

macros template

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • xostrize
    Junior Member
    • Mar 2020
    • 2

    #1

    macros template

    Hello,

    I have zabbix 4.0LTS on CentOS7.

    Is there any macros which can return of template name?

    Maybe I choose wrong way, but I think for use template_name as domain for monitoring. In the items, web scenario and triggers will be related information on the domain. Now I need some macro which return template_name which I can replace part of item and someone else. Then template paired to the host where is presentation actualy deployed.



    Thanks for any suggestion
  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #2
    There's no built in Macro for this that I am aware of, but User Macros can be set at the template level, so all you have to do to get this functionality is add a macro to each template you use.

    For example, your convention could be that you use {$TEMPLATE_NAME} in each template and set it appropriatly for each template. Then it can used on any host where that template is applied.

    Comment

    Working...