Monitoraggio di PfSense con Zabbix
Jump to navigation
Jump to search
Via SNMP
In PfSense aAbilitare il servizio SNMP sull'interfaccia adeguata.
Assegnare il template PfSense via SNMP all'host
Con Template apposito
- Installare sul server Zabbix il template
- Sull'host PfSense, installare lo script da shell ssh o da Diagnostics/Command Prompt:
curl --create-dirs -o /root/scripts/pfsense_zbx.php https://raw.githubusercontent.com/rbicelli/pfsense-zabbix-template/master/pfsense_zbx.php
- Impostare nello Zabbix Agent
Timeout -> 30
- Impostare nello Zabbix Agent
Advanced Features / User Parameters
AllowRoot=1 UserParameter=pfsense.states.max,grep "limit states" /tmp/rules.limits | cut -f4 -d ' ' UserParameter=pfsense.states.current,grep "current entries" /tmp/pfctl_si_out | tr -s ' ' | cut -f4 -d ' ' UserParameter=pfsense.mbuf.current,netstat -m | grep "mbuf clusters" | cut -f1 -d ' ' | cut -d '/' -f1 UserParameter=pfsense.mbuf.cache,netstat -m | grep "mbuf clusters" | cut -f1 -d ' ' | cut -d '/' -f2 UserParameter=pfsense.mbuf.max,netstat -m | grep "mbuf clusters" | cut -f1 -d ' ' | cut -d '/' -f4 UserParameter=pfsense.discovery[*],/usr/local/bin/php /root/scripts/pfsense_zbx.php discovery $1 UserParameter=pfsense.value[*],/usr/local/bin/php /root/scripts/pfsense_zbx.php $1 $2 $3