Multiple inputs.exec commands each with different data_format, data_type and name_override

Greetings,

I have need for two inputs.exec commands but they are unrelated to one another and have different needs for data_format, data_type and name_override. I know I can state multiple commands under [commands] comma separated but the data_format, data_type and name_override differ. I don’t seem to be able to declare [[inputs.exec]] twice in telegraf.conf

Below is what I need to accomplish, not sure how to properly mash them together. Can anyone suggest how to declare and define tgf_users.sh and zpool_influxdb with differing data_format (value and influx)?

Thanks!

[[inputs.exec]]
commands = [“/usr/local/bin/tgf_users.sh”]
name_override = “current_users”
timeout = “5s”
data_format = “value”
data_type = “string”
interval = “1m”
[[inputs.exec]]
commands = [“/usr/libexec/zfs/zpool_influxdb”]
name_override = “zpool”
timeout = “5s”
data_format = “influx”
interval = “1m”

Hi,

You absolutely should be able to! What error did you get or what leads you to say you cannot?

I’m an idiot is the problem. I copied an example stanza from a webpage and the pasted double quotes were a different character than the standard double quotes and telegraf didn’t like it. Total cockpit error.

Ah, yes I’ve run into that as well. Glad you figured it out though!