Bug 1817852 - prometheus is not showing metrics
Summary: prometheus is not showing metrics
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Monitoring
Version: 4.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 4.5.0
Assignee: Simon Pasquier
QA Contact: Junqi Zhao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-27 06:06 UTC by Rajnikant
Modified: 2023-09-07 22:35 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-22 10:00:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Rajnikant 2020-03-27 06:06:24 UTC
prometheus is not showing metrics

Description of problem:
prometheus is not showing metrics. 

Version-Release number of selected component (if applicable):
 OCP 4.3

How reproducible:
Will share other details. 

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Aditya Deshpande 2020-03-27 12:41:09 UTC
I am elaborating the issue:

- All pods from openshift-monitoring were up and running. When we try to execute queries on prometheus console it was not showing the values giving no_data as answer.
- Login to prometheus console was working successfully, Also checked the prometheus image was latest as per the OCP version 4.3. 
- Checked the targets page and all targets were showing status as UP. Nothing was unhealthy in targets page.
- Checked the prometheus-proxy container logs and there was no error.
- Checked thr curl command as below with kubeadmin user token and metrics from the node were exposed and showing data correctly.
  # curl -vk https://<node-name>:10250/metrics/cadvisor -H "Authorization: Bearer $TOKEN" 
- Also, checked below commands if there are values coming for the metrics if curl command runs for node-exporter container
  # oc exec pod/node-exporter-xxx -c node-exporter -- curl 127.0.0.1:9100/metrics | grep -i cpu
  The above command was working and showing values as output attached to the case.
- Checked below command if the metrics are there when we curl to 9091 port from prometheus container.
  # oc exec prometheus-k8s-0  -c prometheus  -- curl http://localhost:9090/metrics
  Above command worked to show metrics.
- Tried restarting all the node-exporter pods and prometheus-k8s-0 and prometheus-k8s-1 pod but there were no metrics for below queries showing no_data.
  While checking below metrics we tried using private browser window (incognito mode) and logged in again with kubeadmin user.
   instance:node_cpu_utilisation:rate1m
   namespace:container_cpu_usage_seconds_total:sum_rate{namespace="openshift-monitoring"}
   instance:node_cpu:rate:sum
   instance:node_cpu:ratio


Note You need to log in before you can comment on or make changes to this bug.