Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Target hostname not being set on scrape config #151

Open
bmgante opened this issue Jun 22, 2023 · 0 comments
Open

Target hostname not being set on scrape config #151

bmgante opened this issue Jun 22, 2023 · 0 comments

Comments

@bmgante
Copy link

bmgante commented Jun 22, 2023

Hi,

Any idea why when installing prometheus using this ansible role it sometimes sets target with the right hostname and sometimes sets localhost as per image below (in the same instance)?

image

prometheus_scrape_configs:
  - job_name: "prometheus"
    metrics_path: "{{ prometheus_metrics_path }}"
    static_configs:
      - targets:
          - "{{ ansible_fqdn | default(ansible_host) | default('localhost') }}:9090"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant