Hi,
I am trying to setup a way to monitor the number of active rules from iptables,
I created an item:
and the count-rules.sh:
I was trying to setup a graph to display the rules loaded, if there was a change, then it means something was wrong.
but I am having permission issues.
is there a better way to monitor rules in IPtables, or to monitor changes to iptables?
I looked at the templates, but was unable to find any template for iptables.
I am trying to setup a way to monitor the number of active rules from iptables,
I created an item:
Code:
system.run[/home/zabbix/count-rules.sh]
Code:
#!/bin/bash # Use the iptables-save command to get a list of all rules and count the lines. rule_count=$(iptables-save | grep -c "^\-A") echo $rule_count
but I am having permission issues.
is there a better way to monitor rules in IPtables, or to monitor changes to iptables?
I looked at the templates, but was unable to find any template for iptables.
Comment