Ad Widget

Collapse

How to monitor iptables rules' count with zabbix

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dsilenco
    Junior Member
    • Aug 2022
    • 1

    #1

    How to monitor iptables rules' count with zabbix

    hey all, how can i monitor my Ubutnu iptables rule count and if reaches some limit it will restart the service. Here is what i did:

    zabbix.agent:
    UserParameter=iptables.rule.count[*],sudo iptables --list --line-numbers | grep DROP | wc -l

    item;
    Key: iptables.rule.count[*]
    Type: Numeric (unassigned)

    Trigger:
    {vgw1-stag:iptables.rule.count[*].count(30)}>1

    No error. Enabled but doesn't do anything.

    Thank you

  • Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    #2
    Try running this command as a zabbix user.
    Try to specify the full paths to wc, grep, etc.

    Comment

    Working...