Hello! I am attempting to draw a straight line in Grafana like in rrd (in this case the maximum, not 95th percentile):
I have the following query
SELECT non_negative_derivative("bytes-sent", 1s) *8 AS bps FROM "interface/latest/generic-counters" WHERE "interface-name" = 'Bundle-Ether20') AND time >= now() - 24h
time bps
---- ---
2019-07-31T04:50:40.612Z 4186760242.165622
2019-07-31T04:51:10.614Z 4182186443.037131
2019-07-31T04:51:40.616Z 4324680719.9520035
[etc]
I am able to calculate the maximum over the entire range using a sub-query:
SELECT MAX("bps") FROM (SELECT non_negative_derivative("bytes-sent", 1s) *8 AS bps FROM "interface/latest/generic-counters" WHERE "interface-name" = 'Bundle-Ether20') AND time >= now() - 24h)
time max
---- ---
2019-07-31T11:03:11.453Z 10753011808
In order to get Grafana to draw the line I believe I need a result that has the same maximum value on each timestamp. Is this possible?
time bps max
---- --- ---
2019-07-31T04:50:40.612Z 4186760242.165622 10753011808
2019-07-31T04:51:10.614Z 4182186443.037131 10753011808
2019-07-31T04:51:40.616Z 4324680719.9520035 10753011808
[etc]