Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1631029

Summary: [starter-ca-central-1] container_network_receive_bytes_total not available for all namespaces
Product: OpenShift Container Platform Reporter: Justin Pierce <jupierce>
Component: MonitoringAssignee: Frederic Branczyk <fbranczy>
Status: CLOSED CURRENTRELEASE QA Contact: Junqi Zhao <juzhao>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.11.0CC: anpicker, brad.williams, kgeorgie, scuppett, spasquie, surbania
Target Milestone: ---   
Target Release: 4.1.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-12-04 17:09:52 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:

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