Ad Widget

Collapse

Nestet Templates with Discovery Rules

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • OsvaldoP
    Junior Member
    • Jun 2023
    • 17

    #1

    Nestet Templates with Discovery Rules

    Hy to all and thanks for reading my beginner question!

    Currently we use icinga2 to Monitoring our customers environments. A few time ago we saw zabbix and feel confident to make our monitoring easier, better with all the integrated features to collect data in zabbix.
    I'm already able to do a base-monitoring for windows, linux, proxmox, switches...

    As always the devil is in details. To fit up our monitoring I would like to do all as best practise, but what is best practise

    I do need help, by sample:

    We have multiple Windows Domains with different Windows Services. We do also need to monitor Services from 3.Party Applications. Also if they installed or not, get lost or was never installed.

    At first I thought to use a "master" Template with LLD service.discovery all 10 min to have an current state of all Windows Services
    To monitor specific Win-Service vom Application A use a new template witch inheritance to my master-template and an "depended item" to LLD from master-template
    A 3. Template, same as with Application A for Application B, and so on.

    The problem ist that is not allowed to use more than one service.discovery key by host
    If we have to monitor multiple applications on same host the Key "service.discovery" is nestet through templates more than once. It's not allowed

    What ist the best practise for monitoring Windows Services in different szenarios?

    kr
    Roland








  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    Add Alias to agent config.
    Alias=service.discovery[*];service.discovery

    now you can can call it multiple times by specifying some kind of parameter in []-s, which essentially makes that key unique.

    Comment

    • OsvaldoP
      Junior Member
      • Jun 2023
      • 17

      #3
      Hy cyber!

      Thanks for help!

      Think using service.discovery multiple time collects the same data more than once.

      If I use service.discovery in template "Windows Base", info from all services will collected
      With an second tamplate "Application A" and LLD service.discovery[BMD] also collects all services, and but show's only my BMD services selected by Macro.

      Is it possible to collect all Windows Service Info with Template "Windows Base" and use this data in other templates like this?



      Templates Structure

      Windows Base (with LLD service.discovery)
      AppA inherits the LLD service.discovery from "Windows Base" and shows only services from AppA
      AppB inherits the LLD service.discovery from "Windows Base" and shows only services from AppB


      Server/template assignment

      Server1 use template AppA and shows all Services and those from AppA dedicated
      Server2 use template AppB and shows all Services and those from AppB dedicated

      Server3 should show all services (Windows Base) and those from AppA and AppB => Problem service.discovery from "Windows Base" is not unique.


      Maybe I'm totally wrong with my consideration?
      Maybe I should use service.discovery in "Windows Base" and dedicated Items for AppA and AppB...
      But with this i had to create for all services own triggers.

      With service.discovery only one trigger is required.


      Sorry for that question but I'm not sure what is the best practise


      kr
      Roland







      Comment

      • cyber
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Dec 2006
        • 4807

        #4
        I think you can do it this way that you have a host based template, what contains all your macros, ie, what to discover. This must be related to general template, which then uses those macros (no macros defined in this one). I have done similar things when using one general template for different environments (prod, non-prod) and assigning different values to macros for different env-s. Or you define those macros on host level and just assign your general template to host...

        Comment

        • OsvaldoP
          Junior Member
          • Jun 2023
          • 17

          #5
          Hy cyber!

          I will try and give feedback.
          Please give me some time for add. tests

          kr
          Roland​

          Comment

          Working...