lesovsky / zabbix-extensions

Zabbix additional monitoring modules
BSD 3-Clause "New" or "Revised" License
316 stars 230 forks source link

'formulaid' tag is missing in keepalived template #97

Open DiogoCruz40 opened 2 years ago

DiogoCruz40 commented 2 years ago

When importing template keepalived to zabbix, it fails. Says: Invalid tag "/zabbix_export/templates/template(1)/discovery_rules/discovery_rule(1)/filter/conditions/condition(1)": the tag "formulaid" is missing.

stephankn commented 2 years ago

Hello @DiogoCruz40 , that is quite sad to hear. Parts of this repository holds older templates which are sort of unmaintained. The keepalived is one of them. I keep the PostgreSQL one maintained, as I can test it. For keepalived I have no such testing possibility.

The problem you are facing is caused by a problem of Zabbix itself where it fails to import very old templates: https://support.zabbix.com/browse/ZBX-19968

Besides waiting for Zabbix to fix the import bug, one solution would be if you or someone would update the template to a more recent LTS version of Zabbix.

Maybe simply either removing the formula tag or specifying as empty will make it work. Given that the template contains only two items, re-creating them in Zabbix 5.0 and exporting the template might be easier.

If someone provides a working template, I am happy to merge it in. I could only do a blind fix without verification which I do not want to do.

For this specific case: It runs a discovery rule on key keepalived.addr.discovery[/etc/keepalived/keepalived.conf]. With this it creates items for each discovered address with key keepalived.addr.availability[{#KADDR}]