# Problem with allow\_time\_override

**URL:** <https://discuss.elastic.co/t/problem-with-allow-time-override/137993>\
**Category:** Logstash\
**Created:** [June 29, 2018, 2:52pm UTC](https://discuss.elastic.co/t/problem-with-allow-time-override/137993 "2018-06-29T14:52:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tobbis](https://avatars.discourse-cdn.com/v4/letter/t/977dab/32.png) [@Tobbis](https://discuss.elastic.co/u/Tobbis)\
**Post date:** [June 29, 2018, 2:52pm UTC](https://discuss.elastic.co/t/problem-with-allow-time-override/137993/1 "2018-06-29T14:52:38Z")

</div>

I am using a influxdb and are using logstash to filter and send data to the influxdb but I have a problem forwaring the timestamp in my measurements to the influxdb.

I have read a lot of posts that I should use the allow\_time\_override = true and set the time but I cannot get it to work, I get no data in my database when I try to override the time and I see no errors in the logstash log.

This is from my logstash filter:

influxdb {  
host =\> "${INFLUXDB\_HOST}"  
port =\> "${INFLUXDB\_PORT}"  
user =\> "admin"  
password =\> "${INFLUXDB\_PASS}"  
db =\> "recap"  
allow\_time\_override =\> true  
measurement =\> "vm.network"  
send\_as\_tags =\> ["hostname", "infrastructure\_provider", "datacentre\_location", "devicename", "metric\_layer", "test\_id", "machine\_uuid"]  
data\_points =\> {  
hostname =\> "%{[tags][hostname]}"  
infrastructure\_provider =\> "%{[tags][infrastructure\_provider]}"  
datacentre\_location =\> "%{[tags][datacentre\_location]}"  
devicename =\> "%{[tags][devicename]}"  
metric\_layer =\> "%{[tags][metric\_layer]}"  
out\_packets =\> "%{[fields][out\_packets]}"  
out\_bytes =\> "%{[fields][out\_bytes]}"  
out\_errors =\> "%{[fields][out\_errors]}"  
out\_drops =\> "%{[fields][out\_drops]}"  
in\_packets =\> "%{[fields][in\_packets]}"  
in\_bytes =\> "%{[fields][in\_bytes]}"  
in\_errors =\> "%{[fields][in\_errors]}"  
in\_drops =\> "%{[fields][in\_drops]}"  
test\_id =\> "%{[tags][test\_id]}"  
machine\_uuid =\> "%{[tags][machine\_uuid]}"  
time =\> "%{[time]}"  
}  
coerce\_values =\> {  
out\_packets =\> "integer"  
out\_bytes =\> "integer"  
out\_errors =\> "integer"  
out\_drops =\> "integer"  
in\_packets =\> "integer"  
in\_bytes =\> "integer"  
in\_errors =\> "integer"  
in\_drops =\> "integer"  
}  
}

And the script that sends the data has formatted the data as the json format:  
example of output that is sent to the logstash:

"headers" =\> {  
"content\_type" =\> "application/json",  
"request\_path" =\> "/",  
"request\_uri" =\> "/",  
"http\_host" =\> "xxx:yy",  
"http\_connection" =\> "keep-alive",  
"http\_accept" =\> "_/_",  
"content\_length" =\> "496",  
"http\_accept\_encoding" =\> "gzip, deflate",  
"http\_version" =\> "HTTP/1.1",  
"request\_method" =\> "PUT",  
"http\_user\_agent" =\> "python-requests/2.19.1"  
},  
"time" =\> 1530283609242054954,  
"measurement" =\> "vm.network",  
"tags" =\> {  
"metric\_layer" =\> "virtual",  
"test\_id" =\> "1a4daeb6-fe61-40f4-8429-76481faaa484",  
"infrastructure\_provider" =\> "test",  
"machine\_uuid" =\> "d1516d65-595f-48e0-8736-61774ac2f5ec",  
"devicename" =\> "VirtualFunctionEthernet0/6/0",  
"datacentre\_location" =\> "xxx",  
"hostname" =\> "test"  
},  
"host" =\> "xxx",  
"@timestamp" =\> 2018-06-29T14:46:49.300Z,  
"@version" =\> "1"

The time is sent in nanoseconds from 1970-01-01 00:00:00 so it is a very large number but as I have understood it it would be ok since influxdb default input for time is nano\_sec but I was worried when I read on the logstash page about allow\_time\_override:  
[https://www.elastic.co/guide/en/logstash/2.3/plugins-outputs-influxdb.html#plugins-outputs-influxdb-allow\_time\_override](https://www.elastic.co/guide/en/logstash/2.3/plugins-outputs-influxdb.html#plugins-outputs-influxdb-allow_time_override)

"Setting this to true allows you to explicitly set the time column yourself

Note: time must be an epoch value in either seconds, milliseconds or microseconds"

Does it mean That I need to convert the nanosec to microsec?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 27, 2018, 2:52pm UTC](https://discuss.elastic.co/t/problem-with-allow-time-override/137993/2 "2018-07-27T14:52:39Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
