Skip to content

Commit

Permalink
[UII] Expose advanced file logging config in UI (elastic#200274)
Browse files Browse the repository at this point in the history
## Summary

Resolves [elastic#192237](elastic#192237).
This PR exposes the following Elastic Agent file logging configuration
options in the agent policy advanced settings UI:

```
agent.logging.to_files
agent.logging.files.rotateeverybytes 
agent.logging.files.keepfiles
agent.logging.files.interval
```

<img width="1237" alt="image"
src="https://github.com/user-attachments/assets/8de9023c-29a0-4ecf-803a-d8c0c4b87616">

This PR also does some clean up on the default values for all these
configured advanced settings so that when user has not touched them, the
default values do not get written into the agent policy saved object.
[More info
here](elastic#200274 (comment)).

It also fixes adds missing response schemas for the advanced settings.

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <[email protected]>
  • Loading branch information
2 people authored and CAWilson94 committed Dec 12, 2024
1 parent f805722 commit e792d0e
Show file tree
Hide file tree
Showing 14 changed files with 647 additions and 147 deletions.
156 changes: 132 additions & 24 deletions oas_docs/bundle.json
Original file line number Diff line number Diff line change
Expand Up @@ -6355,18 +6355,27 @@
"nullable": true
},
"agent_download_timeout": {
"default": "2h",
"nullable": true
},
"agent_limits_go_max_procs": {
"nullable": true
},
"agent_logging_files_interval": {
"nullable": true
},
"agent_logging_files_keepfiles": {
"nullable": true
},
"agent_logging_files_rotateeverybytes": {
"nullable": true
},
"agent_logging_level": {
"default": "info",
"nullable": true
},
"agent_logging_metrics_period": {
"default": "30s",
"nullable": true
},
"agent_logging_to_files": {
"nullable": true
}
},
Expand Down Expand Up @@ -7113,18 +7122,27 @@
"nullable": true
},
"agent_download_timeout": {
"default": "2h",
"nullable": true
},
"agent_limits_go_max_procs": {
"nullable": true
},
"agent_logging_files_interval": {
"nullable": true
},
"agent_logging_files_keepfiles": {
"nullable": true
},
"agent_logging_files_rotateeverybytes": {
"nullable": true
},
"agent_logging_level": {
"default": "info",
"nullable": true
},
"agent_logging_metrics_period": {
"default": "30s",
"nullable": true
},
"agent_logging_to_files": {
"nullable": true
}
},
Expand Down Expand Up @@ -7361,18 +7379,27 @@
"nullable": true
},
"agent_download_timeout": {
"default": "2h",
"nullable": true
},
"agent_limits_go_max_procs": {
"nullable": true
},
"agent_logging_files_interval": {
"nullable": true
},
"agent_logging_files_keepfiles": {
"nullable": true
},
"agent_logging_files_rotateeverybytes": {
"nullable": true
},
"agent_logging_level": {
"default": "info",
"nullable": true
},
"agent_logging_metrics_period": {
"default": "30s",
"nullable": true
},
"agent_logging_to_files": {
"nullable": true
}
},
Expand Down Expand Up @@ -8145,18 +8172,27 @@
"nullable": true
},
"agent_download_timeout": {
"default": "2h",
"nullable": true
},
"agent_limits_go_max_procs": {
"nullable": true
},
"agent_logging_files_interval": {
"nullable": true
},
"agent_logging_files_keepfiles": {
"nullable": true
},
"agent_logging_files_rotateeverybytes": {
"nullable": true
},
"agent_logging_level": {
"default": "info",
"nullable": true
},
"agent_logging_metrics_period": {
"default": "30s",
"nullable": true
},
"agent_logging_to_files": {
"nullable": true
}
},
Expand Down Expand Up @@ -9190,18 +9226,27 @@
"nullable": true
},
"agent_download_timeout": {
"default": "2h",
"nullable": true
},
"agent_limits_go_max_procs": {
"nullable": true
},
"agent_logging_files_interval": {
"nullable": true
},
"agent_logging_files_keepfiles": {
"nullable": true
},
"agent_logging_files_rotateeverybytes": {
"nullable": true
},
"agent_logging_level": {
"default": "info",
"nullable": true
},
"agent_logging_metrics_period": {
"default": "30s",
"nullable": true
},
"agent_logging_to_files": {
"nullable": true
}
},
Expand Down Expand Up @@ -9947,18 +9992,27 @@
"nullable": true
},
"agent_download_timeout": {
"default": "2h",
"nullable": true
},
"agent_limits_go_max_procs": {
"nullable": true
},
"agent_logging_files_interval": {
"nullable": true
},
"agent_logging_files_keepfiles": {
"nullable": true
},
"agent_logging_files_rotateeverybytes": {
"nullable": true
},
"agent_logging_level": {
"default": "info",
"nullable": true
},
"agent_logging_metrics_period": {
"default": "30s",
"nullable": true
},
"agent_logging_to_files": {
"nullable": true
}
},
Expand Down Expand Up @@ -10195,18 +10249,27 @@
"nullable": true
},
"agent_download_timeout": {
"default": "2h",
"nullable": true
},
"agent_limits_go_max_procs": {
"nullable": true
},
"agent_logging_files_interval": {
"nullable": true
},
"agent_logging_files_keepfiles": {
"nullable": true
},
"agent_logging_files_rotateeverybytes": {
"nullable": true
},
"agent_logging_level": {
"default": "info",
"nullable": true
},
"agent_logging_metrics_period": {
"default": "30s",
"nullable": true
},
"agent_logging_to_files": {
"nullable": true
}
},
Expand Down Expand Up @@ -10980,18 +11043,27 @@
"nullable": true
},
"agent_download_timeout": {
"default": "2h",
"nullable": true
},
"agent_limits_go_max_procs": {
"nullable": true
},
"agent_logging_files_interval": {
"nullable": true
},
"agent_logging_files_keepfiles": {
"nullable": true
},
"agent_logging_files_rotateeverybytes": {
"nullable": true
},
"agent_logging_level": {
"default": "info",
"nullable": true
},
"agent_logging_metrics_period": {
"default": "30s",
"nullable": true
},
"agent_logging_to_files": {
"nullable": true
}
},
Expand Down Expand Up @@ -11890,6 +11962,42 @@
},
"type": "object"
},
"limits": {
"additionalProperties": false,
"properties": {
"go_max_procs": {
"type": "number"
}
},
"type": "object"
},
"logging": {
"additionalProperties": false,
"properties": {
"files": {
"additionalProperties": false,
"properties": {
"interval": {
"type": "string"
},
"keepfiles": {
"type": "number"
},
"rotateeverybytes": {
"type": "number"
}
},
"type": "object"
},
"level": {
"type": "string"
},
"to_files": {
"type": "boolean"
}
},
"type": "object"
},
"monitoring": {
"additionalProperties": false,
"properties": {
Expand Down
Loading

0 comments on commit e792d0e

Please sign in to comment.