savoirfairelinux / mod-influxdb

Shinken module for exporting data to InfluxDB
GNU Affero General Public License v3.0
13 stars 11 forks source link

nanosecond timestamps? #34

Open lestercheung opened 8 years ago

lestercheung commented 8 years ago

Shinken/influxdb/grafana newbie here.

I'm trying to get the combo to work but noticed that data ingested into influxdb have timestamps in seconds instead of nanoseconds and it's probably the reason I couldn't get grafana to plot anything useful for the metric_* series.

Running:

jesseorr commented 8 years ago

Hi! I am actually trying the exact same thing.

I think if we can modify the module.py properly we can append the precision in seconds, so that InfluxDB recognizes the timestamp properly.

http://stackoverflow.com/questions/33950054/post-simple-value-in-influxdb

jesseorr commented 8 years ago

I modified the module.py file with adjustments to the timestamps that allowed my data to populate properly within InfluxDB.

https://github.com/savoirfairelinux/mod-influxdb/pull/35

Here's the data before and after the adjustments: time value 1970-01-01T00:00:01.45858154Z 61.709 1970-01-01T00:00:01.458581544Z 0.172 2016-03-21T19:07:55Z 0.169 2016-03-21T19:08:00Z 0.153 2016-03-21T19:09:12Z 19.449 2016-03-21T19:10:17Z 61.695 2016-03-21T19:12:39Z 0.185 2016-03-21T19:14:46Z 61.728