Hello, i am trying to run metricbeat setup command to create datastream but i am getting an error
./metricbeat setup --index-management -E output.logstash.enabled=false -E 'output.elasticsearch.hosts=["https://${ES_URL}"]' -E 'output.elasticsearch.ssl.certificate_authorities=[${CA_CERT}]' -E 'setup.template.pattern="metricbeat-8.*"' -E 'setup.template.name="metricbeat"'
Overwriting ILM policy is disabled. Set `setup.ilm.overwrite: true` for enabling.
Exiting: error loading template: failed to put data stream: could not put data stream: 400 Bad Request: {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"no matching index template found for data stream [metricbeat]"}],"type":"illegal_argument_exception","reason":"no matching index template found for data stream [metricbeat]"},"status":400}. Response body: {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"no matching index template found for data stream [metricbeat]"}],"type":"illegal_argument_exception","reason":"no matching index template found for data stream [metricbeat]"},"status":400}
Any ideas how can i specify custom template and pattern without getting this error?
Also i tired as this doc suggested Change the index name | Metricbeat Reference [8.2] | Elastic
To change datastream name but still getting the same error