File tree Expand file tree Collapse file tree
nginx/datadog_checks/nginx/config_models Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # (C) Datadog, Inc. 2026-present
2+ # All rights reserved
3+ # Licensed under a 3-clause BSD style license (see LICENSE)
4+
5+ # Override the generated discovery candidates() for this integration.
6+ #
7+ # Define a candidates(service, default) function to wrap or replace the generated
8+ # candidate generation. `default` is the generated generator; call it to reuse
9+ # the spec-driven candidates, or ignore it to replace them entirely.
10+ #
11+ # def candidates(service, default):
12+ # yield from default(service)
Original file line number Diff line number Diff line change 1+ # (C) Datadog, Inc. 2026-present
2+ # All rights reserved
3+ # Licensed under a 3-clause BSD style license (see LICENSE)
4+
5+ # Here you can define custom (local:) discovery strategies for this integration.
6+ #
7+ # Decorate a generator with @discovery_strategy (imported from
8+ # datadog_checks.base.utils.discovery) and reference it from the spec discovery
9+ # stanza as `strategy: local:<function_name>`. The function receives the
10+ # discovered Service plus the inputs declared in the spec and yields one context
11+ # (ctx) mapping per candidate, exposing the keys listed in `provides`.
12+ #
13+ # from datadog_checks.base.utils.discovery import discovery_strategy
14+ #
15+ # @discovery_strategy(provides=('svc',))
16+ # def from_some_config(service, config_path):
17+ # ...
18+ # yield {'svc': ...}
You can’t perform that action at this time.
0 commit comments