Template Zabbix

Started by ludarkstar99, January 13, 2024, 12:41:48 PM

Previous topic - Next topic
January 13, 2024, 12:41:48 PM Last Edit: November 01, 2024, 03:27:08 PM by ludarkstar99
TL;DR
Template Zabbix para monitoramento do OPNsense: https://github.com/sysadminbr/zabbix-templates.


Olá pessoal,

Passando para anunciar que construí um template zabbix para monitoramento de itens do OPNsense.

O template é baseado na API do OPNSense e não tem nenhuma dependência.

Long live to opensource 🌌

log
2024-11-01: link updated as github repo was migrated.
2024-03-10: repositório novo sem herdar código legado do rbicelli.
- nothing broken, nothing missing;

2024-02-15: Template atualizado e implementado o monitoramento via API do OPNSense.
- nothing broken, nothing missing;

February 24, 2024, 11:50:27 AM #2 Last Edit: February 26, 2024, 02:29:27 PM by burghy
great job. monitoring ipsec?
Your approach doesn't seem bad to me

i test your template, for ipsec i have modify status because, 0 is disconnect and 1 is connect.

the tunnel phase 2 is corret data, but the tunnel status i have no data.



there is another user who is developing the template agent for zabbix.  you could join forces!

https://github.com/dblanque/opnsense-zabbix/tree/main

Hi burghy, sorry for the delay.
I could not reproduce the problem, using ipsec instances or "old tunnel config".
In both configuration types i had the correct tunnel data (0 for tunnel connected), and 1 for disconnect.

Attach 1: data received for the item.
Attach 2: item data for fase2 disconnect.
Attach 3: after the tunnel gets offline the triggers screams.

- nothing broken, nothing missing;

Regarding P1 not receiving any data, after i disconnect the tunnel that's expected behavior: P1 no data, P2 triggers a disconnection.
After reconnecting the tunnel, P1 starts receiving data again, and P2 shows connected (again).
- nothing broken, nothing missing;

i have create a issue on github. thanks you so much

Hey Guys! Nice to see that things are going well on this topic, but I want to ask you a favor: move this thread to the general forum (English). This session is dedicated to Portuguese language discussions.

Thanks!
Cloudfence Open Source Team

citrait offline project

EN
sorry about that. the github account was split from personal/business projects.
-----------------------------------------------------------------------------------------
PT
o repositório foi movido devido a divisão de projetos pessoais/da empresa.

https://github.com/sysadminbr/zabbix-templates
- nothing broken, nothing missing;

Quote from: ludarkstar99 on November 01, 2024, 03:29:35 PM
EN
sorry about that. the github account was split from personal/business projects.
https://github.com/sysadminbr/zabbix-templates
Thx, bro
you saved me)

There is one question though, how to connect opnsense, for zabbix proxy?

Quote from: azasly on November 21, 2024, 05:35:19 PM
There is one question though, how to connect opnsense, for zabbix proxy?
work without problem. i have zabbix proxy and agent installed on opn

Quote from: burghy on November 21, 2024, 05:49:34 PM
Quote from: azasly on November 21, 2024, 05:35:19 PM
There is one question though, how to connect opnsense, for zabbix proxy?
work without problem. i have zabbix proxy and agent installed on opn
I am seeing this error
Cannot evaluate function nodata(/opnsensehost/opnsense.gateways.status,3m): item does not have enough data after server start or item creation.

November 22, 2024, 06:36:21 AM #13 Last Edit: November 22, 2024, 06:42:26 AM by azasly
pls help :(

Validated on zabbix 7.0.
the setup is straightforward.

1. import the template in zabbix.
2. create a new user in OPNsense named after zabbix-monitoring.
3. set the user above to have the read privileges on all *status pages and firmware pages.
4. create a api key for this user.
5. in the host, associate the template and fill the MACROS with the api key and secret. do not forget to set the url too (without leading "/")
6. make sure there is an "agent interface" with valid address in the host (on zabbix of course) for the opnsense host.
7. that's it.

video on youtube (pt-br): https://youtu.be/errEM7atMlw
https://github.com/sysadminbr/zabbix-templates
- nothing broken, nothing missing;