Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs for advanced agent monitoring options UI #1333

Closed
kilfoyle opened this issue Sep 19, 2024 · 0 comments · Fixed by #1361
Closed

Docs for advanced agent monitoring options UI #1333

kilfoyle opened this issue Sep 19, 2024 · 0 comments · Fixed by #1361
Assignees

Comments

@kilfoyle
Copy link
Contributor

kilfoyle commented Sep 19, 2024

From Jen in comment:


@kilfoyle We need to consolidate or duplicate the information on these two pages somehow:

https://www.elastic.co/guide/en/fleet/current/elastic-agent-monitoring-configuration.html

https://www.elastic.co/guide/en/fleet/current/agent-policy.html#change-policy-enable-agent-monitoring

With this PR, all the options from the first page are now available to be configured in the UI.

Based on the original issue description, elastic/kibana#153950 (comment), it seems the first page is not capturing all the available options under agent.monitoring either.

When this is done we also need to remove this section in favor of whatever documentation is added about the full advance monitoring options:
https://www.elastic.co/guide/en/fleet/current/agent-policy.html#agent-policy-http-monitoring


Planned for 8.16
Jen will need an updated URL for the UI link.

@kilfoyle kilfoyle self-assigned this Sep 19, 2024
jen-huang added a commit to elastic/kibana that referenced this issue Sep 22, 2024
…nostics (#193361)

## Summary

Resolves #153950.

This PR implements a UI to configure advanced Elastic Agent monitoring
options under agent policy settings. These advanced options include
enabling HTTP monitoring endpoints and various options for agent
diagnostics. They are shown under an a toggle under the existing agent
monitoring logs and metrics collection options:

<img width="1326" alt="image"
src="https://github.com/user-attachments/assets/ac8cbe00-d838-4c9a-8a35-3dbf31222dc9">

If the base HTTP monitoring endpoint is not enabled, the rest of the
HTTP options are disabled:

<img width="1328" alt="image"
src="https://github.com/user-attachments/assets/2eac787c-3055-4862-b3eb-2566a39ee86c">

The following new fields are added to agent policy schema to support
this:
```
monitoring_http
monitoring_pprof_enabled
monitoring_diagnostics
```

This work supersedes the previous `HTTP monitoring endpoint` options
under `Advanced Settings` at the bottom of the page. Any previous
configuration under an agent policy's
`advanced_settings.agent_monitoring_http` saved object field are
migrated over to the new `monitoring_http` field and the old field is
deleted. See the migration fn `backfillAgentPolicyToV4`.

These new options are compiled to agent yaml like this:

```yml
agent:
  monitoring:
    enabled: true
    use_output: default
    logs: true
    metrics: true
    traces: true
    namespace: default
    pprof:
      enabled: true
    http:
      enabled: true
      host: localhost
      port: 6791
    diagnostics:
      limit:
        interval: 1m
        burst: 1
      uploader:
        max_retries: 10
        init_dur: 1s
        max_dur: 10m
```
Summarize your PR. If it involves visual changes include a screenshot or
gif.

### To-do
- [x] API integration tests
- [x] Full manual test of SO migration
- [x] Full manual test with agent using these settings

### Checklist

Delete any items that are not applicable to this PR.

- [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)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
  - elastic/ingest-docs#1333 
- [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 <42973632+kibanamachine@users.noreply.github.com>
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Sep 22, 2024
…nostics (elastic#193361)

## Summary

Resolves elastic#153950.

This PR implements a UI to configure advanced Elastic Agent monitoring
options under agent policy settings. These advanced options include
enabling HTTP monitoring endpoints and various options for agent
diagnostics. They are shown under an a toggle under the existing agent
monitoring logs and metrics collection options:

<img width="1326" alt="image"
src="https://github.com/user-attachments/assets/ac8cbe00-d838-4c9a-8a35-3dbf31222dc9">

If the base HTTP monitoring endpoint is not enabled, the rest of the
HTTP options are disabled:

<img width="1328" alt="image"
src="https://github.com/user-attachments/assets/2eac787c-3055-4862-b3eb-2566a39ee86c">

The following new fields are added to agent policy schema to support
this:
```
monitoring_http
monitoring_pprof_enabled
monitoring_diagnostics
```

This work supersedes the previous `HTTP monitoring endpoint` options
under `Advanced Settings` at the bottom of the page. Any previous
configuration under an agent policy's
`advanced_settings.agent_monitoring_http` saved object field are
migrated over to the new `monitoring_http` field and the old field is
deleted. See the migration fn `backfillAgentPolicyToV4`.

These new options are compiled to agent yaml like this:

```yml
agent:
  monitoring:
    enabled: true
    use_output: default
    logs: true
    metrics: true
    traces: true
    namespace: default
    pprof:
      enabled: true
    http:
      enabled: true
      host: localhost
      port: 6791
    diagnostics:
      limit:
        interval: 1m
        burst: 1
      uploader:
        max_retries: 10
        init_dur: 1s
        max_dur: 10m
```
Summarize your PR. If it involves visual changes include a screenshot or
gif.

### To-do
- [x] API integration tests
- [x] Full manual test of SO migration
- [x] Full manual test with agent using these settings

### Checklist

Delete any items that are not applicable to this PR.

- [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)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
  - elastic/ingest-docs#1333
- [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 <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 87cdc2d)
kibanamachine added a commit to elastic/kibana that referenced this issue Sep 22, 2024
…d diagnostics (#193361) (#193658)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[UII] Advanced agent monitoring options UI for HTTP endpoint and
diagnostics (#193361)](#193361)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Jen
Huang","email":"its.jenetic@gmail.com"},"sourceCommit":{"committedDate":"2024-09-22T10:49:33Z","message":"[UII]
Advanced agent monitoring options UI for HTTP endpoint and diagnostics
(#193361)\n\n## Summary\r\n\r\nResolves
https://github.com/elastic/kibana/issues/153950.\r\n\r\nThis PR
implements a UI to configure advanced Elastic Agent
monitoring\r\noptions under agent policy settings. These advanced
options include\r\nenabling HTTP monitoring endpoints and various
options for agent\r\ndiagnostics. They are shown under an a toggle under
the existing agent\r\nmonitoring logs and metrics collection
options:\r\n\r\n<img width=\"1326\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/ac8cbe00-d838-4c9a-8a35-3dbf31222dc9\">\r\n\r\nIf
the base HTTP monitoring endpoint is not enabled, the rest of
the\r\nHTTP options are disabled:\r\n\r\n<img width=\"1328\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/2eac787c-3055-4862-b3eb-2566a39ee86c\">\r\n\r\nThe
following new fields are added to agent policy schema to
support\r\nthis:\r\n```\r\nmonitoring_http\r\nmonitoring_pprof_enabled\r\nmonitoring_diagnostics\r\n```\r\n\r\nThis
work supersedes the previous `HTTP monitoring endpoint` options\r\nunder
`Advanced Settings` at the bottom of the page. Any
previous\r\nconfiguration under an agent
policy's\r\n`advanced_settings.agent_monitoring_http` saved object field
are\r\nmigrated over to the new `monitoring_http` field and the old
field is\r\ndeleted. See the migration fn
`backfillAgentPolicyToV4`.\r\n\r\nThese new options are compiled to
agent yaml like this:\r\n\r\n```yml\r\nagent:\r\n monitoring:\r\n
enabled: true\r\n use_output: default\r\n logs: true\r\n metrics:
true\r\n traces: true\r\n namespace: default\r\n pprof:\r\n enabled:
true\r\n http:\r\n enabled: true\r\n host: localhost\r\n port: 6791\r\n
diagnostics:\r\n limit:\r\n interval: 1m\r\n burst: 1\r\n uploader:\r\n
max_retries: 10\r\n init_dur: 1s\r\n max_dur: 10m\r\n```\r\nSummarize
your PR. If it involves visual changes include a screenshot
or\r\ngif.\r\n\r\n### To-do\r\n- [x] API integration tests\r\n- [x] Full
manual test of SO migration\r\n- [x] Full manual test with agent using
these settings\r\n\r\n### Checklist\r\n\r\nDelete any items that are not
applicable to this PR.\r\n\r\n- [x] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n -
elastic/ingest-docs#1333 \r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"87cdc2db728b088a44ff6e1977679f326bfd38d2","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Fleet","v9.0.0","release_note:feature","backport:prev-minor"],"title":"[UII]
Advanced agent monitoring options UI for HTTP endpoint and
diagnostics","number":193361,"url":"https://github.com/elastic/kibana/pull/193361","mergeCommit":{"message":"[UII]
Advanced agent monitoring options UI for HTTP endpoint and diagnostics
(#193361)\n\n## Summary\r\n\r\nResolves
https://github.com/elastic/kibana/issues/153950.\r\n\r\nThis PR
implements a UI to configure advanced Elastic Agent
monitoring\r\noptions under agent policy settings. These advanced
options include\r\nenabling HTTP monitoring endpoints and various
options for agent\r\ndiagnostics. They are shown under an a toggle under
the existing agent\r\nmonitoring logs and metrics collection
options:\r\n\r\n<img width=\"1326\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/ac8cbe00-d838-4c9a-8a35-3dbf31222dc9\">\r\n\r\nIf
the base HTTP monitoring endpoint is not enabled, the rest of
the\r\nHTTP options are disabled:\r\n\r\n<img width=\"1328\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/2eac787c-3055-4862-b3eb-2566a39ee86c\">\r\n\r\nThe
following new fields are added to agent policy schema to
support\r\nthis:\r\n```\r\nmonitoring_http\r\nmonitoring_pprof_enabled\r\nmonitoring_diagnostics\r\n```\r\n\r\nThis
work supersedes the previous `HTTP monitoring endpoint` options\r\nunder
`Advanced Settings` at the bottom of the page. Any
previous\r\nconfiguration under an agent
policy's\r\n`advanced_settings.agent_monitoring_http` saved object field
are\r\nmigrated over to the new `monitoring_http` field and the old
field is\r\ndeleted. See the migration fn
`backfillAgentPolicyToV4`.\r\n\r\nThese new options are compiled to
agent yaml like this:\r\n\r\n```yml\r\nagent:\r\n monitoring:\r\n
enabled: true\r\n use_output: default\r\n logs: true\r\n metrics:
true\r\n traces: true\r\n namespace: default\r\n pprof:\r\n enabled:
true\r\n http:\r\n enabled: true\r\n host: localhost\r\n port: 6791\r\n
diagnostics:\r\n limit:\r\n interval: 1m\r\n burst: 1\r\n uploader:\r\n
max_retries: 10\r\n init_dur: 1s\r\n max_dur: 10m\r\n```\r\nSummarize
your PR. If it involves visual changes include a screenshot
or\r\ngif.\r\n\r\n### To-do\r\n- [x] API integration tests\r\n- [x] Full
manual test of SO migration\r\n- [x] Full manual test with agent using
these settings\r\n\r\n### Checklist\r\n\r\nDelete any items that are not
applicable to this PR.\r\n\r\n- [x] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n -
elastic/ingest-docs#1333 \r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"87cdc2db728b088a44ff6e1977679f326bfd38d2"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193361","number":193361,"mergeCommit":{"message":"[UII]
Advanced agent monitoring options UI for HTTP endpoint and diagnostics
(#193361)\n\n## Summary\r\n\r\nResolves
https://github.com/elastic/kibana/issues/153950.\r\n\r\nThis PR
implements a UI to configure advanced Elastic Agent
monitoring\r\noptions under agent policy settings. These advanced
options include\r\nenabling HTTP monitoring endpoints and various
options for agent\r\ndiagnostics. They are shown under an a toggle under
the existing agent\r\nmonitoring logs and metrics collection
options:\r\n\r\n<img width=\"1326\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/ac8cbe00-d838-4c9a-8a35-3dbf31222dc9\">\r\n\r\nIf
the base HTTP monitoring endpoint is not enabled, the rest of
the\r\nHTTP options are disabled:\r\n\r\n<img width=\"1328\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/2eac787c-3055-4862-b3eb-2566a39ee86c\">\r\n\r\nThe
following new fields are added to agent policy schema to
support\r\nthis:\r\n```\r\nmonitoring_http\r\nmonitoring_pprof_enabled\r\nmonitoring_diagnostics\r\n```\r\n\r\nThis
work supersedes the previous `HTTP monitoring endpoint` options\r\nunder
`Advanced Settings` at the bottom of the page. Any
previous\r\nconfiguration under an agent
policy's\r\n`advanced_settings.agent_monitoring_http` saved object field
are\r\nmigrated over to the new `monitoring_http` field and the old
field is\r\ndeleted. See the migration fn
`backfillAgentPolicyToV4`.\r\n\r\nThese new options are compiled to
agent yaml like this:\r\n\r\n```yml\r\nagent:\r\n monitoring:\r\n
enabled: true\r\n use_output: default\r\n logs: true\r\n metrics:
true\r\n traces: true\r\n namespace: default\r\n pprof:\r\n enabled:
true\r\n http:\r\n enabled: true\r\n host: localhost\r\n port: 6791\r\n
diagnostics:\r\n limit:\r\n interval: 1m\r\n burst: 1\r\n uploader:\r\n
max_retries: 10\r\n init_dur: 1s\r\n max_dur: 10m\r\n```\r\nSummarize
your PR. If it involves visual changes include a screenshot
or\r\ngif.\r\n\r\n### To-do\r\n- [x] API integration tests\r\n- [x] Full
manual test of SO migration\r\n- [x] Full manual test with agent using
these settings\r\n\r\n### Checklist\r\n\r\nDelete any items that are not
applicable to this PR.\r\n\r\n- [x] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n -
elastic/ingest-docs#1333 \r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"87cdc2db728b088a44ff6e1977679f326bfd38d2"}}]}]
BACKPORT-->

---------

Co-authored-by: Jen Huang <its.jenetic@gmail.com>
neptunian pushed a commit to neptunian/kibana that referenced this issue Oct 1, 2024
…d diagnostics (elastic#193361) (elastic#193658)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[UII] Advanced agent monitoring options UI for HTTP endpoint and
diagnostics (elastic#193361)](elastic#193361)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Jen
Huang","email":"its.jenetic@gmail.com"},"sourceCommit":{"committedDate":"2024-09-22T10:49:33Z","message":"[UII]
Advanced agent monitoring options UI for HTTP endpoint and diagnostics
(elastic#193361)\n\n## Summary\r\n\r\nResolves
https://github.com/elastic/kibana/issues/153950.\r\n\r\nThis PR
implements a UI to configure advanced Elastic Agent
monitoring\r\noptions under agent policy settings. These advanced
options include\r\nenabling HTTP monitoring endpoints and various
options for agent\r\ndiagnostics. They are shown under an a toggle under
the existing agent\r\nmonitoring logs and metrics collection
options:\r\n\r\n<img width=\"1326\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/ac8cbe00-d838-4c9a-8a35-3dbf31222dc9\">\r\n\r\nIf
the base HTTP monitoring endpoint is not enabled, the rest of
the\r\nHTTP options are disabled:\r\n\r\n<img width=\"1328\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/2eac787c-3055-4862-b3eb-2566a39ee86c\">\r\n\r\nThe
following new fields are added to agent policy schema to
support\r\nthis:\r\n```\r\nmonitoring_http\r\nmonitoring_pprof_enabled\r\nmonitoring_diagnostics\r\n```\r\n\r\nThis
work supersedes the previous `HTTP monitoring endpoint` options\r\nunder
`Advanced Settings` at the bottom of the page. Any
previous\r\nconfiguration under an agent
policy's\r\n`advanced_settings.agent_monitoring_http` saved object field
are\r\nmigrated over to the new `monitoring_http` field and the old
field is\r\ndeleted. See the migration fn
`backfillAgentPolicyToV4`.\r\n\r\nThese new options are compiled to
agent yaml like this:\r\n\r\n```yml\r\nagent:\r\n monitoring:\r\n
enabled: true\r\n use_output: default\r\n logs: true\r\n metrics:
true\r\n traces: true\r\n namespace: default\r\n pprof:\r\n enabled:
true\r\n http:\r\n enabled: true\r\n host: localhost\r\n port: 6791\r\n
diagnostics:\r\n limit:\r\n interval: 1m\r\n burst: 1\r\n uploader:\r\n
max_retries: 10\r\n init_dur: 1s\r\n max_dur: 10m\r\n```\r\nSummarize
your PR. If it involves visual changes include a screenshot
or\r\ngif.\r\n\r\n### To-do\r\n- [x] API integration tests\r\n- [x] Full
manual test of SO migration\r\n- [x] Full manual test with agent using
these settings\r\n\r\n### Checklist\r\n\r\nDelete any items that are not
applicable to this PR.\r\n\r\n- [x] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n -
elastic/ingest-docs#1333 \r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"87cdc2db728b088a44ff6e1977679f326bfd38d2","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Fleet","v9.0.0","release_note:feature","backport:prev-minor"],"title":"[UII]
Advanced agent monitoring options UI for HTTP endpoint and
diagnostics","number":193361,"url":"https://github.com/elastic/kibana/pull/193361","mergeCommit":{"message":"[UII]
Advanced agent monitoring options UI for HTTP endpoint and diagnostics
(elastic#193361)\n\n## Summary\r\n\r\nResolves
https://github.com/elastic/kibana/issues/153950.\r\n\r\nThis PR
implements a UI to configure advanced Elastic Agent
monitoring\r\noptions under agent policy settings. These advanced
options include\r\nenabling HTTP monitoring endpoints and various
options for agent\r\ndiagnostics. They are shown under an a toggle under
the existing agent\r\nmonitoring logs and metrics collection
options:\r\n\r\n<img width=\"1326\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/ac8cbe00-d838-4c9a-8a35-3dbf31222dc9\">\r\n\r\nIf
the base HTTP monitoring endpoint is not enabled, the rest of
the\r\nHTTP options are disabled:\r\n\r\n<img width=\"1328\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/2eac787c-3055-4862-b3eb-2566a39ee86c\">\r\n\r\nThe
following new fields are added to agent policy schema to
support\r\nthis:\r\n```\r\nmonitoring_http\r\nmonitoring_pprof_enabled\r\nmonitoring_diagnostics\r\n```\r\n\r\nThis
work supersedes the previous `HTTP monitoring endpoint` options\r\nunder
`Advanced Settings` at the bottom of the page. Any
previous\r\nconfiguration under an agent
policy's\r\n`advanced_settings.agent_monitoring_http` saved object field
are\r\nmigrated over to the new `monitoring_http` field and the old
field is\r\ndeleted. See the migration fn
`backfillAgentPolicyToV4`.\r\n\r\nThese new options are compiled to
agent yaml like this:\r\n\r\n```yml\r\nagent:\r\n monitoring:\r\n
enabled: true\r\n use_output: default\r\n logs: true\r\n metrics:
true\r\n traces: true\r\n namespace: default\r\n pprof:\r\n enabled:
true\r\n http:\r\n enabled: true\r\n host: localhost\r\n port: 6791\r\n
diagnostics:\r\n limit:\r\n interval: 1m\r\n burst: 1\r\n uploader:\r\n
max_retries: 10\r\n init_dur: 1s\r\n max_dur: 10m\r\n```\r\nSummarize
your PR. If it involves visual changes include a screenshot
or\r\ngif.\r\n\r\n### To-do\r\n- [x] API integration tests\r\n- [x] Full
manual test of SO migration\r\n- [x] Full manual test with agent using
these settings\r\n\r\n### Checklist\r\n\r\nDelete any items that are not
applicable to this PR.\r\n\r\n- [x] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n -
elastic/ingest-docs#1333 \r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"87cdc2db728b088a44ff6e1977679f326bfd38d2"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193361","number":193361,"mergeCommit":{"message":"[UII]
Advanced agent monitoring options UI for HTTP endpoint and diagnostics
(elastic#193361)\n\n## Summary\r\n\r\nResolves
https://github.com/elastic/kibana/issues/153950.\r\n\r\nThis PR
implements a UI to configure advanced Elastic Agent
monitoring\r\noptions under agent policy settings. These advanced
options include\r\nenabling HTTP monitoring endpoints and various
options for agent\r\ndiagnostics. They are shown under an a toggle under
the existing agent\r\nmonitoring logs and metrics collection
options:\r\n\r\n<img width=\"1326\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/ac8cbe00-d838-4c9a-8a35-3dbf31222dc9\">\r\n\r\nIf
the base HTTP monitoring endpoint is not enabled, the rest of
the\r\nHTTP options are disabled:\r\n\r\n<img width=\"1328\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/2eac787c-3055-4862-b3eb-2566a39ee86c\">\r\n\r\nThe
following new fields are added to agent policy schema to
support\r\nthis:\r\n```\r\nmonitoring_http\r\nmonitoring_pprof_enabled\r\nmonitoring_diagnostics\r\n```\r\n\r\nThis
work supersedes the previous `HTTP monitoring endpoint` options\r\nunder
`Advanced Settings` at the bottom of the page. Any
previous\r\nconfiguration under an agent
policy's\r\n`advanced_settings.agent_monitoring_http` saved object field
are\r\nmigrated over to the new `monitoring_http` field and the old
field is\r\ndeleted. See the migration fn
`backfillAgentPolicyToV4`.\r\n\r\nThese new options are compiled to
agent yaml like this:\r\n\r\n```yml\r\nagent:\r\n monitoring:\r\n
enabled: true\r\n use_output: default\r\n logs: true\r\n metrics:
true\r\n traces: true\r\n namespace: default\r\n pprof:\r\n enabled:
true\r\n http:\r\n enabled: true\r\n host: localhost\r\n port: 6791\r\n
diagnostics:\r\n limit:\r\n interval: 1m\r\n burst: 1\r\n uploader:\r\n
max_retries: 10\r\n init_dur: 1s\r\n max_dur: 10m\r\n```\r\nSummarize
your PR. If it involves visual changes include a screenshot
or\r\ngif.\r\n\r\n### To-do\r\n- [x] API integration tests\r\n- [x] Full
manual test of SO migration\r\n- [x] Full manual test with agent using
these settings\r\n\r\n### Checklist\r\n\r\nDelete any items that are not
applicable to this PR.\r\n\r\n- [x] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n -
elastic/ingest-docs#1333 \r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"87cdc2db728b088a44ff6e1977679f326bfd38d2"}}]}]
BACKPORT-->

---------

Co-authored-by: Jen Huang <its.jenetic@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant