ConSol-Monitoring / snclient

SNClient+ - Cross platform monitoring agent
MIT License
48 stars 9 forks source link

check_network - metrics #77

Closed jframeau closed 6 months ago

jframeau commented 8 months ago

check_network gives in/out bandwith as ouput.

But metrics are in bytes and associated graphes (say Grafana) are in bytes consequently.

Ex: Name Value
enp1s0_traffic_in 737,073,236c
enp1s0_traffic_out 141,201,248c

image

Wouldn't be preferable to get bandwith directly as metrics ?

jfr

sni commented 8 months ago

Raw data is always better. Your graphing tool can then easily calculate a rate from that. That's way there is the "c / counter" unit. Some graphing tools automatically use a rate function then.

jframeau commented 8 months ago

hmm, this is from stock omd 5.21 + grafana.

I just discovered Derivative function with Grafana, which should be the right way to get traffic rates.

So I imagine now that I need an histou template to set performance graphs as needed.

Le ven. 5 janv. 2024 à 18:26, Sven Nierlein @.***> a écrit :

Raw data is always better. Your graphing tool can then easily calculate a rate from that. That's way there it shows the "c / counter" unit. Some graphing tools automatically use a rate function then.

— Reply to this email directly, view it on GitHub https://github.com/ConSol-Monitoring/snclient/issues/77#issuecomment-1879020195, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADZTQ3NWQR7ZIP3PY5QJULYNAZUJAVCNFSM6AAAAABBOTLEDWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZZGAZDAMJZGU . You are receiving this because you authored the thread.Message ID: @.***>

sni commented 8 months ago

i'll have a look, histou should recognize the counter automatically and apply a rate function.

sni commented 8 months ago

should be fine with tomorrows nightly. I fixed the histou template to support counters as well.

jframeau commented 7 months ago

Nice work with time series !

OMD 5.21~2024-01-11

check_nwc - traffic

image

snclient -traffic

image

what I would like to see :-) check_nwc or nclient - traffic in bit/s

image

The last in not based on Difference but on Derivative function form InfluxDB, with a math applied so bytes are converted as bit.

I wonder if it could be interesting to add a type of panel based on derivative so one could compute rates.

InfluxDB select: derivative(mean("value"), 1s) * 8

sni commented 7 months ago

You are right, difference() is wrong here, switching to non_negative_derivative("1s"). Besides that, if you are not happy with the default template, you can also copy it into the local folder and adjust it to your needs or even create a total custom one.