Upgrade Windows Telegraf to 1.40.0 - #1785
Conversation
Consume the official upstream Windows package with a pinned SHA256 and migrate timeout, field-filter, and procstat PID-tag configuration. Preserve ConfigMap keys and Linux behavior; document the deferred discovery cleanup and deadline gaps. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Host the unchanged upstream executable with the existing win32-service dispatcher instead of relying on Telegraf's session-zero service detection. Preserve both service roles, bound shutdown and log growth, and contain the child in a kill-on-close job. Cover registration and lifecycle behavior without relaxing TLS, authentication, strict config parsing, or protected-memory defaults. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Enroll the service host in its kill-on-close job before creating the Telegraf child, retain the non-inheritable handle until host exit, and cover abrupt and normal startup-boundary exits with local Windows process tests. Wire Windows worker tests into the existing Ruby driver and narrowly suppress the public-checksum and test-loopback DevSkim false positives. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 08a78bbb-f751-41cb-87b6-96aaf4c1a1ae
Remove the optional fieldinclude/fieldexclude migration and its OS-specific rendering/test helper. Preserve fieldpass/fielddrop and the original timeout variable while retaining the required overall-timeout and procstat PID-tag fixes. Add pinned upstream references for the compatibility rationale. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 08a78bbb-f751-41cb-87b6-96aaf4c1a1ae
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
Did we test the fix for WS2022 and WS2025 both? We should merge #1782 and verify there are no issues for ws2025? |
|
Can we add a check to kill Telegraf / restart the container if the number of handlers are increasing so it doesn't impact other processes? |
i would not prefer to swallow it when it happens. if we hit handle increasing issue in the future, i would prefer to let it fail and then we need do the actual fix. |
synced offline, i will do the win25 fix after this PR is merged. will rebase win25 fix PR and validate then. |
* Upgrade Windows Telegraf to 1.40.0 Consume the official upstream Windows package with a pinned SHA256 and migrate timeout, field-filter, and procstat PID-tag configuration. Preserve ConfigMap keys and Linux behavior; document the deferred discovery cleanup and deadline gaps. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Fix Telegraf service startup in Windows containers Host the unchanged upstream executable with the existing win32-service dispatcher instead of relying on Telegraf's session-zero service detection. Preserve both service roles, bound shutdown and log growth, and contain the child in a kill-on-close job. Cover registration and lifecycle behavior without relaxing TLS, authentication, strict config parsing, or protected-memory defaults. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Close Telegraf service startup containment gap Enroll the service host in its kill-on-close job before creating the Telegraf child, retain the non-inheritable handle until host exit, and cover abrupt and normal startup-boundary exits with local Windows process tests. Wire Windows worker tests into the existing Ruby driver and narrowly suppress the public-checksum and test-loopback DevSkim false positives. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 08a78bbb-f751-41cb-87b6-96aaf4c1a1ae * Keep existing Telegraf field filters in Windows upgrade Remove the optional fieldinclude/fieldexclude migration and its OS-specific rendering/test helper. Preserve fieldpass/fielddrop and the original timeout variable while retaining the required overall-timeout and procstat PID-tag fixes. Add pinned upstream references for the compatibility rationale. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 08a78bbb-f751-41cb-87b6-96aaf4c1a1ae --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 08a78bbb-f751-41cb-87b6-96aaf4c1a1ae
Purpose
Upgrade the official Windows Telegraf package from 1.24.2 to 1.40.0 for discovery-token file rereading on a failed-poll retry. No Telegraf source patch or new production dependency.
Why the remaining changes are needed
kubernetes/windows/setup.ps1build/windows/installer/conf/telegraf.confresponse_timeouttohttp.Client.Timeout; 1.40 documentation says it now covers headers only. Therefore usetimeout = "15s".build/common/installer/scripts/tomlparser-prom-customconfig.rbresponse_timeoutoverride for generated namespace plugins. Linux already usedtimeout; Linux output, filter names/values and public ConfigMap keys are unchanged.build/windows/installer/conf/telegraf-ama-logs-process-metrics.confpid_tagwith the documentedtag_with = ["pid"]. 1.40's option schema no longer haspid_tag. CPU/RSS filters, intervals and output stay unchanged.main.ps1+telegraf-windows-service.rbservices.exeparent in session 0; the observed container uses session 5 and failed SCM startup. Reuse the bundled Ruby service dispatcher to run the unchanged executable with--console, handling both service roles, child exit and bounded logging/shutdown.telegraf-windows-console.rbLatest six-hour results
Commit
df6e8d1e, build 126849: WS2022 observation on September 22, 00:03-06:03 UTC, with Prometheus and process-metrics collection both enabled.