Skip to content

Conversation

@frazew
Copy link
Contributor

@frazew frazew commented Mar 7, 2025

This CLI flag is useful to prevent process_exporter from putting processes in the wrong groups if it happens to scan them for the first time before they change their command line. This can happen for processes which call exec(3) for example.

The default setting is 0, which leaves the feature disabled. Note that setting a non-zero value for --recheck-with-time-limit automatically also sets --recheck so there's no need to set the two CLI flags.

This CLI flag is useful to prevent process_exporter from putting
processes in the wrong groups if it happens to scan them for the first
time before they change their command line. This can happen for
processes which call exec(3) for example.

The default setting is 0, which leaves the feature disabled. Note that
setting a non-zero value for --recheck-with-time-limit automatically
also sets --recheck so there's no need to set the two CLI flags.

Signed-off-by: François HORTA <[email protected]>
@frazew frazew force-pushed the process-exporter/recheck-time-limit branch from eb0aa6f to c8af412 Compare March 7, 2025 15:38
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Mar 7, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Mar 7, 2025

Docs Build 📝

Thank you for contribution!✨

The docs for this PR have been published here:
https://prometheus-community.github.io/ansible/pr/548

You can compare to the docs for the main branch here:
https://prometheus-community.github.io/ansible/branch/main

The docsite for this PR is also available for download as an artifact from this run:
https://github.com/prometheus-community/ansible/actions/runs/13724065936

File changes:

Click to see the diff comparison.

NOTE: only file modifications are shown here. New and deleted files are excluded.
See the file list and check the published docs to see those files.

diff --git a/home/runner/work/ansible/ansible/docsbuild/base/process_exporter_role.html b/home/runner/work/ansible/ansible/docsbuild/head/process_exporter_role.html
index 19e7e7a..d1cd5dc 100644
--- a/home/runner/work/ansible/ansible/docsbuild/base/process_exporter_role.html
+++ b/home/runner/work/ansible/ansible/docsbuild/head/process_exporter_role.html
@@ -243,6 +243,17 @@ To check whether it is installed, run <code class="code docutils literal notrans
 </div></td>
 </tr>
 <tr class="row-even"><td><div class="ansible-option-cell">
+<div class="ansibleOptionAnchor" id="parameter-main--process_exporter_recheck_time_limit"></div><p class="ansible-option-title" id="ansible-collections-prometheus-prometheus-process-exporter-role-parameter-main-process-exporter-recheck-time-limit"><strong>process_exporter_recheck_time_limit</strong></p>
+<a class="ansibleOptionLink" href="#parameter-main--process_exporter_recheck_time_limit" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
+</div></td>
+<td><div class="ansible-option-cell"><p>Enable process rechecking: process names are re-evaluated only this much time after their start, but no longer.</p>
+<p>See <a class="reference external" href="https://pkg.go.dev/time#ParseDuration">the time.ParseDuration documentation</a> for the supported duration formats.</p>
+<p>This setting can be useful to make sure processes are grouped correctly if their name changes shortly after they start.</p>
+<p>The default value leaves this feature disabled.</p>
+<p class="ansible-option-line"><strong class="ansible-option-default-bold">Default:</strong> <code class="ansible-option-default docutils literal notranslate"><span class="pre">&quot;0&quot;</span></code></p>
+</div></td>
+</tr>
+<tr class="row-odd"><td><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="parameter-main--process_exporter_system_group"></div><p class="ansible-option-title" id="ansible-collections-prometheus-prometheus-process-exporter-role-parameter-main-process-exporter-system-group"><strong>process_exporter_system_group</strong></p>
 <a class="ansibleOptionLink" href="#parameter-main--process_exporter_system_group" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
 </div></td>
@@ -251,7 +262,7 @@ To check whether it is installed, run <code class="code docutils literal notrans
 <p class="ansible-option-line"><strong class="ansible-option-default-bold">Default:</strong> <code class="ansible-option-default docutils literal notranslate"><span class="pre">&quot;process-exp&quot;</span></code></p>
 </div></td>
 </tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="parameter-main--process_exporter_system_user"></div><p class="ansible-option-title" id="ansible-collections-prometheus-prometheus-process-exporter-role-parameter-main-process-exporter-system-user"><strong>process_exporter_system_user</strong></p>
 <a class="ansibleOptionLink" href="#parameter-main--process_exporter_system_user" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
 </div></td>
@@ -260,14 +271,14 @@ To check whether it is installed, run <code class="code docutils literal notrans
 <p class="ansible-option-line"><strong class="ansible-option-default-bold">Default:</strong> <code class="ansible-option-default docutils literal notranslate"><span class="pre">&quot;process-exp&quot;</span></code></p>
 </div></td>
 </tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="parameter-main--process_exporter_tls_server_config"></div><p class="ansible-option-title" id="ansible-collections-prometheus-prometheus-process-exporter-role-parameter-main-process-exporter-tls-server-config"><strong>process_exporter_tls_server_config</strong></p>
 <a class="ansibleOptionLink" href="#parameter-main--process_exporter_tls_server_config" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">dictionary</span></p>
 </div></td>
 <td><div class="ansible-option-cell"><p>Configuration for TLS authentication.</p>
 </div></td>
 </tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="parameter-main--process_exporter_version"></div><p class="ansible-option-title" id="ansible-collections-prometheus-prometheus-process-exporter-role-parameter-main-process-exporter-version"><strong>process_exporter_version</strong></p>
 <a class="ansibleOptionLink" href="#parameter-main--process_exporter_version" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
 </div></td>
@@ -275,7 +286,7 @@ To check whether it is installed, run <code class="code docutils literal notrans
 <p class="ansible-option-line"><strong class="ansible-option-default-bold">Default:</strong> <code class="ansible-option-default docutils literal notranslate"><span class="pre">&quot;0.8.5&quot;</span></code></p>
 </div></td>
 </tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="parameter-main--process_exporter_web_listen_address"></div><p class="ansible-option-title" id="ansible-collections-prometheus-prometheus-process-exporter-role-parameter-main-process-exporter-web-listen-address"><strong>process_exporter_web_listen_address</strong></p>
 <a class="ansibleOptionLink" href="#parameter-main--process_exporter_web_listen_address" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
 </div></td>
@@ -283,7 +294,7 @@ To check whether it is installed, run <code class="code docutils literal notrans
 <p class="ansible-option-line"><strong class="ansible-option-default-bold">Default:</strong> <code class="ansible-option-default docutils literal notranslate"><span class="pre">&quot;0.0.0.0:9256&quot;</span></code></p>
 </div></td>
 </tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="parameter-main--process_exporter_web_telemetry_path"></div><p class="ansible-option-title" id="ansible-collections-prometheus-prometheus-process-exporter-role-parameter-main-process-exporter-web-telemetry-path"><strong>process_exporter_web_telemetry_path</strong></p>
 <a class="ansibleOptionLink" href="#parameter-main--process_exporter_web_telemetry_path" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
 </div></td>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant