Hi all,

I'm trying to capture the json output of a python script using the Exec Input 
Plugin. For some reason, I'm getting the following error when telegraf tries to 
execute the script and collect the metrics:

```
telegraf_1   | 2016-08-02T09:43:00.360767123Z 2016/08/02 09:43:00 ERROR in 
input [exec]: exec: exit status 1 for command '/home/myscript.py'
```

The relevant entry of telegraf.conf file loos like the following:

```
[[inputs.exec]]
  command = "/home/myscript.py"
  data_format = "json"
  name_suffix = "_some_suffix"
  timeout = "10s"
  tag_keys = ["key", "unit"]
```

/home/myscript.py has execution permissions ('chmod +x') and outputs the 
following:

```
{"key": "some_key", "value": 28.214, "unit": "ms"}

```

I've checked that the exit status of running `/home/myscript.py` is 0.


The weirdest part is that, if I run `$ telegraf -config /etc/telegraf.conf` 
-test`, I get a successful output:

```
* Plugin: exec, Collection 1
> exec_some_suffix,host=13ceb7312093,key=some_key,unit=ms value=19.539 
> 1470132272694745614
```

Do you have any idea of what could be happening?

-- 
Remember to include the InfluxDB version number with all issue reports
--- 
You received this message because you are subscribed to the Google Groups 
"InfluxDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
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/b2f591dd-2ea0-494e-864c-4c6a6728d7e0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to