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
...
run test.sh directly
[app@centos telegraf]$ ./test.sh
multi_proc,tag=tagvalue ias_m=64896
but telegraf.log does not work, cannot read the value
[app@centos telegraf]$ tail -f /var/log/telegraf/telegraf.log
2019-07-12T06:42:08Z E! [inputs.exec]: Error in plugin: metric parse error: expected field at 1:31: "multi_proc,tag=tagvalue ias_m="
[app@centos telegraf]$ sudo -u telegraf ./test.sh
Could not attach to 16781
(standard_in) 1: syntax error
multi_proc,tag=tagvalue ias_m=
user telegraf doesnot support jstat?
Expected behavior:
Actual behavior:
[inputs.exec]: Error in plugin: metric parse error
Additional info:
The text was updated successfully, but these errors were encountered:
Relevant telegraf.conf:
System info:
Steps to reproduce:
[[inputs.exec]]
commands = [
"/data/telegraf/test.sh"
]
test.sh file
#!/bin/sh
ias_pid=16781
heap=
/nemo/jdk8/bin/jstat -gc $ias_pid|tail -n1
ias_m=
echo "$heap"|awk -F " " '{print $9}'
tempv=
echo "scale=0; $ias_m/1"|bc
#tempv=64100.1
echo "multi_proc,tag=tagvalue ias_m=$tempv"
run test.sh directly
[app@centos telegraf]$ ./test.sh
multi_proc,tag=tagvalue ias_m=64896
but telegraf.log does not work, cannot read the value
[app@centos telegraf]$ tail -f /var/log/telegraf/telegraf.log
2019-07-12T06:42:08Z E! [inputs.exec]: Error in plugin: metric parse error: expected field at 1:31: "multi_proc,tag=tagvalue ias_m="
[app@centos telegraf]$ sudo -u telegraf ./test.sh
Could not attach to 16781
(standard_in) 1: syntax error
multi_proc,tag=tagvalue ias_m=
user telegraf doesnot support jstat?
Expected behavior:
Actual behavior:
[inputs.exec]: Error in plugin: metric parse error
Additional info:
The text was updated successfully, but these errors were encountered: