The index name is configurable:
https://github.com/micrometer-metrics/micrometer/blob/a0e46fd4438dbcb9aeead1a5ebbf59d9c5bba0fb/implementations/micrometer-registry-elastic/src/main/java/io/micrometer/elastic/ElasticMeterRegistry.java#L291-L294
However, the index pattern in the template is not:
https://github.com/micrometer-metrics/micrometer/blob/a0e46fd4438dbcb9aeead1a5ebbf59d9c5bba0fb/implementations/micrometer-registry-elastic/src/main/java/io/micrometer/elastic/ElasticMeterRegistry.java#L93-L95
This results in two issues:
metrics, the template won't applymetrics* is too broad and prevents me from using indices like metrics-something-* in other applications (in my case, the config of _source breaks the other application. See #1629)Making the template index-pattern configurable solves these issues.
@micheljung Thanks for the issue. This seems to be an oversight. I created https://github.com/micrometer-metrics/micrometer/pull/2197 to try to resolve this.
Thanks for the quick fix! #2197 looks exactly as it should be :-)
Most helpful comment
@micheljung Thanks for the issue. This seems to be an oversight. I created https://github.com/micrometer-metrics/micrometer/pull/2197 to try to resolve this.