Timelion - How to calculate and viszualize " Mbps " using netflow data

(Methsri Wickramarathna) #1

Hi All,
Currently am using Logstash , Elasticsearch & Kibana to gather and visualize Netflow data from few of our gateway routers.
With Netflow data am receiving " netflow.in_bytes " filed which contains the bytes of data. I was trying to put that data in to a timelion and using the following function to calculate the Mbps.

But the output am getting is not accurate. Can anyone advise me on this ?

.es(timefield=@timestamp, metric=sum:netflow.in_bytes).derivative().multiply(8).divide(1048576).divide(60).lines(fill=2, width=1).color(green).label("Inbound traffic").title("Network traffic (MB/s)")

(Methsri Wickramarathna) #2

Any help ?

(Tyler Smalley) #3

If you are starting with bytes, you just need to divide by 1000000 to get megabytes.

(Christian Dahlqvist) #4

In what way is the result not accurate?

When I have calculated volume per second I have not used the 'derivative' funktion and have replaced 'divide(60)' by the 'scale_interval' function, which can adapt to changing aggregation intervals, as described in this thread.

(Methsri Wickramarathna) #5

Thanks tyler,
converting in to MB can be done using devide() function. But by using "netflow.in_bytes" the out come is not accurate .

(Methsri Wickramarathna) #6

Dear Christian,
Thanks for the update!!!
I have tried the function mentioned in that thread but the out come is not accurate.

.es(index=logstash*, metric='sum:bytes').divide(1048576).scale_interval('1s').title('MB per second')

I have used the it as below.

.es(index=logstash*, metric='sum:netflow.in_bytes').divide(1048576).scale_interval('1s').title('MB per second')

(Christian Dahlqvist) #7

In what way is it not accurate? What are you comparing it to?

(Methsri Wickramarathna) #9

Sorry for the late reply !!!
Following is my timelion function. Am collecting Netflow data from few sources and I want to calculate the Bandwidth usage ( MBps ) subnet wise.

.es(index=logstash*, metric='sum:netflow.in_bytes').divide(1048576).scale_interval('1s').title('MB per second')

(Christian Dahlqvist) #10

That does not really answer any of the questions I asked, so I am not sure how I can help further.

(Methsri Wickramarathna) #11

Sorry !!!
It's like this , I want to know the usage ( MBps ) of a subnet ( eg: ). This subnet is devided in to /29's and given to some other devices.

I have a CACTI system which will record the individual usage of devices.

When I apply the above timelion function the output I get is not even approximately close to what I see in CACTI.

Please let me know any other info you needed.

(Christian Dahlqvist) #12

Is your CACTI system based on the same data you are recording in Elasticsearch? Is the granularity the same?

(Methsri Wickramarathna) #13

No it collect data via SNMP.

(Christian Dahlqvist) #14

How large is the difference? Does it shrink if you average out over a longer period? Are you able to see if the raw data used contain the same data?

(Methsri Wickramarathna) #15

Am checking it for a 15min window.

Both systems showing totally different values. CACTI system normally closed to actual usage of that device. on the the other hand Timelion showing irrelevant info.

Am not think it's shrink or anything....

I didn't get the last question , can you explain how I can check it ?

(Christian Dahlqvist) #16

I do not know how you would check the underlying data in your CACTI system and compare this to the data reported to Elasticsearch. Can you show us what the data looks like and how large the difference is?

(system) #17

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.