r***@controlup.com
2018-01-10 16:51:14 UTC
Hii all,
Using latest telegraf (1.5), I am trying to add the output of ps -aux to
the telegraf via inputs.exec
my inputs.exec :
[[inputs.exec]]
commands = [ "/bin/bash /opt/processes.bash" ]
timeout = "5s"
data_format = "json"
/opt/processes.bash :
/bin/ps aux | jq -sR '[sub("\n$";"") | splits("\n") | sub("^ +";"") |
[splits(" +")]] | .[0] as $header | .[1:] | [.[] | [. as $x | range($header
| length) | {"key": $header[.], "value": $x[.]}] | from_entries]'
i do not see the info in the outputs.file (i created an output json file to
see the data, but i is not there).
What am i missing ?
Regard,
Ronen
Using latest telegraf (1.5), I am trying to add the output of ps -aux to
the telegraf via inputs.exec
my inputs.exec :
[[inputs.exec]]
commands = [ "/bin/bash /opt/processes.bash" ]
timeout = "5s"
data_format = "json"
/opt/processes.bash :
/bin/ps aux | jq -sR '[sub("\n$";"") | splits("\n") | sub("^ +";"") |
[splits(" +")]] | .[0] as $header | .[1:] | [.[] | [. as $x | range($header
| length) | {"key": $header[.], "value": $x[.]}] | from_entries]'
i do not see the info in the outputs.file (i created an output json file to
see the data, but i is not there).
What am i missing ?
Regard,
Ronen
--
Remember to include the version number!
---
You received this message because you are subscribed to the Google Groups "InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email to influxdb+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit https://groups.google.com/d/msgid/influxdb/004bfebe-7722-42a1-9120-c3608175be89%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Remember to include the version number!
---
You received this message because you are subscribed to the Google Groups "InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email to influxdb+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit https://groups.google.com/d/msgid/influxdb/004bfebe-7722-42a1-9120-c3608175be89%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.