How constract graph for showing network statistic?

Hello,

I am trying with Grafana, DataSource Elastic with MetricBeat, do a panel that gives me the current network statistic (received and send bytes per second).
May somebody give me a hint or example how to do it?
In MetricBeat I found fields system.network.out.bytes and system.network.in.bytes(https://www.elastic.co/guide/en/beats/metricbeat/6.2/exported-fields-system.html), but they acumulate trafic and doesn’t show current per second.

Metricbeat only provides the accumulated values in network module.
https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-metricset-system-network.html

Isn't it possible to calculate partial values in Grafana?
E.g if you receive metrics every 30 seconds you could get the average traffic using this formula:

(current(system.network.out.bytes) - previous(system.network.out.bytes)) / 30.0

where current() and previous() shows when the event arrived.

Where I have to put this script in Grafana?
I tried Metric -> Options -> Script and just put it into Query(Lucene query) - doesn't work.

It was not a script, only pseudocode. I am sorry, if it was not clear.
I am familiar with Grafana at all. If you have questions in connection with Grafana, I am not sure if it's the right forum for asking.

Ok) Maybe you know such script in Kibana?

I see you asked in Kibana forum. I hope your issue can be solved.

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