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

OpenShift - no kube-notary metrics show up in Prometheus #13

Closed
vchain-us-mgmt opened this issue Oct 25, 2019 · 2 comments
Closed

OpenShift - no kube-notary metrics show up in Prometheus #13

vchain-us-mgmt opened this issue Oct 25, 2019 · 2 comments
Assignees
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@vchain-us-mgmt
Copy link
Contributor

I deployed Kube-Notary using the kubernetes templates as described in issue 12 but couldn't find any image status metrics. Prometheus finds no targets to scrape Kube-Notary.

The Prometheus configuration is default without any changes.

@vchain-us-mgmt
Copy link
Contributor Author

vchain-us-mgmt commented Oct 25, 2019

found it - there is no scraping configuration for Pods by default. Editing the Prometheus configmap (kubectl edit configmap prometheus -n kube-system) and adding the following job fixed it:

    - job_name: 'kubernetes-pods'
      kubernetes_sd_configs:
      - role: pod
      relabel_configs:
      - action: labelmap
        regex: __meta_kubernetes_pod_label_(.+)
      - source_labels: [__meta_kubernetes_namespace]
        action: replace
        target_label: kubernetes_namespace
      - source_labels: [__meta_kubernetes_pod_name]
        action: replace
        target_label: kubernetes_pod_name

Don't forget to kill the Prometheus pod afterwards to activate the new config.

@leogr leogr added the documentation Improvements or additions to documentation label Oct 25, 2019
@leogr
Copy link
Contributor

leogr commented Oct 25, 2019

Good catch! And very easy to fix it, need to be documented.

@leogr leogr added this to the v0.3.0 milestone Oct 25, 2019
@leogr leogr self-assigned this Oct 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants