Page 1 of 1
Monitoring the traffic on hourly basis
Posted: Fri Jul 24, 2015 3:38 am
by seenutn
Hi All,
I am using nagios 3.5.1 on centos 7 and it is working for most of my use cases.
I am able to plot the network usage of an interface in my router using check_snmp plugin. The In/Out octets are collected from router every 2 secs and nagiosgraph is generating the plot. Now my question is how can I calculate the "Bytes Used" using this data? I want to see the bytes used in last hour, last day, last mon, etc.. (Any example configuration is helpful).
Regards,
Seenu.
Re: Monitoring the traffic on hourly basis
Posted: Fri Jul 24, 2015 1:32 pm
by jdalrymple
Are you looking for something like this?
http://www.linuxhacker.at/opensource-pr ... -iftraffic
Total RX Bytes: 102752022.00 B, Total TX Bytes: 244384944.00 B<br>Average
Traffic: 1020.87 B/s (0.0%) in, 967.92 B/s (0.0%) out|inUsage=0.0%;85;100;;
outUsage=0.0%;85;100;; inAbsolut=99581192B;114085069;134217728;;
outAbsolut=241378570B;114085069;134217728;;
Re: Monitoring the traffic on hourly basis
Posted: Mon Jul 27, 2015 12:11 am
by seenutn
Hi,
My requirement is to store the result (offcourse, after calculation) in nagios.
Say, at T1, Tx = 1000 Rx = 500
at T2 (T1 + 5sec), Tx = 1400, Rx = 900
at T3 (T2 + 5s), Tx = 2000, Rx = 1700
.
.
Now I want to store time as well as Tx,Rx (T1, 1000, 500 - T2, 400, 400 - T3, 600, 800 - ...) Nagios already stores this (I am using check_snmp plugin), but how can I tell how many bytes were Rx/Tx in last 10 sec or last 1 hour or so on. (I guess I want some means to retrieve the data stored in nagios, do computation, and store it back).
Regards,
Seenu.
Re: Monitoring the traffic on hourly basis
Posted: Mon Jul 27, 2015 4:14 pm
by tmcdonald
I don't think the plugin posted will work since there does not appear to be any option for specifying a time range. I hate to say it but this sounds like a use case that will require a custom plugin. It will need to know the RRD settings in order to determine how many entries are made in an hour, and then use that to properly calculate usage over time.