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

profiling: add documentation for the config file and CLI arguments #4398

Merged
merged 4 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions docs/en/observability/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ include::profiling-add-symbols.asciidoc[leveloffset=+4]
include::profiling-use-a-proxy.asciidoc[leveloffset=+4]
include::profiling-no-kernel-version-check.asciidoc[leveloffset=+4]
include::profiling-envs.asciidoc[leveloffset=+4]
include::profiling-config-file.asciidoc[leveloffset=+4]

include::profiling-upgrade.asciidoc[leveloffset=+3]

Expand Down
17 changes: 17 additions & 0 deletions docs/en/observability/profiling-advanced-configuration.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,20 @@ See the following sections for more information:
* <<profiling-no-kernel-version-check, Override kernel version check >>: Configure the Universal Profiling Agent to bypass the kernel version compatibility check.
* <<profiling-envs, Environment variables for the Universal Profiling Agent >>: Configure the Universal Profiling Agent using the environment.

WARNING: Command line arguments to the Universal Profiling Agent have precedence over environment variables. And environment varaibles have precedence over configuration files.
florianl marked this conversation as resolved.
Show resolved Hide resolved

The Universal Profiling Agent accepts the following CLI arguments:

[options="header"]
|==================================
| CLI argument | Type | Example | Description
| `-v` | `bool` | `-v` | Run the Universal Profiling Agent in verbose mode.
| `-no-kernel-version-check` | `bool` | `-no-kernel-version-check` | Disable the kernel version check. See <<profiling-no-kernel-version-check, Override kernel version check >> for more details.
| `-tags` | `string` | `-tags='cloud_region:us-central1;env:staging'` | Set specific tags. See <<profiling-tag-data-query, Tag data for querying>> for more details.
| `-project-id` | `uint` | `-project-id 73` | Splits profiling data into logical groups that you control. You can assign any non-zero, unsigned integer <= 4095.
| `-secret-token` | `string` | `-secret-token=abc123` | Set the secret token for the communication with the Universal Profiling Collector to `abc123`.
florianl marked this conversation as resolved.
Show resolved Hide resolved
| `-collection-agent` | `string` | `-collection-agent=example.com:443` | Set the destination for reporting profiling information to `example.com:443`.
| `-probabilistic-interval` | `duration` | `-probabilistic-interval=2m30s`| Set the probabilistic interval to `2m30s`. See <<profiling-probabilistic-profiling, Probabilistic profiling>> for more details.
| `-probabilistic-threshold` | `uint` | `-probabilistic-threshold=50` | Set the probabilistic threshold to `50`. See <<profiling-probabilistic-profiling, Probabilistic profiling>> for more details.
| `-config` | `string` | `-config=/opt/Elastic/universal-profiling/pf-host-agent.conf` | Set the path for the configuration file of the Universal Profiling Agent. See <<profiling-config-file, Configuration file of the Universal Profiling Agent>> for more details.
florianl marked this conversation as resolved.
Show resolved Hide resolved
|==================================
30 changes: 30 additions & 0 deletions docs/en/observability/profiling-config-file.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[[profiling-config-file]]
= Configuration file of the Universal Profiling Agent

The Universal Profiling Agent can be configured using a configuration file. The path to the configuration file can be specified by the CLI argument `-config`.
florianl marked this conversation as resolved.
Show resolved Hide resolved
By default `/etc/Elastic/universal-profiling/pf-host-agent.conf` is looked up as location for the configuration file.
florianl marked this conversation as resolved.
Show resolved Hide resolved

The expected format of the configuration file is a plaintext file, where each line holds one argument.
florianl marked this conversation as resolved.
Show resolved Hide resolved

Example:
[source]
----
project-id: 73
secret-token: abc123
collection-agent: example.com:443
----

WARNING: Command line arguments to the Universal Profiling Agent have precedence over environment variables. And environment varaibles have precedence over configuration files.
florianl marked this conversation as resolved.
Show resolved Hide resolved

[options="header"]
|==================================
| Config file argument | Type | Example | Description
florianl marked this conversation as resolved.
Show resolved Hide resolved
| `verbose` | `bool` | `verbose: true` | Run the Universal Profiling Agent in verbose mode.
| `no-kernel-version-check` | `bool` | `no-kernel-version-check: true` | Disable the kernel version check. See <<profiling-no-kernel-version-check, Override kernel version check >> for more details.
| `tags` | `string` | `tags: 'cloud_region:us-central1;env:staging'` | Set specific tags. See <<profiling-tag-data-query, Tag data for querying>> for more details.
| `project-id` | `uint` | `project-id: 73` | Splits profiling data into logical groups that you control. You can assign any non-zero, unsigned integer <= 4095.
| `secret-token` | `string` | `secret-token: abc123` | Set the secret token for the communication with the Universal Profiling Collector to `abc123`.
florianl marked this conversation as resolved.
Show resolved Hide resolved
| `collection-agent` | `string` | `collection-agent: example.com:443` | Set the destination for reporting profiling information to `example.com:443`.
| `probabilistic-interval` | `duration` | `probabilistic-interval: 2m30s`| Set the probabilistic interval to `2m30s`. See <<profiling-probabilistic-profiling, Probabilistic profiling>> for more details.
| `probabilistic-threshold` | `uint` | `probabilistic-threshold: 50` | Set the probabilistic threshold to `50`. See <<profiling-probabilistic-profiling, Probabilistic profiling>> for more details.
|==================================
3 changes: 2 additions & 1 deletion docs/en/observability/profiling-envs.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

The Universal Profiling Agent can be configured with environment variables.

WARNING: Command line arguments to the Universal Profiling Agent have precedence over environment variables.
WARNING: Command line arguments to the Universal Profiling Agent have precedence over environment variables. And environment varaibles have precedence over configuration files.
florianl marked this conversation as resolved.
Show resolved Hide resolved

[options="header"]
|==================================
Expand All @@ -16,4 +16,5 @@ WARNING: Command line arguments to the Universal Profiling Agent have precedence
| `PRODFILER_COLLECTION_AGENT` | `PRODFILER_COLLECTION_AGENT=example.com:443` | Set the destination for reporting profiling information to `example.com:443`.
| `PRODFILER_PROBABILISTIC_THRESHOLD` | `PRODFILER_PROBABILISTIC_THRESHOLD=50` | Set the probabilistic threshold to `50`. See <<profiling-probabilistic-profiling, Probabilistic profiling>> for more details.
| `PRODFILER_PROBABILISTIC_INTERVAL` |`PRODFILER_PROBABILISTIC_INTERVAL=2m30s` | Set the probabilistic interval to `2m30s`. See <<profiling-probabilistic-profiling, Probabilistic profiling>> for more details.
| `PRODFILER_CONFIG` | `PRODFILER_CONFIG=/opt/Elastic/universal-profiling/pf-host-agent.conf` | Set the path for the configuration file of the Universal Profiling Agent. See <<profiling-config-file, Configuration file of the Universal Profiling Agent>> for more details.
florianl marked this conversation as resolved.
Show resolved Hide resolved
|==================================
Loading