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

Add note about '/liveness' endpoint for standalone agent #1090

Merged
merged 4 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions docs/en/ingest-management/agent-policies.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ The following table illustrates the {fleet} user actions available to different
|{y}
|{n}

|<<change-policy-enable-agent-monitoring,Enable agent monitoring>>
|{y}
|{n}

|<<change-policy-output,Change the output of a policy>>
|{y}
|{n}
Expand Down Expand Up @@ -251,6 +255,26 @@ Alternatively, click **Delete policy** to delete the policy.
Existing data is not deleted.
Any agents assigned to a policy must be unenrolled or assigned to a different policy before a policy can be deleted.


[discrete]
[[change-policy-enable-agent-monitoring,Enable agent monitoring]]
== Enable agent monitoring

Use this setting to collect monitoring logs and metrics from {agent}. All monitoring data will be written to the specified **Default namespace**.

. In {fleet}, click **Agent policies**.
Select the name of the policy you want to edit.

. Click the **Settings** tab and scroll to **Enable agent monitorings**.

. Select whether to collect agent logs, agent metrics, or both, from the {agents} that use the policy.

When this setting is enabled:

* An {agent} integration is created automatically.
* A `/liveness` endpoint is enabled and available where the server is configured to be exposed. By default, the endpoint
returns a `200` OK status as long as {agent}'s internal main loop is responsive and can process configuration changes. It can be configured to also monitor the component states to return an error if anything is degraded or failed.

[discrete]
[[change-policy-output]]
== Change the output of a policy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ To enable monitoring, set `agent.monitoring.enabled` to `true`. Also set the
collected. If neither setting is specified, monitoring is turned off. Set
`use_output` to specify the output to which monitoring events are sent.

Setting `agent.monitoring.enabled` to `true` also exposes a `/liveness` endpoint. By default, the endpoint
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's actually agent.monitoring.enabled.http that needs to be enabled, agent.monitoring.enabled controls whether we collect monitoring data from agent to be shipped to Fleet.

The liveness probe is an HTTP feature. Sorry for the late review.

Copy link
Contributor Author

@kilfoyle kilfoyle Jun 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for spotting this @cmacknz!

A couple of questions:

  • Just to make sure I get it right, should it be agent.monitoring.enabled.http or agent.monitoring.http.enabled? In your comment you mentioned the latter.
  • I don't think the setting is available to in Fleet, so I think I should mention the setting only in the standalone agent docs (here). Does that seem right to you?

ADD: Here's a PR with the changes: #1100

returns a `200` OK status as long as {agent}'s internal main loop is responsive and can
process configuration changes. It can be configured to also monitor the component states
and return an error if anything is degraded or has failed.

The `agent.monitoring.pprof.enabled` option controls whether the {agent} and {beats} expose the
`/debug/pprof/` endpoints with the monitoring endpoints. It is set to `false`
by default. Data produced by these endpoints can be useful for debugging but present a
Expand Down