Skip to content

Elasticsearch sink data_stream @timestamp field overwritten or not recognized ? #15760

Answered by jszwedko
Djeezus asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @Djeezus !

The issue here is that Vector has an internal log schema that determines where to find the timestamp of the log in sinks. By default this field is called timestamp so, in the Elasticsearch sink, it looks for a timestamp field, to send it as @timestamp. This can be changed using the global log_schema.timestamp_key option (note this applies to the entire configuration). Alternatively, you could change your remap transform to be:

  transforms:
    parse_timestamp:
      type: remap
      inputs: [kafka]
      source: |-
        .timestamp = to_timestamp!(del(.@timestamp))

This should put the timestamp where the elasticsearch sink expects to find it.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Djeezus
Comment options

Answer selected by Djeezus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants