Skip to content
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.

How can I stop "type" in my dynamo table being used as _type in my index? #32

Open
mikebrules opened this issue Mar 9, 2017 · 0 comments

Comments

@mikebrules
Copy link

Hello, I have a "type" field in my data that I DON'T want to be mapped to the index - that is a different field (called assetType). Logstash seems to be taking my "type". I know I could override that by setting document_type in my output, but I have two tables I want to map into two different Elastic indexes in my output - like this;

    output {
      if[type] == 'story' {
        elasticsearch {
          hosts => ["10.0.2.15:9200"]
          index => "storys"
          document_type => "%{assetType}"
          document_id => "%{assetId}"
       }
   }
   stdout {}
  }

but I want to do this (use assetType)

  output {
      if[assetType] == 'story' {
        elasticsearch {
          hosts => ["10.0.2.15:9200"]
          index => "storys"
          document_type => "%{assetType}"
          document_id => "%{assetId}"
       }
   }
   stdout {}
  }

.....but I can't do that, as type is being used automatically, and is the only field I can use in my input....

Does anyone know how I can tell logstash the "type" field is actually my assetType value?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant