I'm trying to add an elastic search template for filebeat:
class { '::elasticsearch':
autoupgrade => true,
package_url => 'https://download.elasticsearch.org/elasticsearch/release/org/elasticsearch/distribution/deb/elasticsearch/2.2.0/elasticsearch-2.2.0.deb',
require => Class['javadevelopmentkit']
}
elasticsearch::instance { 'es-01':
config => {
'network.host' => $::ipaddress
},
require => Class['::elasticsearch']
}
elasticsearch::template { 'filebeat-*':
host => $::ipaddress,
port => 9200,
file => template('bridge/elasticsearch-template-filebeat.json')
}
However, I get the following error, any ideas what I'm doing wrong?
Error: Parameter source failed on File[/usr/share/elasticsearch/templates_import/elasticsearch-template-filebeat.json]: Could not understand source {
"mappings": {
"_default_": {
"_all": {
"enabled": true,
"norms": {
"enabled": false
}
},
"dynamic_templates": [
{
"template1": {
"mapping": {
"doc_values": true,
"ignore_above": 2056,
"index": "analyzed",
"type": "{dynamic_type}"
},
"match": "*"
}
}
],
"properties": {
"@timestamp": {
"type": "date"
},
"message": {
"type": "string",
"index": "analyzed"
},
"offset": {
"type": "long",
"doc_values": "true"
}
}
}
},
"settings": {
"index.refresh_interval": "30s"
},
"template": "filebeat-*"
}: bad URI(is not URI?): %7B%0A%20%20%22mappings%22:%20%7B%0A%20%20%20%20%22_default_%22:%20%7B%0A%20%20%20%20%20%20%22_all%22:%20%7B%0A%20%20%20%20%20%20%20%20%22enabled%22:%20true,%0A%20%20%20%20%20%20%20%20%22norms%22:%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22enabled%22:%20false%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D,%0A%20%20%20%20%20%20%22dynamic_templates%22:%20[%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22template1%22:%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22mapping%22:%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22doc_values%22:%20true,%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22ignore_above%22:%202056,%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22index%22:%20%22analyzed%22,%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22:%20%22%7Bdynamic_type%7D%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D,%0A%20%20%20%20%20%20%20%20%20%20%20%20%22match%22:%20%22*%22%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20],%0A%20%20%20%20%20%20%22properties%22:%20%7B%0A%20%20%20%20%20%20%20%20%22@timestamp%22:%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22:%20%22date%22%0A%20%20%20%20%20%20%20%20%7D,%0A%20%20%20%20%20%20%20%20%22message%22:%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22:%20%22string%22,%0A%20%20%20%20%20%20%20%20%20%20%22index%22:%20%22analyzed%22%0A%20%20%20%20%20%20%20%20%7D,%0A%20%20%20%20%20%20%20%20%22offset%22:%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22:%20%22long%22,%0A%20%20%20%20%20%20%20%20%20%20%22doc_values%22:%20%22true%22%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D,%0A%20%20%22settings%22:%20%7B%0A%20%20%20%20%22index.refresh_interval%22:%20%2230s%22%0A%20%20%7D,%0A%20%20%22template%22:%20%22filebeat-*%22%0A%7D at /home/ubuntu/Bridge.Puppet/modules/elasticsearch/manifests/template.pp:125
↧