How to debug failing POST inserts from Telegraf

I am trying to write to influx through telegraf by send common line protocol entries via UDP, but I see no data points added to my measurement.

I have verified that the database exists in influx:

show databases
name: databases
name


_internal
dvaAPI

I can see telegraf send the messages:
2017-06-09T12:50:37Z D! Output [influxdb] wrote batch of 11 metrics in 579.782s

And I can see the POST received in influx:
[httpd] 127.0.0.1 - - [09/Jun/2017:08:50:37 -0400] “POST /write?consistency=any&db=dvaAPI&rp=rp_1 HTTP/1.1” 204 0 “-” “-” 3c35f741-4d12-11e7-8eab-000000000000 128

But the measurement, videoMetrics, is empty. If I try to add one of the data points manually, I do see the data:

insert videoMetrics,flowid=54,programNum=1,pid=4131 black=0,still=39,MOS=0.00,fesErrs=0,gopLen=12,pts=3407982291 1497012224
select * from videoMetrics
name: videoMetrics
time MOS black fesErrs flowid gopLen pid programNum pts still


1497012224 0 0 0 54 12 4131 1 3.407982291e+09 39

I have turned on trace logging in the influx config file:

Trace logging provides more verbose output around the tsm engine. Turning

this on can provide more useful output for debugging tsm engine issues.

trace-logging-enabled = true

But I don’t see any detail that explains why the POST/write from telegraf is failing. Any suggestions on how I might debug the failure?

thanks…gregj

An update:
the failure seems to have to do with the retention policy and time precision. My retention policy, rp_1, is set for 1 day. If I remove the retention policy from the telegraf config, then the data points show up, but they all have ‘1’ as the timestamp.

select * from videoMetrics
name: videoMetrics
time MOS black fesErrs flowid gopLen host pid programNum pts still


1 0 0 0 46 12 skipperzip 4131 1 3767230118 53
1 0 0 0 54 12 skipperzip 4131 1 3767230118 53

This makes me believe that the precision setting is not passigng thru from telegraf.conf:

By default, precision will be set to the same timestamp order as the

collection interval, with the maximum being 1s.

Precision will NOT be used for service inputs, such as logparser and statsd.

Valid values are “ns”, “us” (or “s”), “ms”, “s”.

precision = “s”

Any ideas? thanks

@greg Have you tried using the fully qualified measurement when querying? Try SELECT * FROM "mydb"."myrp"."measurement". That should help clear up the retention policy issue.

Have you checked the data emitter? Maybe there is an issue there. It might be helpful if you post your whole telegraf config.