I am integrating my Spring Boot application to Kibana and followed these steps:
JDK: 17
added elastic-apm-agent.jar(1.51.1) into dockerfile. And I see the APM on Kibana and micrometer metrics, but micrometer metrics was increased monotonically.
-javaagent:$ELASTIC_APM_PATH -Delastic.apm.application_packages=com.development -Delastic.apm.secret_token=ELASTIC_APM_TOKEN -Delastic.apm.server_url=http://xxxx:8200
How was it able to send custom metrics before doing step-2?
I wanted to see the values in a certain time interval and decided to use ElasticMeterRegistery as shown below. Then, start to see the metrics as expected.
build.gradle.kts
implementation("io.micrometer:micrometer-registry-elastic:1.12.1")
application.yaml
elastic:
metrics:
export:
host: http://xxxx:9200
step: 1m
enabled: true
I get this error:
failed to send metrics to elastic
with exception: java.SocketTimeoutException: Read timed out
How can I fix this error?
I am integrating my Spring Boot application to Kibana and followed these steps:
JDK: 17
added elastic-apm-agent.jar(1.51.1) into dockerfile. And I see the APM on Kibana and micrometer metrics, but micrometer metrics was increased monotonically.
-javaagent:$ELASTIC_APM_PATH -Delastic.apm.application_packages=com.development -Delastic.apm.secret_token=ELASTIC_APM_TOKEN -Delastic.apm.server_url=http://xxxx:8200
How was it able to send custom metrics before doing step-2?
I wanted to see the values in a certain time interval and decided to use ElasticMeterRegistery as shown below. Then, start to see the metrics as expected.
build.gradle.kts
implementation("io.micrometer:micrometer-registry-elastic:1.12.1")
application.yaml
elastic:
metrics:
export:
host: http://xxxx:9200
step: 1m
enabled: true
I get this error:
failed to send metrics to elastic
with exception: java.net.SocketTimeoutException: Read timed out
How can I fix this error?
The correct configuration key for setting the Elasticsearch host is management.elastic.metrics.export.host
. You will probably need to configure management.elastic.metrics.export.api-key-credentials
as well.
See https://docs.spring.io/spring-boot/appendix/application-properties/index.html#application-properties.actuator.management.elastic.metrics.export.host