In what way can it "not get metrics"? Does it discover the targets (do they
show on the target page) but cannot scrape them? On the configuration page,
does the scrape configuration include the jobs that you are missing? Are
there any errors in the Prometheus log?

Is this a problem with Prometheus discovering the targets, or with the
operator discovering the custom resources?

/MR

On Tue, Jun 9, 2020 at 8:46 PM Zhang Zhao <[email protected]> wrote:

> The Prometheus was deployed by stable/prometheus-operator helm chart. The
> issue I ran into was that after prometheus was deployed on namespace called
> "espr-prometheus-nonprod", prometheus was only able to get data from
> espr-prometheus-nonprod, default and kube-system 3 namespaces that I
> highlighted below. I don't see any metrics from other namespaces where the
> applications run..
>
> I tried to apply cluster role and cluster role binding config as below,
> but I still didn't see data from other namespaces coming in..
>
>
>
> [image: Snip20200609_2.png]
>
>
>
> apiVersion: rbac.authorization.k8s.io/v1beta1
>
> kind: ClusterRole
>
> metadata:
>
>   name: prometheus
>
> rules:
>
> - apiGroups: [""]
>
>   resources:
>
>   - nodes
>
>   - nodes/metrics
>
>   - services
>
>   - endpoints
>
>   - pods
>
>   verbs: ["get", "list", "watch"]
>
> - apiGroups: [""]
>
>   resources:
>
>   - configmaps
>
>   verbs: ["get"]
>
> - nonResourceURLs: ["/metrics"]
>
>   verbs: ["get"]
>
>
>
>
> apiVersion: rbac.authorization.k8s.io/v1beta1
>
> kind: ClusterRoleBinding
>
> metadata:
>
>   name: prometheus
>
> roleRef:
>
>   apiGroup: rbac.authorization.k8s.io
>
>   kind: ClusterRole
>
>   name: prometheus
>
> subjects:
>
> - kind: ServiceAccount
>
>   name: prometheus
>
>   namespace: espr-prometheus-nonprod
>
>
>
>
>
> Zhang
>
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Prometheus Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/prometheus-users/9d0d5afd-c5c4-4c28-9362-61312eb01785o%40googlegroups.com
> <https://groups.google.com/d/msgid/prometheus-users/9d0d5afd-c5c4-4c28-9362-61312eb01785o%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/CAMV%3D_gbaTfGNrTzcFi8zskVUyob85j5-ouGhZFqQ3qjwxTr7hg%40mail.gmail.com.

Reply via email to