# Why Agent Configuration always not aplied

**URL:** <https://discuss.elastic.co/t/why-agent-configuration-always-not-aplied/293846>\
**Category:** APM\
**Tags:** java\
**Created:** [January 10, 2022, 5:58am UTC](https://discuss.elastic.co/t/why-agent-configuration-always-not-aplied/293846 "2022-01-10T05:58:47Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![wo7387196](https://avatars.discourse-cdn.com/v4/letter/w/94ad74/32.png) [@wo7387196](https://discuss.elastic.co/u/wo7387196)\
**Post date:** [January 10, 2022, 5:58am UTC](https://discuss.elastic.co/t/why-agent-configuration-always-not-aplied/293846/1 "2022-01-10T05:58:47Z")

</div>

![QQ截图20220110135438](https://us1.discourse-cdn.com/elastic/original/3X/5/8/58565b0b7565eef83469486501015f69f0ef5cf8.png)  
 ![QQ截图20220110135738](https://us1.discourse-cdn.com/elastic/original/3X/c/3/c34d5c246994fd3833b73775d4312f9caf849da5.png)

how to apply the config ? my agent is alive

---

<div class="post-metadata">

**Author:** ![Jack\_Shirazi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jack_shirazi/32/91641_2.png) [@Jack\_Shirazi](https://discuss.elastic.co/u/Jack_Shirazi)\
**Post date:** [January 10, 2022, 3:33pm UTC](https://discuss.elastic.co/t/why-agent-configuration-always-not-aplied/293846/2 "2022-01-10T15:33:17Z")

</div>

Hi, I'm not entirely sure what you are asking and what you are expecting. The [Java agent documentation](https://www.elastic.co/guide/en/apm/agent/java/current/index.html) may help. Please could you be more detailed about what you are expecting and what you have tried so far. Thanks

---

<div class="post-metadata">

**Author:** ![wo7387196](https://avatars.discourse-cdn.com/v4/letter/w/94ad74/32.png) [@wo7387196](https://discuss.elastic.co/u/wo7387196)\
**Post date:** [January 11, 2022, 2:01am UTC](https://discuss.elastic.co/t/why-agent-configuration-always-not-aplied/293846/3 "2022-01-11T02:01:26Z")

</div>

![QQ截图20220111095301](https://us1.discourse-cdn.com/elastic/original/3X/0/1/011b9772d68bae659822bc220be04ffbc18da9e5.png)  
i creat a config set recording=false,but the agent still report to server.it has a tip : not yet applied by any agent. how to make the config recording=false work ?

---

<div class="post-metadata">

**Author:** ![Jack\_Shirazi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jack_shirazi/32/91641_2.png) [@Jack\_Shirazi](https://discuss.elastic.co/u/Jack_Shirazi)\
**Post date:** [January 11, 2022, 12:12pm UTC](https://discuss.elastic.co/t/why-agent-configuration-always-not-aplied/293846/4 "2022-01-11T12:12:52Z")

</div>

This should work. I just tested on an example server and Java agent, it propagated recording false, with the agent logging

```auto
2022-01-11 12:08:23,653 [elastic-apm-remote-config-poller] INFO co.elastic.apm.agent.impl.ElasticApmTracer - Tracer switched to PAUSED state
2022-01-11 12:08:23,662 [elastic-apm-remote-config-poller] INFO co.elastic.apm.agent.configuration.ApmServerConfigurationSource - Received new configuration from APM Server: {recording=false}

```

To look at this further I'll need all the details you can give. Server version, agent version, what type of Java application ...

---

<div class="post-metadata">

**Author:** ![wo7387196](https://avatars.discourse-cdn.com/v4/letter/w/94ad74/32.png) [@wo7387196](https://discuss.elastic.co/u/wo7387196)\
**Post date:** [January 12, 2022, 1:12am UTC](https://discuss.elastic.co/t/why-agent-configuration-always-not-aplied/293846/5 "2022-01-12T01:12:31Z")

</div>

the way to set up the Elastic APM Java Agent is [Programmatic API setup to self-attach],  
server version=7.16.1,  
agent version=1.28.4,  
here is all the agent prints log, cant see the [elastic-apm-remote-config-poller] log  
all server configs are default except the recording=false

```auto
2022-01-12 08:34:56,259 [Attach Listener] INFO co.elastic.apm.agent.util.JmxUtils - Found JVM-specific OperatingSystemMXBean interface: com.sun.management.OperatingSystemMXBean
2022-01-12 08:34:56,409 [Attach Listener] INFO co.elastic.apm.agent.configuration.StartupInfo - Starting Elastic APM 1.28.4 as dev_market on Java 11.0.13 Runtime version: 11.0.13+10-LTS-370 VM version: 11.0.13+10-LTS-370 (Oracle Corporation) Linux 3.10.0-693.el7.x86_64
2022-01-12 08:34:56,409 [Attach Listener] INFO co.elastic.apm.agent.configuration.StartupInfo - service_name: 'dev_market' (source: Attachment configuration)
2022-01-12 08:34:56,410 [Attach Listener] INFO co.elastic.apm.agent.configuration.StartupInfo - environment: 'dev' (source: Attachment configuration)
2022-01-12 08:34:56,410 [Attach Listener] INFO co.elastic.apm.agent.configuration.StartupInfo - server_url: 'http://172.1.1.16:8200' (source: Attachment configuration)
2022-01-12 08:34:56,410 [Attach Listener] INFO co.elastic.apm.agent.configuration.StartupInfo - metrics_interval: '10s' (source: Attachment configuration)
2022-01-12 08:34:56,410 [Attach Listener] INFO co.elastic.apm.agent.configuration.StartupInfo - application_packages: 'com.algotrade.linkx.market' (source: Attachment configuration)
2022-01-12 08:35:12,378 [Attach Listener] INFO co.elastic.apm.agent.impl.ElasticApmTracer - Tracer switched to RUNNING state
2022-01-12 08:35:12,831 [elastic-apm-server-healthcheck] INFO co.elastic.apm.agent.report.ApmServerHealthChecker - Elastic APM server is available: { "build_date": "2021-12-11T00:47:02Z", "build_sha": "788b59e74cb7c08241fcc51b1c4eb93af5f774e2", "publish_ready": true, "version": "7.16.1"}
2022-01-12 08:35:20,613 [main] INFO co.elastic.apm.agent.micrometer.MicrometerMetricsReporter - Registering Micrometer MeterRegistry: io.micrometer.core.instrument.simple.SimpleMeterRegistry@5807efad

```

---

<div class="post-metadata">

**Author:** ![axw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/axw/32/28197_2.png) [@axw](https://discuss.elastic.co/u/axw)\
**Post date:** [January 17, 2022, 1:17am UTC](https://discuss.elastic.co/t/why-agent-configuration-always-not-aplied/293846/6 "2022-01-17T01:17:21Z")

</div>

How is APM Server running? Is it running as an Elastic Agent / Fleet integration? Or is it running standalone (legacy)?

---

<div class="post-metadata">

**Author:** ![wo7387196](https://avatars.discourse-cdn.com/v4/letter/w/94ad74/32.png) [@wo7387196](https://discuss.elastic.co/u/wo7387196)\
**Post date:** [January 18, 2022, 1:00am UTC](https://discuss.elastic.co/t/why-agent-configuration-always-not-aplied/293846/7 "2022-01-18T01:00:19Z")

</div>

run as an Elastic Agent

---

<div class="post-metadata">

**Author:** ![axw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/axw/32/28197_2.png) [@axw](https://discuss.elastic.co/u/axw)\
**Post date:** [January 18, 2022, 1:33am UTC](https://discuss.elastic.co/t/why-agent-configuration-always-not-aplied/293846/8 "2022-01-18T01:33:33Z")

</div>

OK, thanks for confirming. There is a bug in the UI, related to running APM as an Elastic Agent integration: [[APM] agent config applied indicator does not work with Fleet integration · Issue #123109 · elastic/kibana · GitHub](https://github.com/elastic/kibana/issues/123109). Sorry for the inconvenience.

---

<div class="post-metadata">

**Author:** ![bekk777](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bekk777/32/101315_2.png) [@bekk777](https://discuss.elastic.co/u/bekk777)\
**Post date:** [January 27, 2022, 8:06pm UTC](https://discuss.elastic.co/t/why-agent-configuration-always-not-aplied/293846/9 "2022-01-27T20:06:24Z")

</div>

Hey axw,  
If APM server running standalone(legacy) (on docker). I have this kind of issue. But when I looked at discovery, show only metrics, not on APM service.

---

<div class="post-metadata">

**Author:** ![axw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/axw/32/28197_2.png) [@axw](https://discuss.elastic.co/u/axw)\
**Post date:** [January 31, 2022, 1:45am UTC](https://discuss.elastic.co/t/why-agent-configuration-always-not-aplied/293846/10 "2022-01-31T01:45:20Z")

</div>

@bekk777 I don't understand, sorry. Please open a new topic, describing what you're trying to do and the issues you're experiencing.

---

<div class="post-metadata">

**Author:** ![bekk777](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bekk777/32/101315_2.png) [@bekk777](https://discuss.elastic.co/u/bekk777)\
**Post date:** [January 31, 2022, 6:29am UTC](https://discuss.elastic.co/t/why-agent-configuration-always-not-aplied/293846/11 "2022-01-31T06:29:04Z")

</div>

Hi Andrew,  
Thanks for the answer.  
I opened already, but no one answered :(.  
This is link [APM on docker did not send logs trace to elastic cloud](https://discuss.elastic.co/t/apm-on-docker-did-not-send-logs-trace-to-elastic-cloud/295620)

---

<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:** [February 21, 2022, 2:29am UTC](https://discuss.elastic.co/t/why-agent-configuration-always-not-aplied/293846/12 "2022-02-21T02:29:51Z")

</div>

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