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

Cant load ingress jobs #3254

Closed
felixPG opened this Issue Oct 6, 2017 · 4 comments

Comments

Projects
None yet
2 participants
@felixPG
Copy link

felixPG commented Oct 6, 2017

What did you do?
Put a job for monitoring ingress in kubernetes

What did you expect to see?
Monitoring ingress object expected

What did you see instead? Under which circumstances?
Prometheus does not find ingress object

time="2017-10-06T09:51:42Z" level=info msg="Loading configuration file /etc/config/prometheus.yml" source="main.go:248"
time="2017-10-06T09:51:42Z" level=error msg="Error loading config: couldn't load configuration (-config.file=/etc/config/prometheus.yml): Unknown Kubernetes SD role \"ingress\"" source="main.go:150"

Environment
K8s 1.7.5

  • Prometheus version:
    last charts version from stable repository stable/prometheus

  • Prometheus configuration file:

      # Example scrape config for probing ingresses via the Blackbox Exporter.
      - job_name: 'kubernetes-ingresses'

        metrics_path: /probe
        params:
          module: [http_2xx]

        kubernetes_sd_configs:
          - role: ingress

        relabel_configs:
          - source_labels: [__meta_kubernetes_ingress_annotation_prometheus_io_probe]
            action: keep
            regex: true
          - source_labels: [__meta_kubernetes_ingress_scheme,__address__,__meta_kubernetes_ingress_path]
            regex: (.+);(.+);(.+)
            replacement: ${1}://${2}${3}
            target_label: __param_target
          - target_label: __address__
            replacement: blackbox-exporter.example.com:9115
          - source_labels: [__param_target]
            target_label: instance
          - action: labelmap
            regex: __meta_kubernetes_ingress_label_(.+)
          - source_labels: [__meta_kubernetes_namespace]
            target_label: kubernetes_namespace
          - source_labels: [__meta_kubernetes_ingress_name]
            target_label: kubernetes_name

@grobie

This comment has been minimized.

Copy link
Member

grobie commented Oct 6, 2017

Ingress discovery hasn't been released yet. It'll be part of Prometheus 1.8 and following.

@grobie grobie closed this Oct 6, 2017

@felixPG

This comment has been minimized.

Copy link
Author

felixPG commented Oct 6, 2017

Ok, please, could you remove from your examples: https://github.com/prometheus/prometheus/blob/master/documentation/examples/prometheus-kubernetes.yml

...or make a NOTE for this.
Regards

@grobie

This comment has been minimized.

Copy link
Member

grobie commented Oct 6, 2017

This is all in the master branch. If you're interested to look at available examples for your release version, check out the that in the release branch or specific tag.

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 23, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 23, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.