rbicelli / pfsense-zabbix-template

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

PFSense Active - Wrong PFsense State table on pfsense agent, Solved! #150

Closed LukeShort closed 7 months ago

LukeShort commented 1 year ago

Hi all, just to know, I have correct advanced agent settings in this way:

AllowRoot=1 UserParameter=pfsense.states.max,grep "limit states" /tmp/rules.limits | cut -f4 -d ' ' UserParameter=pfsense.states.current,pfctl -s info | grep "current entries" | 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

Temporary file In PFsense (FreeBSD) is updated only on boot so you need to grep real state table condition.

Zabbix Docker Version Server/Agent: 6.4

Best

Luca

GuillaumeHullin commented 12 months ago

@LukeShort I was wondering why exactly this change.

UserParameter=pfsense.states.current,grep "current entries" /tmp/pfctl_si_out | tr -s ' ' | cut -f4 -d ' '

This works for me and I don't observe what you wrote:

Temporary file In PFsense (FreeBSD) is updated only on boot so you need to grep real state table condition.

Can you explain what you found?