{{ summaryAnnouncement }}
{{ summaryHeading }} {{ summaryValue }} {{ summaryLine }} {{ values.target_count }} targets {{ values.group_count }} static groups {{ summaryBadge }}
Prometheus scrape job and target controls
Use a concise identifier such as network-devices or node-exporters.
Choose the protocol exposed by most targets in this job.
Enter a slash-prefixed path such as /metrics or /actuator/prometheus.
The timeout must not exceed this interval.
Leave enough time for exporters without consuming the entire interval.
One target per line: host:port,site=dc1,role=node. Blank lines and # comments are ignored.
{{ sourceStatus || 'CSV commas and whitespace-separated labels may be mixed.' }}
Scrape config inputs are valid.
The full block is safest for a standalone reviewed snippet.
Leave blank for no shared labels; otherwise use team=platform,env=prod.
When enabled, targets with exactly the same labels share one static_configs entry.
{{ group_static_configs ? 'Enabled' : 'Disabled' }}
Leave off unless scraped labels should win conflicts with server-side labels, such as federation or Pushgateway workflows.
{{ honor_labels ? 'Enabled' : 'Disabled' }}
Enabled matches the Prometheus default and is omitted from the generated YAML.
{{ honor_timestamps ? 'Enabled' : 'Disabled' }}
Use 0 to omit sample_limit.
Use 0 to omit target_limit.
Use 0 to omit label_limit.
{{ sourceExportStatus }}
{{ values.scrape_yaml }}
{{ ledgerExportStatus }}
TargetLabelsOverridesStatic groupCopy
{{ row.target }}{{ row.labels || '—' }}{{ row.overrides || '—' }}{{ row.group }}
{{ chartExportStatus }}
{{ reviewExportStatus }}
LevelCheckDetailRecommendationCopy
{{ row.level }}{{ row.check }}{{ row.detail }}{{ row.recommendation }}

A dashboard can be empty even when an exporter is healthy. Prometheus only receives those metrics when a scrape job names a reachable target and uses the correct scheme, path, timing, and labels. The configuration is therefore part inventory, part request policy, and part data model.

A scrape job normally represents one class of endpoint, such as node exporters or application metrics. Prometheus polls each target at the configured interval, waits no longer than the timeout, and attaches labels that later drive queries, alerts, and ownership. A stable job name matters because it becomes the default job label on scraped series.

Target
The host and optional port Prometheus contacts. The protocol and metrics path are separate settings.
Static config
A group of targets that share one label set. It suits known inventories; dynamic environments often need service discovery instead.
Scrape interval
How often a scrape starts. Shorter intervals improve resolution but increase traffic, parsing, and storage work.
Scrape timeout
How long one scrape may run. It cannot be greater than the scrape interval.

Labels should describe stable dimensions that operators will actually query, such as site, environment, or role. Inconsistent spelling splits what should be one group; volatile labels can multiply time-series cardinality. Per-target overrides are useful when a small number of endpoints need a different scheme, path, interval, timeout, or request parameter, but they also make a job harder to review.

Generated YAML is not proof that a running server will accept or successfully use the job. It still has to be placed in the correct configuration scope, checked with the deployed Prometheus tooling, reloaded, and observed through the targets view or the up metric. Network reachability, TLS, authentication, exporter response time, and relabeling remain outside a static generator's view.

How to Use This Tool:

Start from endpoints that Prometheus can reach, then add only the labels and overrides needed for that job.

  1. Enter a stable Job name, choose HTTP or HTTPS, and set the slash-prefixed Metrics path.
  2. Set Scrape interval and Scrape timeout with Prometheus duration syntax such as 30s and 10s. Correct the timeout if it exceeds the interval.
  3. Paste one host:port target per line. Add labels after the address as site=dc1 or role=node; blank lines and lines beginning with # are ignored.
  4. Add Common labels only when every target needs them. Turn on Group identical label sets to combine targets whose complete label maps match exactly.
  5. Use Honor scraped labels only when target-provided labels must win conflicts, such as a deliberate federation or Pushgateway workflow. A zero sample, target, or label limit omits that setting from the YAML.
  6. Review Target ledger for duplicates and per-target overrides, then check Validation review. Copy the full block for a standalone snippet or the job item when inserting it under an existing scrape_configs list.

Interpreting Results:

A parsed target count and a Pass timing check show that the row syntax and local rules are coherent. Repeated addresses, label-conflict overrides, and per-target request overrides produce review findings because they may be intentional but deserve an operator decision.

The runtime-validation finding always remains until the final configuration is checked outside the generator. Run promtool check config on the complete file, reload Prometheus through the method enabled in your deployment, and verify that each expected target appears and reports up = 1.

Technical Details:

A Prometheus static scrape configuration maps job defaults and target-specific label maps into one or more static_configs entries. The transformation is textual, but correctness depends on ordered validation rules rather than a numeric formula.

Transformation Core

Prometheus target-row transformation stages
Input formNormalized meaningGenerated YAML
host:portTarget addressAn item under targets
key=valueStatic label attached to that targetAn entry under the group's labels
scheme=httpsPer-target scheme override__scheme__: 'https'
path=/customPer-target metrics-path override__metrics_path__: '/custom'
interval=15s or timeout=5sPer-target timing override__scrape_interval__ or __scrape_timeout__
param_module=http_2xxFirst value for a request parameter__param_module__: 'http_2xx'

Common labels are applied first and a target row can replace a common value with the same name. With grouping disabled, every target becomes its own static group. With grouping enabled, complete label maps are sorted for comparison and only exact matches share a group.

Rule Core

Prometheus scrape configuration validation rules
FieldAccepted ruleBoundary
DurationPositive whole-number units may be combined in the order years, weeks, days, hours, minutes, seconds, milliseconds.Timeout must be less than or equal to interval; zero is not a valid interval or timeout.
TargetNon-empty host or host:port without a URL scheme, whitespace, or path.At most 500 parsed targets and 200,000 source characters.
Label nameStarts with a letter or underscore, then uses letters, digits, or underscores.Blank values are rejected.
Metrics pathStarts with / and contains no whitespace.The same rule applies to a per-target path override.
LimitsWhole numbers from 0 through 1,000,000,000.Zero omits the corresponding YAML key; positive values emit it.

Generated scalars are single-quoted, and an embedded apostrophe is doubled for YAML safety. honor_labels is emitted only when true because false is the Prometheus default. honor_timestamps is emitted only when false because true is the default.

Duplicate review compares target addresses, not full label maps. Two equal addresses with different labels therefore remain separate rows and still produce a duplicate finding. That may be legitimate, but it can also create multiple scrapes of the same endpoint.

Limitations and Privacy Notes:

The generator does not contact targets, parse the output with a Prometheus server, validate TLS or authentication, estimate cardinality, or confirm that a reload succeeded. Treat the YAML as a reviewable draft. Target names, labels, and internal hostnames remain in the browser during generation, but copied or downloaded artifacts contain them in plain text and should be handled like other infrastructure configuration.

Worked Examples:

Two node exporters in one group

Two targets use site=dc1,role=node with grouping enabled. Their complete label maps match, so one static_configs item contains both addresses and one shared labels map. With grouping disabled, the same inputs produce two static items.

One application needs HTTPS

A job defaults to HTTP and /metrics, while one target row adds scheme=https path=/actuator/prometheus timeout=5s. Those values become special per-target labels. The validation review calls them out so the operator can confirm that the exception is deliberate before reload.

References: