Enable and disable metrics based on your hardware

Thanks to jpowers who made me discover the Telegram plugin for Windows (here) I am implementing my configuration.

Now I have a problem, I’m implementing GPU monitoring, the machines I would like to monitor don’t all have the same GPU vendor and if I activate monitoring of a card that the system doesn’t have it doesn’t send any metrics.

Is there a way to enable and disable metrics based on your hardware?

What is the actual error you see?

Is there a way to enable and disable metrics based on your hardware?

In general no, it is an all or nothing. This is when I would expect someone to use a configuration management utility to update the config based on what they need to monitor, but I also realize that is not always possible.

This is the error:

PS C:\Program Files\Telegraf> .\telegraf.exe --config .\telegraf.conf
2023-12-01T10:29:21Z I! Loading config: .\telegraf.conf
2023-12-01T10:29:21Z I! Starting Telegraf 1.27.3
2023-12-01T10:29:21Z I! Available plugins: 237 inputs, 9 aggregators, 28 processors, 23 parsers, 59 outputs, 4 secret-stores
2023-12-01T10:29:21Z I! Loaded inputs: cpu disk diskio mem net nvidia_smi sensors system
2023-12-01T10:29:21Z I! Loaded aggregators:
2023-12-01T10:29:21Z I! Loaded processors:
2023-12-01T10:29:21Z I! Loaded secretstores:
2023-12-01T10:29:21Z I! Loaded outputs: influxdb_v2
2023-12-01T10:29:21Z I! Tags enabled: host=ProvaTelegraf
2023-12-01T10:29:21Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:"ProvaTelegraf", Flush Interval:10s
2023-12-01T10:29:21Z W! DeprecationWarning: Value "false" for option "ignore_protocol_stats" of plugin "inputs.net" deprecated since version 1.27.3 and will be removed in 1.36.0: use the 'inputs.nstat' plugin instead
2023-12-01T10:29:21Z E! [telegraf] Error running agent: could not initialize input inputs.nvidia_smi: nvidia-smi not found in "/usr/bin/nvidia-smi" and not in PATH; please make sure nvidia-smi is installed and/or is in PATH
PS C:\Program Files\Telegraf>

Everything reported is correct, the GPU is not there and therefore the drivers are not there.

Yeah this is expected as without that binary the plugin would error constantly.

We prefer this failure to start versus erroring and someone missing it thinking they are collecting data, but not actually collecting it.

I understand the choice.