<br>yes, please share it.<br><br><div><span class="gmail_quote">On 9/5/07, <b class="gmail_sendername">Iain Conochie</b> <<a href="mailto:iain@shihad.org">iain@shihad.org</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Henrik Stoerner wrote:<br>> On Wed, Sep 05, 2007 at 03:37:09PM +1000, Allan wrote:<br>><br>>> Just wondering if anyone has done or has seen a way of being able to<br>>> graph the number of references to an iptables chain ?
<br>>> 'iptables -L spammer' returns currently for example<br>>><br>>> # iptables -L spammer<br>>> Chain spammer (2269 references)<br>>> target     prot opt source               destination
<br>>> LOG        all  --  anywhere             anywhere            LOG level<br>>> debug prefix `Spammer: '<br>>> DROP       all  --  anywhere             anywhere<br>>><br>>><br>>> Unfortunately I have zero skills when it comes to rrd and the like so
<br>>> I'm looking for something similar I can change to suit or for someone to<br>>> be really generous and help me out.<br>>><br><br>If anyone wants it I have a (fairly) generic script that will graph the
<br>number of bytes an IP tables firewall is processing, with input output<br>and forward in different colours :)<br><br>Cheers<br><br>Iain<br><br>><br>> Run a Hobbit client-side script that does:<br>><br>>    #!/bin/sh
<br>>    REFCOUNT=`iptables -L spammer | grep "^Chain spammer" | awk '{print $3}'|cut -c2-`<br>><br>>    $BB $BBDISP "status $MACHINE.spammers green `date`<br>><br>>    references: $REFCOUNT
<br>>    "<br>><br>>    exit 0<br>><br>> This generates a "spammers" status with the number from the "references"<br>> line in the iptables output. On the Hobbit server you then feed this
<br>> through the "ncv" module - see the description in the "Custom graphs"<br>> help page on your Hobbit server or here:<br>> <a href="http://www.hswn.dk/hobbit/help/howtograph.html">http://www.hswn.dk/hobbit/help/howtograph.html
</a><br>><br>><br>> Regards,<br>> Henrik<br>><br>><br>> To unsubscribe from the hobbit list, send an e-mail to<br>> <a href="mailto:hobbit-unsubscribe@hswn.dk">hobbit-unsubscribe@hswn.dk</a><br>>
<br>><br><br><br>To unsubscribe from the hobbit list, send an e-mail to<br><a href="mailto:hobbit-unsubscribe@hswn.dk">hobbit-unsubscribe@hswn.dk</a><br><br><br></blockquote></div><br><br clear="all"><br>-- <br>Thanks<br>
Sabeer MZ