You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[[inputs.exec]]
name_prefix = "prod.compute_services.machine_metrics."## Commands arraycommands = ["PowerShell -Command "(((C:\test\telegraf.exe --version) -split '\s+')[1] | ForEach-Object{$M = $_});$M.Remove($M.LastIndexOf('.'),1)| Write-Output | ForEach-Object{[float]$end = $_};$end""]interval = "30s"## Timeout for each command to complete.timeout = "5s"## measurement name suffix (for separating different commands)#name_suffix = "_mycollector"name_override = "TelegrafVersion"## Data format to consume.## Each data format has its own unique set of configuration options, read## more about them here:## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.mddata_format = "value"data_type = "float"
System info:
Telegraf 1.11.0 Windows 10
Steps to reproduce:
Use inputs.exec to run a CMD command that calls PowerShell.
Expected behavior:
Runs the command and accepts the output, then sends the data to the monitoring appliance. This command works normally in CMD or when Telegraf calls it from a .bat file.
Actual behavior:
The Telegraf service doesn't start.
Additional info:
For security reasons we don't want to deploy out a .bat file for inputs.exec. Instead we would like to just place the CMD command inside the command block of inputs.exec.
The text was updated successfully, but these errors were encountered:
Relevant telegraf.conf:
System info:
Telegraf 1.11.0 Windows 10
Steps to reproduce:
Expected behavior:
Runs the command and accepts the output, then sends the data to the monitoring appliance. This command works normally in CMD or when Telegraf calls it from a .bat file.
Actual behavior:
The Telegraf service doesn't start.
Additional info:
For security reasons we don't want to deploy out a .bat file for inputs.exec. Instead we would like to just place the CMD command inside the command block of inputs.exec.
The text was updated successfully, but these errors were encountered: