Since the measurement doesn't exist, it seems there's a problem with Telegraf executing the script. Perhaps there's an environment issue? Are you using relative paths in the scripts, for instance?
On Thu, Jun 16, 2016 at 11:03 AM, Quick Query <[email protected]> wrote: > Also, please let me know if there is an alternative way to achieve this - > being able to send metrics via custom scripts? > > Cheers! > > On Thursday, June 16, 2016 at 8:00:59 AM UTC-7, Quick Query wrote: >> >> Just to add on, as per the InfluxDB documentation >> <https://github.com/influxdata/telegraf/tree/master/plugins/inputs/exec>, >> - "The collected metrics will be stored as fields under the measurement >> "exec_mycollector":" >> But, I am not able to view this when I do a "show measurements"! >> >> Cheers! >> >> On Thursday, June 16, 2016 at 6:24:53 AM UTC-7, Quick Query wrote: >>> >>> Hi Everyone. >>> >>> I am trying to use the exec plugin on Telegraf and the script inside >>> just does an "echo date". >>> >>> The Telegraf config is as follows: >>> >>> # Read flattened metrics from one or more commands that output JSON to >>> stdout >>> >>> [[inputs.exec]] >>> >>> # Shell/commands array >>> >>> # Full command line to executable with parameters, or a glob pattern >>> to run all matching files. >>> >>> commands = ["/tmp/test.sh", "/tmp/test2.sh", >>> "/tmp/collect_metrics*.sh"] >>> >>> >>> ## Timeout for each command to complete. >>> >>> timeout = "5s" >>> >>> >>> # Data format to consume. >>> >>> # NOTE json only reads numerical measurements, strings and booleans >>> are ignored. >>> >>> data_format = "json" >>> >>> >>> # measurement name suffix (for separating different commands) >>> >>> name_suffix = "_mycollector" >>> >>> The script works locally (from /tmp/collect_metrics.sh), but its not >>> working for me. >>> Any help is appreciated. >>> >>> Cheers! >>> >>> -- > 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/ce1e62de-3a9c-48a5-a74b-5d49789909a6%40googlegroups.com > <https://groups.google.com/d/msgid/influxdb/ce1e62de-3a9c-48a5-a74b-5d49789909a6%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- Sean Beckett Director of Support and Professional Services InfluxDB -- 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/CALGqCvPxDqDLq4G7XB0tOD0%3DhK7EHOPQ2LA31hiKHrHeC7JmUQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
