Simulate an Elasticsearch node
Primarily interested in providing behavior that mimics the Bulk API to support ingesting data from Beat agents.
Beat agent | Elasticsearch endpoint | Notes |
---|---|---|
filebeat 7.3.1 | GET / | TODO Where is this documented? |
filebeat 7.3.1 | GET /_xpack (?human=false) | Info API |
filebeat 7.3.1 | GET,PUT /_ingest/pipeline/<id> | Ingest APIs |
filebeat 7.3.1 | GET,HEAD,PUT /_template/<id> | Index APIs (Index templates) |
filebeat 7.3.1 | POST /_bulk (/<index>/_bulk) | Bulk API |
Generate a private key and self-signed certificate with:
openssl req -x509 -nodes -newkey rsa:4096 -keyout server.key -out server.crt -subj '/O=Acme'
Then replace http.ListenAndServe with http.ListenAndServeTLS in main.go