# Replace @timestamp with actual timestamp from log file

**URL:** <https://discuss.elastic.co/t/replace-timestamp-with-actual-timestamp-from-log-file/72017>\
**Category:** Logstash\
**Created:** [January 18, 2017, 2:01pm UTC](https://discuss.elastic.co/t/replace-timestamp-with-actual-timestamp-from-log-file/72017 "2017-01-18T14:01:17Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![ivten](https://avatars.discourse-cdn.com/v4/letter/i/58956e/32.png) [@ivten](https://discuss.elastic.co/u/ivten)\
**Post date:** [January 19, 2017, 3:45pm UTC](https://discuss.elastic.co/t/replace-timestamp-with-actual-timestamp-from-log-file/72017/13 "2017-01-19T15:45:19Z")

</div>

```
#------------------------------ Log prospector --------------------------------
- input_type: log
 file is defined twice as this can lead to unexpected behaviour.
  paths:
    - /var/log/my-log.json

  ### JSON configuration

  # Decode JSON options. Enable this if your logs are structured in JSON.
  # JSON key on which to apply the line filtering and multiline settings. This key
  # must be top level and its value must be string, otherwise it is ignored. If
  # no text key is defined, the line filtering and multiline features cannot be used.
  #json.message_key:
  json.message_key: message

  # By default, the decoded JSON is placed under a "json" key in the output document.
  # If you enable this setting, the keys are copied top level in the output document.
  #json.keys_under_root: false
  json.keys_under_root: true

  # If keys_under_root and this setting are enabled, then the values from the decoded
  # JSON object overwrite the fields that Filebeat normally adds (type, source, offset, etc.)
  # in case of conflicts.
  #json.overwrite_keys: false

  # If this setting is enabled, Filebeat adds a "json_error" key in case of JSON
  # unmarshaling errors or when a text key is defined in the configuration but cannot
  # be used.
  #json.add_error_key: false

 
#------------------------------- Redis output ---------------------------------
output.redis:
  # Boolean flag to enable or disable the output module.
  enabled: true

  # The list of Redis servers to connect to. If load balancing is enabled, the
  # events are distributed to the servers in the list. If one server becomes
  # unreachable, the events are distributed to the reachable servers only.
  hosts: ["10.10.10.20"]

  # The Redis port to use if hosts does not contain a port number. The default
  # is 6379.
  #port: 6379

  # The name of the Redis list or channel the events are published to. The
  # default is filebeat.
  #key: filebeat
  key: my-test

```

I've omitted most commented out lines.

---

_[View the full topic](https://discuss.elastic.co/t/replace-timestamp-with-actual-timestamp-from-log-file/72017)._
