Trying create index in conf.d with propeties

I have to put the property "index.max_docvalue_fields_search": "1600"

I've tried with query => "index.max_docvalue_fields_search": "1600"

I tried to put index => "max_docvalue_fields_search": "1600"

And also my last attempt was with a template but without success.

``
output {

 elasticsearch {
     hosts => ["localhost: 9200"]
     index => "my_index"
     document_type => "doc"
     template => "/etc/logstash/templates/my_template.json"
     }

}
``

Template file:

PUT my_index { "index.max_docvalue_fields_search": "1600" }

In the last case I get the error:

ERROR logstash.outputs.elasticsearch - Failed to install template. {:message=>"Unrecognized token 'PUT': was expecting ('true', 'false' or 'null')
Can anyone help me?

The template should only contain JSON, the file you provided is not valid JSON with that dev tools syntax at the beginning.

I received a return now that the index has been successfully created, but when I check the kibana this set property does not appear, is it really?

14:09:06.229 [[main]-pipeline-manager] INFO logstash.outputs.elasticsearch - Elasticsearch pool URLs updated {:changes=>{:removed=>[], :added=>[http://mycluster.local:9200/]}}
14:09:06.238 [[main]-pipeline-manager] INFO logstash.outputs.elasticsearch - Running health check to see if an Elasticsearch connection is working {:healthcheck_url=>http://mycluster.local:9200/, :path=>"/"}
14:09:06.386 [[main]-pipeline-manager] WARN logstash.outputs.elasticsearch - Restored connection to ES instance {:url=>#<URI::HTTP:0x4126c5e3 URL:http://mycluster.local:9200/>}
14:09:06.389 [[main]-pipeline-manager] INFO logstash.outputs.elasticsearch - Using mapping template from {:path=>"/etc/logstash/templates/mytemplate.json"}
14:09:06.609 [[main]-pipeline-manager] INFO logstash.outputs.elasticsearch - Attempting to install template {:manage_template=>{"index.max_docvalue_fields_search"=>"1600"}}
14:09:06.614 [[main]-pipeline-manager] INFO logstash.outputs.elasticsearch - New Elasticsearch output {:class=>"LogStash::Outputs::ElasticSearch", :hosts=>[#<URI::Generic:0x55ecea4a URL://mycluster.local:9200>]}
14:09:06.688 [[main]-pipeline-manager] INFO logstash.filters.geoip - Using geoip database {:path=>"/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-filter-geoip-4.1.1-java/vendor/GeoLite2-City.mmdb"}
14:09:06.722 [[main]-pipeline-manager] INFO logstash.pipeline - Starting pipeline {"id"=>"main", "pipeline.workers"=>8, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>5, "pipeline.max_inflight"=>1000}
14:09:06.745 [[main]-pipeline-manager] INFO logstash.pipeline - Pipeline main started
14:09:06.874 [Api Webserver] INFO logstash.agent - Successfully started Logstash API endpoint {:port=>9645}

This option that I'm setting should appear here, right?

image

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