Bug 1706478
| Summary: | Could not get elasticsearch metrics in prometheus server -- happen again. | |||
|---|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Qiaoling Tang <qitang> | |
| Component: | Logging | Assignee: | Josef Karasek <jkarasek> | |
| Status: | CLOSED ERRATA | QA Contact: | Anping Li <anli> | |
| Severity: | high | Docs Contact: | ||
| Priority: | unspecified | |||
| Version: | 4.1.0 | CC: | aos-bugs, jcantril, pweil, rmeggins, wsun | |
| Target Milestone: | --- | Keywords: | Regression | |
| Target Release: | 4.1.0 | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | No Doc Update | ||
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1712423 (view as bug list) | Environment: | ||
| Last Closed: | 2019-06-04 10:48:23 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 1712423 | |||
|
Description
Qiaoling Tang
2019-05-05 02:38:42 UTC
$ oc get clusterrole -o yaml -n openshift-logging elasticsearch-metrics
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: 2019-05-05T02:49:05Z
name: elasticsearch-metrics
ownerReferences:
- apiVersion: logging.openshift.io/v1
controller: true
kind: Elasticsearch
name: elasticsearch
uid: 58f9e953-6ee0-11e9-8423-0622f9bac76a
resourceVersion: "76248"
selfLink: /apis/rbac.authorization.k8s.io/v1/clusterroles/elasticsearch-metrics
uid: 58fc1373-6ee0-11e9-be40-0ae526d081c4
rules:
- apiGroups:
- ""
resources:
- pods
- services
- endpoints
verbs:
- list
- watch
- nonResourceURLs:
- /metrics
verbs:
- get
$ oc get clusterrolebinding -o yaml -n openshift-logging elasticsearch-metrics
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
creationTimestamp: 2019-05-05T02:49:05Z
name: elasticsearch-metrics
ownerReferences:
- apiVersion: logging.openshift.io/v1
controller: true
kind: Elasticsearch
name: elasticsearch
uid: 58f9e953-6ee0-11e9-8423-0622f9bac76a
resourceVersion: "76250"
selfLink: /apis/rbac.authorization.k8s.io/v1/clusterrolebindings/elasticsearch-metrics
uid: 58fcbe86-6ee0-11e9-be40-0ae526d081c4
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: elasticsearch-metrics
subjects:
- kind: ServiceAccount
name: prometheus-k8s
namespace: openshift-monitoring
$ oc get servicemonitor monitor-elasticsearch-cluster -oyaml
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
creationTimestamp: 2019-05-05T02:49:32Z
generation: 1
labels:
cluster-name: elasticsearch
scrape-metrics: enabled
name: monitor-elasticsearch-cluster
namespace: openshift-logging
ownerReferences:
- apiVersion: logging.openshift.io/v1
controller: true
kind: Elasticsearch
name: elasticsearch
uid: 58f9e953-6ee0-11e9-8423-0622f9bac76a
resourceVersion: "76764"
selfLink: /apis/monitoring.coreos.com/v1/namespaces/openshift-logging/servicemonitors/monitor-elasticsearch-cluster
uid: 694633ad-6ee0-11e9-be40-0ae526d081c4
spec:
endpoints:
- bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
path: /_prometheus/metrics
port: elasticsearch
scheme: https
tlsConfig:
caFile: /etc/prometheus/configmaps/serving-certs-ca-bundle/service-ca.crt
serverName: elasticsearch-metrics.openshift-logging.svc
jobLabel: monitor-elasticsearch
namespaceSelector:
matchNames:
- openshift-logging
selector:
matchLabels:
cluster-name: elasticsearch
scrape-metrics: enabled
Verified with quay.io/openshift/origin-logging-elasticsearch5@sha256:cb880d5d4758b9155e5143c2024af414b76bd8f7e3a70ad8512efb6f09084d16 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2019:0758 |