-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Filebeat] Load JSON template 405 Method Not Allowed #31909
Comments
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
Hey @rschirin, you're missing the Try like this: setup.template.name: "filebeat-test"
setup.template.pattern: "filebeat-test*"
setup.template.json.enabled: true
setup.template.json.path: "set-foo.json"
setup.template.json.name: "foo-filebeat" And for {
"index_patterns": ["foo-filebeat*"],
"template": {
"settings": {
"number_of_shards": 1
},
"mappings": {
"_source": {
"enabled": true
},
"properties": {
"host_name": {
"type": "keyword"
},
"created_at": {
"type": "date",
"format": "EEE MMM dd HH:mm:ss Z yyyy"
}
}
},
"aliases": {
"mydata": { }
}
},
"priority": 500,
"version": 3,
"_meta": {
"description": "my custom"
}
} Then run Filebeat with debug logs:
I'll close the issue for now. If it does not work for you, please post here the debug logs and re-open the issue. |
@belimawr I don't suppose you could advise on this same problem for me? Version 7.17.23 I just have nginx, system and mysql modules enabled plus a custom json log I believe auto ILM sorts out the index template?
EDIT:
|
I've tried to reproduce it with Elasticsearch Which version of ES are you using? I noticed that you have Where did you get the request logs you posted at the end from? I also noticed a typo in your CLI regarding enabling debug logs, you need Could you run it again with the following CLI?
This will enable debug logs and log the full URL that Filebeat is calling, on my tests I got:
|
Hey there,
I am trying to import a custom template using a json file from Filebeat.
Below you can find the section related to this operation and also the faced error.
Elasticsearch: 8.2.2
Filebeat: 8.2.2
OS: Container
Step to reproduce:
filebeat.yml
configuration fileerror message:
{"log.level":"error","@timestamp":"2022-06-10T10:21:18.519Z","log.logger":"publisher_pipeline_output","log.origin":{"file.name":"pipeline/client_worker.go","file.line":150},"message":"Failed to connect to backoff(elasticsearch(https://es-3:9200)): Connection marked as failed because the onConnect callback failed: error loading template: failure while checking if template exists: 405 Method Not Allowed: ","service.name":"filebeat","ecs.version":"1.6.0"}
If I try just with
setup.template.enabled:true
, the standard Filebeat template will be loaded properly. If I try only withsetup.template.json.enabled:true
nothing will happen.Taking a look to ES Forum, I found also this discussion without any reply
The text was updated successfully, but these errors were encountered: