Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  2. ZBX-16339

service.discovery, grab JSON Object, create items and triggers



    • Problem report
    • Status: Closed
    • Major
    • Resolution: Commercial support required
    • 4.0.10
    • None
    • Templates (T)
    • Ubuntu 16.04


      I have been sent here from Sales - Maria Truskovskaya after a short e-mail exchange.

      I have created a template with a service.discovery rule that create items and triggers common to all servers, lets call it MS-template

      {#SERVICE.STARTUPNAME} ^(automatic|automatic delayed)$ [Result is TRUE]

      with a not equal filter that works the same way as @Windows service names for discovery

      I than create a linked template (MS-template), lets call it Skype-MS-template. I now want to find all {#SERVICE.DISPLAYNAME} ^Skype$ [Result is TRUE]  and create items plus triggers with a different severity level than MS-template has for it's item and triggers.

      In the end i want to create a second linked template (MS-template) and find all services that return 255 for service.discovery and create items and triggers with a 3'rd severity level.

      Maria suggested creating a single service.discovery rule, create several filter statements for all the criterias and create host level macros. This has several disadvantages

      1. rule filter will be hard to manage and administrate
      2. rule filter (i expect) is read from top to bottom for first matching rule
      3. you cannot add a new rule in the middle of an existing rule filter
      4. you cannot change priority (up/down) on an existing rule filter
      5. For each host i need to manually create user macros
        1. Error prone and extremely time consuming

      I cannot believe the above is not achievable in Zabbix, but as i have written to Maria i cannot find any Zabbix documentation on it for a fairly simple and common feature.

      Boiled down to the very essential parts, i want to

      1. Get a list for each host, service.discovery JSON object
      2. Extract services from the JSON array based on a regex
      3. Create items and triggers for all services found
      4. Done at template level


      I have created a thread on the Zabbix forum, serverfault, ubuntuforumg.org, extensively read the Zabbix documentation v4.0 and been over the Zabbix youtube playlist with no result.

      This issue is dead-locking my entire Zabbix project and blocking becoming a potential customer. How do i solve the above issue?

      Thanks in advance
      Best regards




            edgar.akhmetshin Edgar Akhmetshin
            drenriza cristian
            0 Vote for this issue
            4 Start watching this issue