# How use APM agent with elasticsearch?

**URL:** https://discuss.elastic.co/t/how-use-apm-agent-with-elasticsearch/153930
**Category:** APM
**Created:** [October 25, 2018, 7:34am UTC](https://discuss.elastic.co/t/how-use-apm-agent-with-elasticsearch/153930 "2018-10-25T07:34:17Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![zqc0512](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zqc0512/32/32141_2.png) [@zqc0512](https://discuss.elastic.co/u/zqc0512)
#### Post date: [October 25, 2018, 7:34am UTC](https://discuss.elastic.co/t/how-use-apm-agent-with-elasticsearch/153930/1 "2018-10-25T07:34:17Z")

</div>

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

---

<div class="post-metadata">

### Author: ![zqc0512](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zqc0512/32/32141_2.png) [@zqc0512](https://discuss.elastic.co/u/zqc0512)
#### Post date: [October 25, 2018, 8:28am UTC](https://discuss.elastic.co/t/how-use-apm-agent-with-elasticsearch/153930/2 "2018-10-25T08:28:14Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![felixbarny](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/felixbarny/32/27341_2.png) [@felixbarny](https://discuss.elastic.co/u/felixbarny)
#### Post date: [October 25, 2018, 9:09am UTC](https://discuss.elastic.co/t/how-use-apm-agent-with-elasticsearch/153930/3 "2018-10-25T09:09:25Z")

</div>

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

Cheers,  
Felix

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [November 15, 2018, 5:09am UTC](https://discuss.elastic.co/t/how-use-apm-agent-with-elasticsearch/153930/4 "2018-11-15T05:09:25Z")

</div>

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