Exclude Google Drive application path on Windows 11 for inputs.diskio plugin

I’m getting this error using the [[inputs.diskio]] plugin.

2026-02-22T15:04:20Z E! [inputs.diskio] Error in plugin: error getting disk io info: Incorrect function.

I believe it’s because I have the Google Drive application installed in Windows 11. When I exit the Google Drive application from the system tray, and the mount path G:\ disappears, the error stops showing up.

How can I configure the [[inputs.diskio]] plugin to explicitly exclude the Google Drive mount path?

Hi @trevor

Instead of excluding G:, you could define only the drives you want monitored like this:

[[inputs.diskio]]
  devices = ["C:", "D:", "E:"]

I believe newer versions allow device filtering:

[[inputs.diskio]]
  device_exclude = ["G:"]

Try both (separately) and see which works for you.

1 Like

Hey @grant1 thanks for getting back so quickly! How did you figure that out? The plugin docs don’t mention those properties. :thinking:

Normally I assume that my sample, generated (not LLM, from telegraf) telegraf config would have shown me all the available options commented out. That’s where I looked first.

Apparently there’s a way to do this with metric filters as well, but I couldn’t figure that out.

My bad. The device_exclude option does not exist.

Does this work?

[[inputs.diskio]]
devices = ["C:", "D:", "E:"]

1 Like

Sorry, I am an idiot, the metric filter approach did actually work. I just had not verified it after I modified it. I’m trying to do too many things at once, as usual.

[[inputs.diskio]]
  [inputs.diskio.tagdrop]
    path = ["G:"]

I would rather use an exclusion filter, as I want to capture all disks attached to my system, if I were to add a future one (eg. external USB disk).

I appreciate your input!

1 Like