]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - config/zabbix_agentd/userparameter_ipfire.conf
suricata: Change midstream policy to "pass-flow"
[people/pmueller/ipfire-2.x.git] / config / zabbix_agentd / userparameter_ipfire.conf
1 # Parameters for monitoring IPFire specific metrics
2 #
3 # Internet Gateway ping timings, can be used to measure "Internet Line Quality"
4 UserParameter=ipfire.net.gateway.pingtime,sudo /usr/sbin/fping -c 3 gateway 2>&1 | tail -n 1 | awk '{print $NF}' | cut -d '/' -f2
5 # Internet Gateway availability, can be used to check Internet connection
6 UserParameter=ipfire.net.gateway.ping,sudo /usr/sbin/fping -q -r 3 gateway; [ ! $? == 0 ]; echo $?
7 # Firewall Filter Forward chain drops in bytes/chain (JSON), can be used for discovery of firewall chains and monitoring of firewall hits on each chain
8 UserParameter=ipfire.net.fw.hits.raw,sudo /usr/local/bin/getipstat -xf | grep "/\* DROP_.* \*/$" | awk 'BEGIN { ORS = ""; print "["} { printf "%s{\"chain\": \"%s\", \"bytes\": \"%s\"}", separator, substr($11, 6), $2; separator = ", "; } END { print"]" }'
9 # Number of currently Active DHCP leases
10 UserParameter=ipfire.dhcpd.clients,grep -s -E 'lease|bind' /var/state/dhcp/dhcpd.leases | sed ':a;/{$/{N;s/\n//;ba}' | grep "state active" | wc -l
11 # Number of Captive Portal clients
12 UserParameter=ipfire.captive.clients,awk -F ',' 'length($2) == 17 {sum += 1} END {if (length(sum) == 0) print 0; else print sum}' /var/ipfire/captive/clients