# Fleet policy settings "Agent logging to files" & "Agent log level" does not work

**URL:** https://discuss.elastic.co/t/fleet-policy-settings-agent-logging-to-files-agent-log-level-does-not-work/382982
**Category:** Kibana
**Tags:** fleet
**Created:** [October 26, 2025, 1:49pm UTC](https://discuss.elastic.co/t/fleet-policy-settings-agent-logging-to-files-agent-log-level-does-not-work/382982 "2025-10-26T13:49:39Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![SamehSaeed](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/samehsaeed/32/145262_2.png) [@SamehSaeed](https://discuss.elastic.co/u/SamehSaeed)
#### Post date: [October 26, 2025, 1:49pm UTC](https://discuss.elastic.co/t/fleet-policy-settings-agent-logging-to-files-agent-log-level-does-not-work/382982/1 "2025-10-26T13:49:40Z")

</div>

Hello,

I’m replacing Metricbeats with Elastic-Agent on multiple servers so i can manage them through UI, but I noticed that some options are not working like "Agent logging to files" & "Agent log level", you have to disable them from the “/Elastic/Agent/elastic-agent.yml” file.

Is there something wrong with my configuration?

Stack version : 8.17.0

OS for ES host & Fleet server : Linux

Elastic agents OS : both Windows & Linux

Note : the below configuration did not work untill i put this line in the .yml file : `logging.level: error`

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/e/0e92c86c5fa4f32e2e4647c1436b49815c090de8.png).

All the below agents are connected to the above policy “Agent Policy (DISABLED)”, yet they are still logging to files.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/5/451e01f7a95076435845357a63f915ee8df0a88b.png)

---

<div class="post-metadata">

### Author: ![Tortoise](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tortoise/32/147587_2.png) [@Tortoise](https://discuss.elastic.co/u/Tortoise)
#### Post date: [October 30, 2025, 2:46am UTC](https://discuss.elastic.co/t/fleet-policy-settings-agent-logging-to-files-agent-log-level-does-not-work/382982/2 "2025-10-30T02:46:14Z")

</div>

Hello @SamehSaeed

I have checked on 9.2.0 and do not see any issues, at 02:24 i set the level from info to error & this is the last info message we see that log level is now error before this i see all the message in the log file info/warn/error :

```auto
{"log.level":"info","@timestamp":"2025-10-30T02:24:18.295Z","log.origin":{"function":"github.com/elastic/elastic-agent/internal/pkg/agent/application/actions/handlers.(*PolicyChangeHandler).applyLoggingConfig","file.name":"handlers/handler_action_policy_change.go","file.line":381},"message":"Setting fallback log level error from policy","log":{"source":"elastic-agent"},"ecs.version":"1.6.0"}

```

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/6/4/6470ec953c73efed510f394371b7fde9fce92a77.png)

I see no logs from 2:24 to 2:39 , at 2:39 i set it to Warning and soon see Warn logs written in the file :

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/a/7/a79a41f48adefdad6a03915af0ff10e28f709059.png)

```auto
{"log.level":"warn","@timestamp":"2025-10-30T02:39:35.188Z","message":"2 files are too small to be ingested, files need to be at least 1024 in size for ingestion to start. To change this behaviour set 'prospector.scanner.fingerprint.length' and 'prospector.scanner.fingerprint.offset'. Enable debug logging to see all file names.","component":{"binary":"filebeat","dataset":"elastic_agent.filebeat","id":"filestream-monitoring","type":"filestream"},"log":{"source":"filestream-monitoring"},"service.name":"filebeat","filestream_id":"filestream-monitoring-agent","ecs.version":"1.6.0","log.logger":"input.scanner","log.origin":{"file.line":423,"file.name":"filestream/fswatch.go","function":"github.com/elastic/beats/v7/filebeat/input/filestream.(*fileScanner).GetFiles"},"ecs.version":"1.6.0"}
{"log.level":"warn","@timestamp":"2025-10-30T02:39:45.210Z","message":"2 files are too small to be ingested, files need to be at least 1024 in size for ingestion to start. To change this behaviour set 'prospector.scanner.fingerprint.length' and 'prospector.scanner.fingerprint.offset'. Enable debug logging to see all file names.","component":{"binary":"filebeat","dataset":"elastic_agent.filebeat","id":"filestream-monitoring","type":"filestream"},"log":{"source":"filestream-monitoring"},"filestream_id":"filestream-monitoring-agent","ecs.version":"1.6.0","log.logger":"input.scanner","log.origin":{"file.line":423,"file.name":"filestream/fswatch.go","function":"github.com/elastic/beats/v7/filebeat/input/filestream.(*fileScanner).GetFiles"},"service.name":"filebeat","ecs.version":"1.6.0"}
{"log.level":"warn","@timestamp":"2025-10-30T02:39:55.190Z","message":"2 files are too small to be ingested, files need to be at least 1024 in size for ingestion to start. To change this behaviour set 'prospector.scanner.fingerprint.length' and 'prospector.scanner.fingerprint.offset'. Enable debug logging to see all file names.","component":{"binary":"filebeat","dataset":"elastic_agent.filebeat","id":"filestream-monitoring","type":"filestream"},"log":{"source":"filestream-monitoring"},"log.origin":{"file.line":423,"file.name":"filestream/fswatch.go","function":"github.com/elastic/beats/v7/filebeat/input/filestream.(*fileScanner).GetFiles"},"service.name":"filebeat","filestream_id":"filestream-monitoring-agent","ecs.version":"1.6.0","log.logger":"input.scanner","ecs.version":"1.6.0"}
{"log.level":"warn","@timestamp":"2025-10-30T02:40:05.216Z","message":"2 files are too small to be ingested, files need to be at least 1024 in size for ingestion to start. To change this behaviour set 'prospector.scanner.fingerprint.length' and 'prospector.scanner.fingerprint.offset'. Enable debug logging to see all file names.","component":{"binary":"filebeat","dataset":"elastic_agent.filebeat","id":"filestream-monitoring","type":"filestream"},"log":{"source":"filestream-monitoring"},"service.name":"filebeat","filestream_id":"filestream-monitoring-agent","ecs.version":"1.6.0","log.logger":"input.scanner","log.origin":{"file.line":423,"file.name":"filestream/fswatch.go","function":"github.com/elastic/beats/v7/filebeat/input/filestream.(*fileScanner).GetFiles"},"ecs.version":"1.6.0"}

```

Thanks!!

---

<div class="post-metadata">

### Author: ![SamehSaeed](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/samehsaeed/32/145262_2.png) [@SamehSaeed](https://discuss.elastic.co/u/SamehSaeed)
#### Post date: [October 30, 2025, 7:26am UTC](https://discuss.elastic.co/t/fleet-policy-settings-agent-logging-to-files-agent-log-level-does-not-work/382982/3 "2025-10-30T07:26:51Z")

</div>

Hello,

Thanks a lot for your help, I have read on other articles that this is fixed on later versions.  
To disable logging on version 8.17.0 you have to do it on each agent independently, you cannot change it through the policy

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/7/d752b16b45da4e0fdd9e756930e8ae2229eb89c7.png)

However, till now i haven’t found a way to disable “Agent logging to files”. It seems the only way is to upgrade.
