Ad Widget

Collapse

About Templates and Macros

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • baggord
    Junior Member
    • Apr 2019
    • 15

    #1

    About Templates and Macros

    Hi everyone,

    in my environment, I have 5 different groups and 5 different NTP Servers.
    Do I have to create 5 templates or is there a smarter way?

    Regards,
  • baggord
    Junior Member
    • Apr 2019
    • 15

    #2
    Okay, let me ask this way. What's the purpose of host groups? I looked up to documentation, couldn't find something interesting. How do you use host groups?

    Comment

    • Atsushi
      Senior Member
      • Aug 2013
      • 2028

      #3
      If you only need to monitor the same items for the NTP server you want to monitor, you can create one template.

      As the role of the host group, it is effective to divide and manage the monitoring target from several viewpoints such as installation location, department, project, and administrator. You can also specify host groups for setting user group access privileges, so you can restrict access to only the information of hosts in a specific host group for each user group.

      Comment


      • baggord
        baggord commented
        Editing a comment
        Thanks, Atsushi. As far as I understand I can't apply a template to a host group yet I can filter (select) those hosts then apply.

        Also I have more than 1 NTP Servers.

      • Atsushi
        Atsushi commented
        Editing a comment
        For me, even if there are multiple NTP servers, only one template is created if the monitored content is the same. After that, link the template to each NTP server registered as a host.
        If there are contents that you want to set individually, you can use the host macro to overwrite the value of the template macro, and monitor the same template with different arguments and conditions.
    • baggord
      Junior Member
      • Apr 2019
      • 15

      #4
      I want to ask one more time if you don't mind Atsushi. I understand your statement and use of host macros. However, the situation is like this:


      - Let's say I have 30 Servers. Each 10 of them is looking for different NTP Servers. (3 NTP Server at total.)
      - I want to create a trigger that checks time difference between host and ntpserver.
      host:system.localtime[utc].last() - {$ntpserver}:system.localtime[utc].last() > {$time_difference_threshold} or host:system.localtime[utc].last() - {$ntpserver}:system.localtime[utc].last() < {$time_difference_threshold}

      In this case, do I have to select 10 hosts for each NTP server and then add a macro host macro for each?

      Wouldn't it be better if we had something like host group macro?
      I'm not advanced in Zabbix. That's why I'm asking if there is a better "grouping" way instead of adding host macro.

      Comment

      • Atsushi
        Senior Member
        • Aug 2013
        • 2028

        #5
        Although it may not be exact, you may be able to determine if the difference is growing by using aggregate items.

        Comment

        Working...