rbicelli/pfsense-zabbix-template

Duplicate Triggers in Gateway Discovery Template

GuillaumeHullin opened this issue · 6 comments

The trigger prototypes in the 'Template pfSense Active' (Zabbix 6) for gateway discovery appear to be duplicated. Each pair of triggers has slightly different expressions, primarily differing by using the last value or the 3th last in the second trigger of each pair. The affected triggers are:

  • Gateway {#GATEWAY} is down
  • Gateway {#GATEWAY} is forced down
  • High Delay on gateway {#GATEWAY}
  • High packet Loss on {#GATEWAY}
  • Packet Loss on {#GATEWAY}
  1. Is this duplication intentional for some functional reason?
  2. If not, should one of each pair of triggers be removed to prevent redundancy? (I can do the pull request)

Sorry but don't understand your concerns:

  • Gateway {#GATEWAY} is down: gateway is monitored in pfsense and monitoring is reporting that gateway is down
  • Gateway {#GATEWAY} is forced down: gateway is marked down by the pfsense administrator. This raises a low-importance trigger, since is probably intentional
  • High Delay on gateway {#GATEWAY}: lag is not packet loss
  • High packet Loss on {#GATEWAY}: packet loss is above threshold, so critical trigger is fired
  • Packet Loss on {#GATEWAY}: packet loss is under threshold, so warning trigger is fired

If you are interested only in some of that trigger, the right thing to do is disable the trigger on your pfsense host/at template level.

No, the issue is that the triggers are duplicated in the template:

Here is an example for High Delay on gateway {#GATEWAY}. See the following line

                - uuid: fca46e537f144ea49eca155570f8da4d
                  expression: 'last(/Template pfSense Active/pfsense.value[gw_value,{#GATEWAY},status])=2'
                  name: 'High Delay on gateway {#GATEWAY}'
                  priority: WARNING
                  description: 'Gateway is lagging'
                - uuid: faaa981f96444c90accf769c5d1949a7
                  expression: 'last(/Template pfSense Active/pfsense.value[gw_value,{#GATEWAY},status],#3)=2'
                  name: 'High Delay on gateway {#GATEWAY}'
                  priority: WARNING
                  description: 'Gateway is lagging'

There are two triggers for the same thing... only one is the using the last value and the other the 3rd last.

ok, there's something wrong because in my current template the only expression I have is (for example) :

- uuid: faaa981f96444c90accf769c5d1949a7
  expression: 'avg(/Template pfSense Active/pfsense.value[gw_value,{#GATEWAY},status],#3)=2'
  name: 'High Delay on gateway {#GATEWAY}'
  priority: WARNING
  description: 'Gateway is lagging'

So it could be a previous pull request gone sideways...

Alright. well it's a different trigger even cause the one in the repo is using last() and you are using avg(). Avg() makes more sense IMO.

As @GuillaumeHullin mentioned, there are duplicate triggers in the that exist in the Zabbix 6 current master template

You can see the duplicate at lines 851 and 856.

The duplicate triggers do not exist in the Zabbix 4 and Zabbix 5 templates.

Fixed with updated template.
The issue is raised because I was too lax accepting PRs. Will be more careful in the future.