# Time outside range and possible syntax error with logstash-influxdb plugin

**URL:** <https://discuss.elastic.co/t/time-outside-range-and-possible-syntax-error-with-logstash-influxdb-plugin/184404>\
**Category:** Logstash\
**Created:** [June 5, 2019, 3:07pm UTC](https://discuss.elastic.co/t/time-outside-range-and-possible-syntax-error-with-logstash-influxdb-plugin/184404 "2019-06-05T15:07:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![naveenrt23](https://avatars.discourse-cdn.com/v4/letter/n/47e85d/32.png) [@naveenrt23](https://discuss.elastic.co/u/naveenrt23)\
**Post date:** [June 5, 2019, 3:07pm UTC](https://discuss.elastic.co/t/time-outside-range-and-possible-syntax-error-with-logstash-influxdb-plugin/184404/1 "2019-06-05T15:07:17Z")

</div>

Hi,

I have been trying to send data from logstash to influxdb through output inlfluxdb plugin and i see parsing error and time out of range error

`Non recoverable exception while writing to InfluxDB {:exception=>#<InfluxDB::Error: {"error":"unable to parse 'requests,clientip=10.106.000.96,repo=api resource=\"/api\token\",resource_name=\"token\",requesttype=\"REQUEST\",method=\"GET\",statuscode=\"200\",username=\"anonymous\",bytes=0i,host=\"SARI-M-C5\",resource_path=\"docker/docker-login/v2/token\",duration=5i,path=\"/test-arti.log\",resource_type=\"docker/token\" 1558726205000000000': time outside range -9223372036854775806 - 9223372036854775806"}`

FILTERS:

Grok,mutate and data filters

```
    grok {
        # Enable multiple matchers
        break_on_match => false

        match => { "message" => "%{DATA:timestamp_local}\|%{NUMBER:duration}\|%{WORD:requesttype}\|%{IP:clientip}\|%{DATA:username}\|%{WORD:method}\|%{DATA:resource}\|%{DATA:protocol}\|%{NUMBER:statuscode}\|%{NUMBER:bytes}" }

        # Extract repo and path
        match => { "resource" => "/%{DATA:repo}/%{GREEDYDATA:resource_path}"}

        # Extract resource name
        match => { "resource_path" => "(?<resource_name>[^/]+$)" }

        # Extract file extension
        match => { "resource_path" => "(?<resource_type>[^.]+$)" }
      }
 #Parse date field
  date {
    timezone => "UTC"
    match => ["timestamp_local" , "yyyyMMddHHmmss"]
    target => "timestamp_object"
  }
  mutate{
  add_field => { "time" => "%{time}"}
  }

```

ruby {  
code =\> "event.set('timestamp', event.get('timestamp\_object').to\_i \* 1000);  
event.set('time',event.get('timestamp\_object').to\_i\*1000000000)"  
}

---

<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 3, 2019, 3:07pm UTC](https://discuss.elastic.co/t/time-outside-range-and-possible-syntax-error-with-logstash-influxdb-plugin/184404/2 "2019-07-03T15:07:22Z")

</div>

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