Bug 1770348 - Some NodeFilesystem* alerts display wrong percentage
Summary: Some NodeFilesystem* alerts display wrong percentage
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Monitoring
Version: 4.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.3.0
Assignee: Pawel Krupa
QA Contact: Junqi Zhao
URL:
Whiteboard:
Depends On:
Blocks: 1770779
TreeView+ depends on / blocked
 
Reported: 2019-11-08 19:39 UTC by Seth Jennings
Modified: 2020-01-23 11:12 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Filesystem usage has been wrongly reported as a value between 0 and 1 in OpenShift console. With the fix provided here the filesystem usage is now correctly reported as a percentage value between 0 and 100%.
Clone Of:
: 1770779 (view as bug list)
Environment:
Last Closed: 2020-01-23 11:11:45 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
warning.png (19.92 KB, image/png)
2019-11-08 19:39 UTC, Seth Jennings
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:0062 0 None None None 2020-01-23 11:12:03 UTC

Description Seth Jennings 2019-11-08 19:39:31 UTC
Created attachment 1634107 [details]
warning.png

Description of problem:
Alert message value is not a percentage but is printed as one

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

How reproducible:
Always

Steps to Reproduce:
1. Fill node filesystem to within alert levels
2. Observe alert message
3.

Actual results:
Filesystem on /dev/xvda3 at ip-10-0-143-157 has only 0.32% available space left and is filling up.

Expected results:
Filesystem on /dev/xvda3 at ip-10-0-143-157 has only 32% available space left and is filling up.

Additional info:
see attached alert message on web console

vs actually filesystem usage

[core@ip-10-0-143-157 ~]$ df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        7.8G     0  7.8G   0% /dev
tmpfs           7.9G     0  7.9G   0% /dev/shm
tmpfs           7.9G  7.1M  7.9G   1% /run
tmpfs           7.9G     0  7.9G   0% /sys/fs/cgroup
/dev/xvda3       15G   11G  4.9G  68% /sysroot <--
/dev/xvda2      976M  144M  765M  16% /boot
tmpfs           1.6G     0  1.6G   0% /run/user/1000

Comment 2 Frederic Branczyk 2019-11-11 10:25:44 UTC
Yes we should fix this, but we should use the `humanizePercentage` function available in the annotation templating, instead of fiddling with the conversion in PromQL, as this is a display concern.

Comment 3 Pawel Krupa 2019-11-11 10:36:57 UTC
This is already fixed in 4.3 by doing multiplication by 100 (as seen in all links from https://bugzilla.redhat.com/show_bug.cgi?id=1770348#c1). 4.2 used a different format for those alerts.

Comment 7 errata-xmlrpc 2020-01-23 11:11:45 UTC
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-2020:0062


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