Skip to content
This repository has been archived by the owner on Mar 6, 2023. It is now read-only.

Default rules not working correctly #157

Closed
fajfer opened this issue Oct 26, 2018 · 5 comments
Closed

Default rules not working correctly #157

fajfer opened this issue Oct 26, 2018 · 5 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@fajfer
Copy link
Contributor

fajfer commented Oct 26, 2018

With the defaults now as they are CPU,RAM and DiskSpace alerts needs to be reworked.

eg.
(100 * (1 - avg(irate(node_cpu{job="node",mode="idle"}[5m])) BY (instance))) > 96
won't work, but
100 - (avg by (instance) (irate(node_cpu_seconds_total{job="node",mode="idle"}[5m])) * 100) > 96
will

I think the PromQL just changed as I remember those defaults to be working correctly (unless I am missing something and the first one is ok).

@paulfantom paulfantom added bug Something isn't working help wanted Extra attention is needed good first issue Good for newcomers labels Oct 26, 2018
@paulfantom
Copy link
Member

@SuperQ could you look at those expressions?

@fajfer
Copy link
Contributor Author

fajfer commented Oct 26, 2018

I've checked the rest just now.
CriticalRAMUsage is:
(1 - ((node_memory_MemFree + node_memory_Buffers + node_memory_Cached) / node_memory_MemTotal)) * 100 > 98
should be:
(1 - ((node_memory_MemFree_bytes + node_memory_Buffers_bytes + node_memory_Cached_bytes) / node_memory_MemTotal_bytes)) * 100 > 98

CriticalDiskSpace is:
node_filesystem_free{job="node",filesystem!~"^/run(/|$)"} / node_filesystem_size{job="node"} < 0.1
should be:
node_filesystem_free_bytes{job="node",filesystem!~"^/run(/|$)"} / node_filesystem_size_bytes{job="node"} < 0.1

@SuperQ
Copy link
Collaborator

SuperQ commented Nov 9, 2018

The expressions are fine, but the metric names have changed.

@fajfer
Copy link
Contributor Author

fajfer commented Nov 9, 2018

The expressions are fine, but the metric names have changed.

That's the point

@fajfer fajfer closed this as completed Nov 14, 2018
@lock
Copy link

lock bot commented Mar 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants