rbicelli / pfsense-zabbix-template

Zabbix Template for pfSense
Apache License 2.0
238 stars 107 forks source link

Duplicate Triggers in Gateway Discovery Template #156

Closed GuillaumeHullin closed 4 months ago

GuillaumeHullin commented 8 months ago

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:

  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)
rbicelli commented 8 months ago

Sorry but don't understand your concerns:

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.

GuillaumeHullin commented 8 months ago

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.

rbicelli commented 8 months ago

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...

GuillaumeHullin commented 8 months ago

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.

aalmond-cb commented 4 months ago

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.

rbicelli commented 4 months ago

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