Telegraf diskio error on Windows

Hi,
I am trying to set up Telegraf to collect data from a windows pc. I am getting a diskio error:
“[inputs.diskio] Error in plugin: error getting disk io info: Incorrect function.”

This is what i have in my config fle:

# Read metrics about disk IO by device
[[inputs.diskio]]
  ## Devices to collect stats for
  ## Wildcards are supported except for disk synonyms like '/dev/disk/by-id'.
  ## ex. devices = ["sda", "sdb", "vd*", "/dev/disk/by-id/nvme-eui.00123deadc0de123"]
  # devices = ["*"]

  ## Skip gathering of the disk's serial numbers.
  # skip_serial_number = true

  ## Device metadata tags to add on systems supporting it (Linux only)
  ## Use 'udevadm info -q property -n <device>' to get a list of properties.
  ## Note: Most, but not all, udev properties can be accessed this way. Properties
  ## that are currently inaccessible include DEVTYPE, DEVNAME, and DEVPATH.
  # device_tags = ["ID_FS_TYPE", "ID_FS_USAGE"]

  ## Using the same metadata source as device_tags, you can also customize the
  ## name of the device via templates.
  ## The 'name_templates' parameter is a list of templates to try and apply to
  ## the device. The template may contain variables in the form of '$PROPERTY' or
  ## '${PROPERTY}'. The first template which does not contain any variables not
  ## present for the device is used as the device name tag.
  ## The typical use case is for LVM volumes, to get the VG/LV name instead of
  ## the near-meaningless DM-0 name.
  # name_templates = ["$ID_FS_LABEL","$DM_VG_NAME/$DM_LV_NAME"]

What could be the problem?

That error comes from gopsutil, the library telegraf users to collect data from disks. What kind of drives do you have and what type of filesystems are on them?

Also are the drives “fixed” meaning local or network or something else? There do seem to be some limitations.

1 Like

I have a local SSD drive with an NTFS file system. The problem was, however, Google Drive.
Everything is working with the configuration set to:
devices = [":C"]
I was able to figure it out thanks to your answer, thank you!

1 Like