Skip to content

Add $perSecond macro for computing rate for counter-type metrics #78

@JiriHorky

Description

@JiriHorky

First of all, thanks for the great grafana plugin.

What we are missing in our environment is a $perSecond macro that would be very similar to existing $rate macro, but would compute runningDifference of value as well

$rate is now defined as
SELECT t, v/runningDifference(t/1000) vRate FROM

$perSecond should be defined as:
SELECT t, runningDifference(v)/runningDifference(t/1000) vRate FROM

One of the usecase is to see per second network traffic throughput in bytes/s taken from ifconfig (actually collected as a counter type metric by collectd).

Basically, $rate is now usefull for Gauge type metrics, whereas $perSecond would be useful for Counter metrics.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions