[collectd] Traffic accounting and Collectd
Benjamin Schweikert
ben at beert.de
Fri Apr 10 08:52:13 CEST 2015
Ok Stuart, I try to narrow it down.
I am quite new to collectd and rrd and so I need some practical advice
how I can get my collected data into collectd. I could do most of it
with the iptables plugin, but how to handle the dynamic amount of ips?
And the iptables plugin "only" shows the current speed [kbits/s] but not
to total amount - is there a way to do this with the iptables plugin?
Another option would be to use the exec plugin, but how to solve the
problem with the dynimc range of available ips?
Any hints like, "I solved it this way.." or something similar would be
great!
Best regards
Ben
Am 2015-04-10 08:45, schrieb Stuart Cracraft:
> Ben,
>
> My immediate input is that your question is a bit general.
>
> Please narrow it down.
>
> --Stuart
>
>> On Apr 9, 2015, at 11:38 PM, Benjamin Schweikert <ben at beert.de> wrote:
>>
>> Dear list,
>> I got a question on how to do this best. I wrote a (bash) script which executed every minute collects the traffic to and from external for each ip address and also calculates the overall traffic. The is based on iptables and based on the arp table. So every time the script es executed it checks what ips are available. A typical output would be something like this:
>>
>> 2015.04.01-19:30:01 192.168.2.1 0 0 28035 76
>> 2015.04.01-19:30:01 192.168.1.100 481 658 161480 131296
>> 2015.04.01-19:30:01 192.168.0.8 28 109 102670 13092
>> 2015.04.01-19:30:01 192.168.0.2 1366 29443 1340488 1767049
>> 2015.04.01-19:30:02 192.168.0.1 0 0 0 0
>> 2015.04.01-19:30:02 192.168.0.4 0 0 0 0
>> 2015.04.01-19:30:02 188.193.78.254 0 0
>> 2015.04.01-19:30:02 192.168.1.106 45 28 27471 1731
>> 2015.04.01-19:30:02 192.168.1.101 0 0 24662 0
>> 2015.04.01-19:30:03 192.168.0.9 5 8 25732 1108
>> 2015.04.01-19:30:03 192.168.0.3 0 0 0 0
>> 2015.04.01-19:30:03 192.168.0.5 0 0 0 0
>> 2015.04.01-19:30:03 192.168.1.107 0 0 0 0
>> 2015.04.01-19:30:04 192.168.0.176 0 0 3799 102
>> 2015.04.01-19:30:04 192.168.0.7 0 0 11845 0
>> 2015.04.01-19:30:04 192.168.2.2 0 0 0 0
>> 2015.04.01-19:30:04 ALL 1925 30246 1726182 1914454
>>
>> $IP $UP $DOWN $TOTALUP $TOTALDOWN [bytes]
>>
>> What do you suggest to include this in collectd because I want to use a gui like CGP to visualize it. Currently I am creating my own rrd graphs but the rrd files are not compatible with the iptables plugin.
>>
>> Thanks for the help.
>>
>> Best regards
>> Ben
>>
>> _______________________________________________
>> collectd mailing list
>> collectd at verplant.org
>> http://mailman.verplant.org/listinfo/collectd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20150410/14dcae61/attachment-0001.html>
More information about the collectd
mailing list