[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [hobbit] Graphing number of references to iptables chain
- To: hobbit (at) hswn.dk
- Subject: Re: [hobbit] Graphing number of references to iptables chain
- From: "Sabeer MZ" <sabeer.mz (at) gmail.com>
- Date: Wed, 5 Sep 2007 14:48:44 +0530
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=AnIF4XIkFfoGzAS4M+oa4DeRidfwR4C8nYoiVY9nQe5yKeT7d+m/oFu6ZrdiqdAsm5H9TLNjrSsg5HaFZeLCQkc5AzG+kEfJX0ZOa/BOVhXSvEvBjpi02x4ZrndrEqnaGcTq7rQXGvzEzcwYPRc8fiAIS4J265StThFgZU0Rvjc=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=gabOXLIjEq9W4LXQuMKBOJTBCx29bGBCTYrfZ8ZGDOURAIPcLTAyGvNY2UExulX3A8gefOrKtydVNBmePpBQmCQS9p59FkJj9ud7PYNUNG+mABnj4/HDgCrFTua3dCE4YdsOtCg+jNB/mQAn7yHVRhJkjb7NiJphuDT8Sm8cTHE=
- References: <46DE4085.5010400 (at) zandahar.net> <20070905055836.GA13645 (at) hswn.dk> <46DE7128.2040509 (at) shihad.org>
yes, please share it.
On 9/5/07, Iain Conochie <iain (at) shihad.org> wrote:
>
> Henrik Stoerner wrote:
> > On Wed, Sep 05, 2007 at 03:37:09PM +1000, Allan wrote:
> >
> >> Just wondering if anyone has done or has seen a way of being able to
> >> graph the number of references to an iptables chain ?
> >> 'iptables -L spammer' returns currently for example
> >>
> >> # iptables -L spammer
> >> Chain spammer (2269 references)
> >> target prot opt source destination
> >> LOG all -- anywhere anywhere LOG level
> >> debug prefix `Spammer: '
> >> DROP all -- anywhere anywhere
> >>
> >>
> >> Unfortunately I have zero skills when it comes to rrd and the like so
> >> I'm looking for something similar I can change to suit or for someone
> to
> >> be really generous and help me out.
> >>
>
> If anyone wants it I have a (fairly) generic script that will graph the
> number of bytes an IP tables firewall is processing, with input output
> and forward in different colours :)
>
> Cheers
>
> Iain
>
> >
> > Run a Hobbit client-side script that does:
> >
> > #!/bin/sh
> > REFCOUNT=`iptables -L spammer | grep "^Chain spammer" | awk '{print
> $3}'|cut -c2-`
> >
> > $BB $BBDISP "status $MACHINE.spammers green `date`
> >
> > references: $REFCOUNT
> > "
> >
> > exit 0
> >
> > This generates a "spammers" status with the number from the "references"
> > line in the iptables output. On the Hobbit server you then feed this
> > through the "ncv" module - see the description in the "Custom graphs"
> > help page on your Hobbit server or here:
> > http://www.hswn.dk/hobbit/help/howtograph.html
> >
> >
> > Regards,
> > Henrik
> >
> >
> > To unsubscribe from the hobbit list, send an e-mail to
> > hobbit-unsubscribe (at) hswn.dk
> >
> >
>
>
> To unsubscribe from the hobbit list, send an e-mail to
> hobbit-unsubscribe (at) hswn.dk
>
>
>
--
Thanks
Sabeer MZ