gearmand: add container-based config discovery support#24487
Draft
vitkyrka wants to merge 1 commit into
Draft
Conversation
Contributor
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 2c17612 | Docs | Datadog PR Page | Give us feedback! |
0864654 to
b8e919a
Compare
Contributor
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced Jul 14, 2026
Adds a from_ports discovery strategy targeting gearmand's raw TCP admin protocol port (4730), and wires the E2E fixture and tests for it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
3251f62 to
f4762a7
Compare
541cd70 to
2c17612
Compare
Contributor
Validation ReportAll 21 validations passed. Show details
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What does this PR do?
Adds container-based config discovery support to gearmand.
Port selection rationale: Port 4730 is gearmand's well-known default job-server port, documented in the Gearman protocol spec. This check pulls stats from the same port.
Endpoint: gearmand's admin protocol is raw TCP (not HTTP), and the check's config uses separate
server/portfields rather than a URL field, sospec.yamluses the manualfrom_portsstrategy form (candidates: - server: ..., port: ...) instead of thediscovery/openmetrics_from_portstemplate.Standard image: there's no single "official" Docker Hub image for gearmand, but several actively used, vendor-published community images all share the same short name
gearmand(e.g.artefactual/gearmand, used by the Archivematica project and also used by this integration's own test fixture;dockage/gearmand;appscode/gearmand).Exact-tag-match test helper: the existing
test_e2e's assertions (assert_metrics()intests/test_integration_e2e.py) useassert_metric/assert_service_checkwith a fixedtags=list, which does exact tag-set matching. Discovery can't reproduce that same tag set — theservertag reflects the discovered container's own docker-network address rather thancommon.HOST, notagsconfig field is set (discovery has no way to derive it), and Autodiscovery injects its own container tags (docker_image,image_id, ...) on top, so we drop the tag assertion.Compose service name mismatch: the compose file's service is named
gearman(seetests/compose/docker-compose.yaml), notgearmand, sotest_e2e_discovery_all_candidatespassescompose_service='gearman'explicitly — the helper's default fallback resolves to the integration's own package name (gearmand), which wouldn't match.Motivation
https://datadoghq.atlassian.net/browse/DSCVR-552
Review checklist (to be filled by reviewers)
qa/requiredif this PR needs QA validation, orqa/skip-qaif it does not. Exactly one of the two is required.backport/<branch-name>label to the PR and it will automatically open a backport PR once this one is merged