Bug 1631029 - [starter-ca-central-1] container_network_receive_bytes_total not available for all namespaces
Summary: [starter-ca-central-1] container_network_receive_bytes_total not available fo...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Monitoring
Version: 3.11.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 4.1.z
Assignee: Frederic Branczyk
QA Contact: Junqi Zhao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-09-19 19:20 UTC by Justin Pierce
Modified: 2019-12-04 17:11 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-12-04 17:09:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Justin Pierce 2018-09-19 19:20:31 UTC
Description of problem:
Based on prometheus queries, it appears that metrics being used by online components (e.g. container_network_receive_bytes_total) to assess user activity are not being collected for standard user projects. The metrics are recorded for openshift-*, kube-system, and the like, but are not present for arbitrary user projects. 

Version-Release number of selected component (if applicable):
3.11.0-0.21.0

Actual results:
No time series of container_network_receive_bytes_total for non core projects.

Expected results:
container_network_receive_bytes_total would exist in prometheus for all projects.

Comment 1 Frederic Branczyk 2018-09-20 11:24:40 UTC
Can you clarify which Prometheus environment you're querying? When I query this on the central cluster:

```
sum(container_network_receive_bytes_total) by(namespace)
```

I see all namespaces, not just the cluster component namespaces.

Comment 3 Justin Pierce 2018-09-20 16:18:58 UTC
You're right.. there do appear to be some non-core namespaces. I was expecting to see far more.

oc get pods --all-namespaces | grep Running | cut -f 1 -d ' ' | uniq | wc 
Results in 6329 atm on ca-central-1. 

However, in prometheus, your query results in 161 time series.

Comment 4 Frederic Branczyk 2018-09-21 09:49:03 UTC
Looking at the cAdvisor code, it may just be that containers from other namespaces simply have not received any network traffic: https://github.com/google/cadvisor/blob/be9cd931d724ef2aaa88e7f255ea38ebd904eaa0/metrics/prometheus.go#L633-L640


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