Hi, I’m using InfluxDB (latest), Telegraf (latest) to connect my SQL Server (2019) to my Grafana (v7.4.2).
I imported this dashboard, but it’s queries take parameters in InfluxQL. Since my database in Grafana uses Flux, I had to change all my Querys to Flux language.
But I’m having trouble with some parameters, that I can’t find in my InfluxDB bucket.
These parameters are:
- “Recovery Model FULL”
- “Recovery Model BULK_LOGGED”
- “Recovery Model SIMPLE”
- “Network IO waits | Average wait time (ms) | Wait Statistics”
- “Page File Usage (%)”
Another problem that I’m having is with the parameter “is_online”, how receives a boolean, neither Grafana or my InfluxDB can display this info. I receive the error “unsupported input type for mean aggregate: boolean”.
Hello @radins,
Welcome!
You can use the toFloat() function to convert your values to floats or int and then calculate a mean:
import "array"
array.from(rows: [{_time: now(), _value: true}])
|> toFloat()
I’m using the array.from() function so you can have an executable example.
Can you share the full query? Why are you looking to take the mean of a boolean?
Finally, can you describe how you tried to find those parameters in your influxDB bucket? Are they tags, measurements, fields, etc?
1 Like
Hi, first, thanks for your attention
I managed to use the parameter “is_online” using the toFloat() function, thanks
.
I’m searching for those parameters in the ‘Data Explorer’ page, I looked at all fields that i could find, since I don’t know where exactly is the information that I want.
The only clue that I have, are the InfluxQL parameters, in my base grafa dashboard, which are:
- SELECT “total” FROM “Recovery Model FULL” WHERE “servername” =~ /$Instance$/ AND “type” = ‘Database properties’ AND $timeFilter
- SELECT “total” FROM “Recovery Model BULK_LOGGED” WHERE “servername” =~ /$Instance$/ AND “type” = ‘Database properties’ AND $timeFilter
- SELECT “total” FROM “Recovery Model SIMPLE” WHERE “servername” =~ /$Instance$/ AND “type” = ‘Database properties’ AND $timeFilter
- SELECT “value” FROM “Network IO waits | Average wait time (ms) | Wait Statistics” WHERE “servername” =~ /$Instance$/ AND “type” = ‘Performance counters’ AND $timeFilter
- SELECT mean(“Page File Usage (%)”) FROM “Performance metrics” WHERE “servername” =~ /$Instance$/ AND $timeFilter GROUP BY time($interval) fill(null)