How use APM agent with elasticsearch?

how configure it in elasticsearch.
is configure in jvm.options ?
with this configure?
-javaagent:/opt/ES6/elasticsearch-6.4.2/config/elastic-apm-agent-0.7.1.jar
-Delastic.apm.service_name=elasticsearch_server
-Delastic.apm.application_packages=org.elasticsearch
-Delastic.apm.server_urls=http://xxx:8200

in jvm.options configure add

-Delastic.apm.application_packages=org.elasticsearch
-Delastic.apm.active=true
-Delastic.apm.instrument=true
-Delastic.apm.service_version=6.4.2
-Delastic.apm.environment=production
-Delastic.apm.transaction_sample_rate=1.0
-Delastic.apm.transaction_max_spans=10000
-Delastic.apm.service_name=elasticsearch
-Delastic.apm.log_level=DEBUG
-Delastic.apm.log_file=/opt/ES6/elasticsearch-6.4.2/logs/apmagent.log
-Delastic.apm.enable_log_correlation=true
-Delastic.apm.capture_body=all
-Delastic.apm.server_urls=http://xxx:8200

the log in apmagent.log

 more apmagent.log 
2018-10-25 16:14:08.101 [apm-server-healthcheck] INFO co.elastic.apm.report.ApmServerHealthChecker - Elastic APM server is available
2018-10-25 16:14:08.106 [main] INFO co.elastic.apm.configuration.StartupInfo - Starting Elastic APM 0.7.1 as elasticsearch on Java 1.8.0_121 (Oracle Corporation
) Linux 3.10.0-514.el7.x86_64
2018-10-25 16:14:08.106 [main] DEBUG co.elastic.apm.configuration.StartupInfo - service_name: 'elasticsearch' (source: Java System Properties)
2018-10-25 16:14:08.106 [main] DEBUG co.elastic.apm.configuration.StartupInfo - service_version: '6.4.2' (source: Java System Properties)
2018-10-25 16:14:08.107 [main] DEBUG co.elastic.apm.configuration.StartupInfo - environment: 'production' (source: Java System Properties)
2018-10-25 16:14:08.107 [main] DEBUG co.elastic.apm.configuration.StartupInfo - transaction_max_spans: '10000' (source: Java System Properties)
2018-10-25 16:14:08.107 [main] DEBUG co.elastic.apm.configuration.StartupInfo - server_urls: 'http://11.11.165.61:8200' (source: Java System Properties)
2018-10-25 16:14:08.107 [main] DEBUG co.elastic.apm.configuration.StartupInfo - application_packages: 'org.elasticsearch' (source: Java System Properties)
2018-10-25 16:14:08.107 [main] DEBUG co.elastic.apm.configuration.StartupInfo - log_level: 'DEBUG' (source: Java System Properties)
2018-10-25 16:14:08.179 [main] DEBUG co.elastic.apm.bci.ElasticApmAgent - Applying advice co.elastic.apm.plugin.api.TransactionInstrumentation$GetIdInstrumentat
ion
2018-10-25 16:14:08.180 [main] DEBUG co.elastic.apm.bci.ElasticApmAgent - Applying advice co.elastic.apm.plugin.api.SpanInstrumentation$SetNameInstrumentation
2018-10-25 16:14:08.180 [main] DEBUG co.elastic.apm.bci.ElasticApmAgent - Applying advice co.elastic.apm.plugin.api.SpanInstrumentation$SetTypeInstrumentation
2018-10-25 16:14:08.181 [main] DEBUG co.elastic.apm.bci.ElasticApmAgent - Applying advice co.elastic.apm.plugin.api.SpanInstrumentation$DoCreateSpanInstrumentat
ion
2018-10-25 16:14:08.182 [main] DEBUG co.elastic.apm.bci.ElasticApmAgent - Applying advice co.elastic.apm.plugin.api.SpanInstrumentation$EndInstrumentation
2018-10-25 16:14:08.182 [main] DEBUG co.elastic.apm.bci.ElasticApmAgent - Applying advice co.elastic.apm.plugin.api.SpanInstrumentation$CaptureExceptionInstrume
ntation
2018-10-25 16:14:08.183 [main] DEBUG co.elastic.apm.bci.ElasticApmAgent - Applying advice co.elastic.apm.plugin.api.SpanInstrumentation$GetIdInstrumentation
2018-10-25 16:14:08.183 [main] DEBUG co.elastic.apm.bci.ElasticApmAgent - Applying advice co.elastic.apm.plugin.api.SpanInstrumentation$AddTagInstrumentation
2018-10-25 16:14:08.184 [main] DEBUG co.elastic.apm.bci.ElasticApmAgent - Applying advice co.elastic.apm.plugin.api.CaptureExceptionInstrumentation
2018-10-25 16:14:08.185 [main] DEBUG co.elastic.apm.bci.ElasticApmAgent - Applying advice co.elastic.apm.jdbc.ConnectionInstrumentation
2018-10-25 16:14:08.185 [main] DEBUG co.elastic.apm.bci.ElasticApmAgent - Applying advice co.elastic.apm.jdbc.StatementInstrumentation
2018-10-25 16:14:08.186 [main] DEBUG co.elastic.apm.bci.ElasticApmAgent - Applying advice co.elastic.apm.jdbc.PreparedStatementInstrumentation
2018-10-25 16:14:08.187 [main] DEBUG co.elastic.apm.bci.ElasticApmAgent - Applying advice co.elastic.apm.opentracing.impl.ApmSpanInstrumentation$FinishInstrumen
tation
2018-10-25 16:14:08.188 [main] DEBUG co.elastic.apm.bci.ElasticApmAgent - Applying advice co.elastic.apm.opentracing.impl.ApmSpanInstrumentation$CreateErrorInst
rumentation
2018-10-25 16:14:08.188 [main] DEBUG co.elastic.apm.bci.ElasticApmAgent - Applying advice co.elastic.apm.opentracing.impl.ApmSpanInstrumentation$TagInstrumentat
ion
2018-10-25 16:14:08.189 [main] DEBUG co.elastic.apm.bci.ElasticApmAgent - Applying advice co.elastic.apm.opentracing.impl.ApmSpanInstrumentation$SetOperationNam
e
2018-10-25 16:14:08.189 [main] DEBUG co.elastic.apm.bci.ElasticApmAgent - Applying advice co.elastic.apm.opentracing.impl.ApmSpanInstrumentation$BaggageItemsIns
trumentation
2018-10-25 16:14:08.191 [main] DEBUG co.elastic.apm.bci.ElasticApmAgent - Applying advice co.elastic.apm.opentracing.impl.ApmSpanBuilderInstrumentation$CreateSp
anInstrumentation
2018-10-25 16:14:08.191 [main] DEBUG co.elastic.apm.bci.ElasticApmAgent - Applying advice co.elastic.apm.opentracing.impl.ScopeManagerInstrumentation$ActivateIn
strumentation
2018-10-25 16:14:08.192 [main] DEBUG co.elastic.apm.bci.ElasticApmAgent - Applying advice co.elastic.apm.opentracing.impl.ScopeManagerInstrumentation$CurrentSpa
nInstrumentation
2018-10-25 16:14:08.192 [main] DEBUG co.elastic.apm.bci.ElasticApmAgent - Applying advice co.elastic.apm.opentracing.impl.ApmScopeInstrumentation
2018-10-25 16:14:08.193 [main] DEBUG co.elastic.apm.bci.ElasticApmAgent - Applying advice co.elastic.apm.servlet.ServletInstrumentation
2018-10-25 16:14:08.195 [main] DEBUG co.elastic.apm.bci.ElasticApmAgent - Applying advice co.elastic.apm.servlet.FilterChainInstrumentation
2018-10-25 16:14:08.195 [main] DEBUG co.elastic.apm.bci.ElasticApmAgent - Applying advice co.elastic.apm.servlet.AsyncInstrumentation
2018-10-25 16:14:08.196 [main] DEBUG co.elastic.apm.bci.ElasticApmAgent - Applying advice co.elastic.apm.resttemplate.SpringRestTemplateInstrumentation
2018-10-25 16:14:08.197 [main] DEBUG co.elastic.apm.bci.ElasticApmAgent - Applying advice co.elastic.apm.spring.webmvc.SpringTransactionNameInstrumentation
2018-10-25 16:14:08.197 [main] DEBUG co.elastic.apm.bci.ElasticApmAgent - Applied 37 advices

but in APM i only can find one date with apm* index.
the apm table no date output.

The Java agent currently does not support monitoring Elasticsearch. See https://www.elastic.co/guide/en/apm/agent/java/current/supported-technologies-details.html for an overview of what is supported.

Cheers,
Felix

3 Likes

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.