Ad Widget

Collapse

Trigger on dependent item prototype item only triggers doesn't work

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • brianklw
    Junior Member
    • Dec 2022
    • 2

    #1

    Trigger on dependent item prototype item only triggers doesn't work

    I did the following

    - Create a template
    - Create an item using system.run that returns json
    - Created a dependent item discovery rule on the item
    - Added LLD macros to the discovery rule
    - Created a dependent item prototype item on the item
    - Added preprocessing to the dependent item prototype item
    - Added a host to the template
    - Confirmed the item and prototype item were correct in the latest data page
    - Added a trigger prototype on the prototype item using "last with equal to a value"
    - Added a trigger prototype on the prototype item using "last with not equal to a value"
    - Added a trigger prototype on the prototype item using "nodata"

    Neither of the "last" trigger prototypes to trigger but the "nodata" trigger prototype did trigger.

    Why is the "nodata" trigger prototype being triggered when I can see the data in the latest data page?









  • Markku
    Senior Member
    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
    • Sep 2018
    • 1781

    #2
    Please show us the triggers and the latest data details.

    Markku

    Comment

    • brianklw
      Junior Member
      • Dec 2022
      • 2

      #3
      Here's the template

      Code:
      zabbix_export:
        version: '6.2'
        date: '2022-12-06T09:46:15Z'
        template_groups:
          -
            uuid: 730ef0b168104e01bc69354413763243
            name: Templates/Linux
        templates:
          -
            uuid: 2e991dc85cec49749a4f785517bd1d46
            template: 'Linux zerto by Zabbix agent'
            name: 'Linux zerto by Zabbix agent'
            groups:
              -
                name: Templates/Linux
            items:
              -
                uuid: 15cd04803d16498394719971d52ac22a
                name: 'Zerto Alert Json'
                key: 'system.run["REMOVED"]'
                delay: 5m
                history: 14d
                trends: '0'
                value_type: TEXT
            discovery_rules:
              -
                uuid: 94976797298a4595abff752d6bcb8b1c
                name: 'Zerto Alerts'
                type: DEPENDENT
                key: zerto.alert
                delay: '0'
                filter:
                  conditions:
                    -
                      macro: '{#HELPIDENTIFIER}'
                      value: LIC0007
                      operator: NOT_MATCHES_REGEX
                      formulaid: A
                lifetime: 1d
                item_prototypes:
                  -
                    uuid: 489aa7e54af045a5bea39a8de4cd5321
                    name: 'Zerto Alert Description "{#DESCRIPTION}"'
                    type: DEPENDENT
                    key: 'zerto.alert.description[{#DESCRIPTION}]'
                    delay: '0'
                    history: 14d
                    trends: '0'
                    value_type: TEXT
                    preprocessing:
                      -
                        type: JSONPATH
                        parameters:
                          - '$[?(@.Description==''{#DESCRIPTION}'')].Description'
                    master_item:
                      key: 'system.run["REMOVED"]'
                  -
                    uuid: 1ee9f7d87f5a429c972ff28a2ede50dd
                    name: 'Zerto Alert Level "{#DESCRIPTION}"'
                    type: DEPENDENT
                    key: 'zerto.alert.level[{#DESCRIPTION}]'
                    delay: '0'
                    history: 14d
                    trends: '0'
                    value_type: TEXT
                    preprocessing:
                      -
                        type: JSONPATH
                        parameters:
                          - '$[?(@.Description==''{#DESCRIPTION}'')].Level'
                    master_item:
                      key: 'system.run["REMOVED"]'
                    trigger_prototypes:
                      -
                        uuid: 34a0f18789f54603b058e1793953916d
                        expression: 'last(/Linux zerto by Zabbix agent/zerto.alert.level[{#DESCRIPTION}])="Error"'
                        name: 'Zerto Alert Error {#DESCRIPTION}'
                        discover: NO_DISCOVER
                        priority: HIGH
                      -
                        uuid: 91eba10bbf644e899ec767e2ca7b1cbf
                        expression: 'nodata(/Linux zerto by Zabbix agent/zerto.alert.level[{#DESCRIPTION}],1)=1'
                        name: 'Zerto Alert Error {#DESCRIPTION} NODATA'
                        discover: NO_DISCOVER
                        priority: INFO
                      -
                        uuid: 6ac2eef0b16d4646bfc14e7a5f71d458
                        expression: 'last(/Linux zerto by Zabbix agent/zerto.alert.level[{#DESCRIPTION}])="Warning"'
                        name: 'Zerto Alert Warning {#DESCRIPTION}'
                        discover: NO_DISCOVER
                        priority: HIGH
                master_item:
                  key: 'system.run["REMOVED"]'
                lld_macro_paths:
                  -
                    lld_macro: '{#DESCRIPTION}'
                    path: $.Description
                  -
                    lld_macro: '{#LEVEL}'
                    path: $.Level
                  -
                    lld_macro: '{#HELPIDENTIFIER}'
                    path: $.HelpIdentifier
      ​

      Comment

      • Markku
        Senior Member
        Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
        • Sep 2018
        • 1781

        #4
        expression: 'nodata(/Linux zerto by Zabbix agent/zerto.alert.level[{#DESCRIPTION}],1)=1'
        This will trigger any time data hasn't been received for one second, so you need to increase that.

        Markku

        Comment

        Working...