Flux schema query

Hi-

Versions in use:
InfluxDB: 2.5.1
Telegraf: 1.24.2
Grafana: 9.2.6

I am new to Flux so hopefully I’m explaining this clearly. I have a data source configured using the Windows Performance telegraf plugin.
Data is making it into the database bucket fine.

I am trying to set up a variable in grafana for disks based on flux query to retrieve a servers physicaldisk values.
PhysicalDisk is returned as a value of objectname but can’t figure out how to get to that from a query persepctive.
My query is below. I’ve tried using tagvalue, fieldvalue and other but the query doesn’t seem to like anything after the tag line.
Any help overcoming this hurdle would be infinitely appreciated.

import “influxdata/influxdb/schema”
schema.tagValues(
bucket: “servers”,
tag: “objectname”
)

Thanks

Some additional clarification…I notice that PhysicalDisk returns numerical values of disks which does not help in identifying the disk on the grafana side. LogicalDisk looks to be the better object to identify the desired result. If I query my bucket and select objectname and LogicalDisk and filter on instance, I see drive letters and ‘HardDIskVolume1, 2, etc.’ (for windows devices). Ideally, I’d like to return just the drive letters in the query for the variable (different problem) but still have the same problem trying to query against schema for that information. I’ve gone through the 'Explored data schema" pages on the documentation but can’t seem to find the right combination. (or this could be the wrong approach entirely…but examples i’ve seen online with influxql app seem to go against the schema to collect this data)

Thanks

Hello @bminks,
Can you share the influxql query equivalent that you’re interested in?
I’m having trouble understanding what you’re looking to do.
As for returning just the letters you can use the string package:

Is physicalDisk a tag or a field?
Can you please share the telegraf plugin?

I’m trying to figure out what I’m confused about…

@Jay_Clifford is it apparent to you?

Thank you for responding. I will look at the strings package documentation. The telegraf plug-in is: Windows Performance Counters

Hopefully, I can clarify a bit…I’m trying to create a query for a grafana dashboard variable that returns the disks (really volumes) configured on a server so within the dashboard, each disk (volume) is selectable for reporting. So am looking to return the instances of PhysicalDisk or Preferably LogicalDisk without associated time data for use as variable.

The equivalent Influxql query is below…

SHOW TAG VALUES FROM win_disk WITH KEY=instance WHERE host =~ /$server/