title: Iptables rules and zabbix Item key
body: <p>I have chain of traffic rules in iptables,</p>
  <pre><code>    pkts      bytes target     prot opt in     out     source               destination         
    309231 1770353681 ACCEPT     all  --  *      *       192.168.0.10      0.0.0.0/0           
       146    14940 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:1935
  
  Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
      pkts      bytes target     prot opt in     out     source               destination         
  
  Chain OUTPUT (policy ACCEPT 37686575 packets, 126484725644 bytes)
      pkts      bytes target     prot opt in     out     source               destination         
    275808 18766166 ACCEPT     all  --  *      *       0.0.0.0/0            192.168.0.10     
       139    10129 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp spt:1935
  </code></pre>
  <p>from which we need to count incoming and outgoing traffic and display it all in zabbix.</p>
  <p>When I create an item in Zabbix, for the first chain of rules, then traffic is not counted
  <code> iptables.rule.count[INPUT]</code>
  <code> iptables.rule.count[OUTPUT]</code>
  for the second chain, by port, everything works
  <code> iptables.rule.traffic[INPUT,1935]</code>
  <code>iptables.rule.traffic[OUTPUT,1935]</code>
  What am I doing wrong?</p>
  <p>Zabbix agent conf: iptables.conf
  <code> UserParameter=iptables.rule.count[*],sudo iptables -nvxL $1|grep $2|awk '{print $$1}'</code>
  <code>UserParameter=iptables.rule.traffic[*],sudo iptables -nvxL $1|grep $2|awk '{print $$2}'</code>
  I need to substitute the correct key, but which one?</p>