trouble using fluent-plugin-influxdb to post data to influxdb

475 views
Skip to first unread message

Fere

unread,
Aug 12, 2015, 7:36:48 PM8/12/15
to Fluentd Google Group
Hi,
I am trying to use fluentd plugin (version 0.2.1)  to post data to influxdb (v9).
Here is my confg file: 

<match sbTopic.influx.sbFromApp>
  type copy
  deep_copy true
 
  <store>
    type influxdb
    host localhost
    port 8086
    dbname testsb
    user fereshteh
    password tehran_1
    use_ssl false
    time_precision m
    remove_tag_prefix sbTopic.    <<<<< whether I remove just that or remove sbTopic.influx.  makes no difference in how the http post is generated 
    flush_interval 10s
  </store>


  <store>
    type file
    path /var/log/td-agent/fl-goodrecs
  </store>

 <secondary>
    type file
    path /var/log/td-agent/sb-fl-adapter-badrecs
  </secondary>  
</match>

Here are the recs writen to a file and sent to influxdb:
 2015-08-11T16:05:31-07:00   sbTopic.influx.sbFromApp    {"testM":22221111}
 2015-08-11T16:05:37-07:00   sbTopic.influx.sbFromApp    {"testM":22221112}
 2015-08-11T16:05:44-07:00   sbTopic.influx.sbFromApp    {"testM":22221113}

Here are the HTTP posts generated by the fluentd-influxdb-plugin:
 [12/Aug/2015:15:47:37 -0700] POST /write?db=testsb&precision=m&u=xxxx&p=yyyyy HTTP/1.1 204 0 - Ruby 215dd7c7-4144-11e5-800c-000000000000 908.094µs
 [12/Aug/2015:15:47:48 -0700] POST /write?db=testsb&precision=m&u=xxxx&p=yyyyy HTTP/1.1 204 0 - Ruby 27f27202-4144-11e5-800d-000000000000 979.449µs

The only impact that posting such logs thru fluentd had in influxdb was that it resulted in influxdb creating a new table named sbFromApp in testdb database. But I am not able to insert any logs (ie. measurement value ) to the table via Fluentd plugin.  

Appreciate any suggestions,
Fereshteh


Mr. Fiber

unread,
Aug 12, 2015, 11:30:29 PM8/12/15
to Fluentd Google Group
But I am not able to insert any logs (ie. measurement value ) to the table via Fluentd plugin.  

How to check this?
I will test your configuration on my env.'


Masahiro

--
You received this message because you are subscribed to the Google Groups "Fluentd Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fluentd+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mr. Fiber

unread,
Aug 13, 2015, 2:39:31 AM8/13/15
to Fluentd Google Group
It seems 'time_precision m' is the cause.
I am checking it deeply.

Mr. Fiber

unread,
Aug 13, 2015, 3:04:25 AM8/13/15
to Fluentd Google Group
From influxdb document, 'm' means minutes.


It seems influxdb ignores invalid larger timestamp records with specified time precision.
Using 'ms', I got invalid time record.

time                            id      load
1970-01-17T15:50:48.936Z        10      1  # ms precision
2015-08-13T06:48:25Z            10      1  # s precision

Since 0.9, influxdb seems to check timestamp value strictly unlike v0.8.
Fluentd will support nano-second resolution.
After that, influxdb plugin should convert timestamp before bulk load.


Fere

unread,
Aug 13, 2015, 12:41:00 PM8/13/15
to Fluentd Google Group
Thanks sooo much.
I removed the precision param and now its posting values.
Reply all
Reply to author
Forward
0 new messages