>in that case, its a gauge ...

That's a counter, node_network_receive_bytes_total is the equivalent in the
node exporter. I take it the expression is meant to be calculating
instantaneous bits received per second?

In PromQL that would be
irate(net_bytes_recv{host=~"$server",interface=~"(vlan|eth|bond|ens).*"}[1m])*8

I think the quantile is a noop, and if it wasn't it'd have been preventing
you from having any useful metrics as rate always needs to be first and you
can't do math on quantiles. Deriv is also not safe to use with counters,
it's only for gauges.
PromQL would have given you an error for this form of query, as it doesn't
make sense.

> and its also used for many other graphs too, like disk :-)

You might want to look for a different dashboard to work from, that
expression is not calculating bits received per second or anything else
meaningful.

Brian

On Sun, 23 Aug 2020 at 22:31, Denny Fuchs <[email protected]> wrote:

> Hi,
>
> in that case, its a gauge ...
>
>
> https://github.com/influxdata/telegraf/blob/master/plugins/inputs/net/NET_README.md
>
> and its also used for many other graphs too, like disk :-)
>
> cu denny
>
> [email protected] schrieb am Freitag, 21. August 2020 um 15:35:58 UTC+2:
>
>> That's a very weird query to be sure.
>>
>> I guess it depends a lot on what net_bytes_recv is. Is the underlying
>> data a gauge of bytes per second? Or is it a counter?
>>
>> On Fri, Aug 21, 2020 at 3:13 PM Denny Fuchs <[email protected]> wrote:
>>
>>> Hello,
>>>
>>> I'm new to Prometheus and trying out Thanos. I'm coming from the
>>> InfluxDB / Telegraf world and I found a Template for Grafana, which is a
>>> fork, we use for InfluxDB.  It is for Victoriametrics and uses in the
>>> Grafana template some functions, PromQL does not have.
>>>
>>> One of them is: abs(ideriv)): On the side from VictoriaMetrics
>>> <https://victoriametrics.github.io/MetricsQL.html>() it means:
>>> "ideriv(m) - for calculating instant derivative for m."
>>>
>>> I have something like:
>>>
>>> abs(ideriv(quantile(0.5,net_bytes_recv{host =~ "$server",interface =~
>>> "(vlan|eth|bond|ens).*"}) by (host,interface)))*8
>>>
>>> Is there a way to get the same, so that I can search/replace this
>>> function ?
>>>
>>> cu denny
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Prometheus Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/prometheus-users/74d24101-1976-4ae8-aa28-8be919d274ebn%40googlegroups.com
>>> <https://groups.google.com/d/msgid/prometheus-users/74d24101-1976-4ae8-aa28-8be919d274ebn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Prometheus Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/prometheus-users/24243ff0-11fb-45f9-a4df-873b3e2b74a5n%40googlegroups.com
> <https://groups.google.com/d/msgid/prometheus-users/24243ff0-11fb-45f9-a4df-873b3e2b74a5n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Brian Brazil
www.robustperception.io

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/CAHJKeLonMOR0zJYrxd5bsZKEuZPThstrOD4nsCe49D4z6A6UjQ%40mail.gmail.com.

Reply via email to