Skip to content

Set honor_labels to true when pushgateway is enabled #69

Closed

Description

@hatchan

The default prometheus config has this set to false, but it is more useful to have it set to true when scraping from pushgateway:

honor_labels controls how Prometheus handles conflicts between labels that are
already present in scraped data and labels that Prometheus would attach
server-side ("job" and "instance" labels, manually configured target
labels, and labels generated by service discovery implementations).

If honor_labels is set to "true", label conflicts are resolved by keeping label
values from the scraped data and ignoring the conflicting server-side labels.

If honor_labels is set to "false", label conflicts are resolved by renaming
conflicting labels in the scraped data to "exported_" (for
example "exported_instance", "exported_job") and then attaching server-side
labels.

Setting honor_labels to "true" is useful for use cases such as federation and
scraping the Pushgateway, where all labels specified in the target should be
preserved.

Note that any globally configured "external_labels" are unaffected by this
setting. In communication with external systems, they are always applied only
when a time series does not have a given label yet and are ignored otherwise.

https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions