Skip to content

Commit 1828316

Browse files
authored
feat: Add rule review status, polish rules (#3)
* Add rule review status * Fix and improve rules * Add tests for gauge threshold type rules * Improve rule rox_sensor_resolver_channel_size * Review and polish rules * Make numbers easier to read by humans * Bump version to 0.0.3
1 parent 8811191 commit 1828316

38 files changed

Lines changed: 488 additions & 57 deletions

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.0.2
1+
0.0.3

automated-rules/cluster_entities_relationship.toml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
rule_type = "composite"
22
display_name = "cluster_entities_relationship"
3-
description = "Validate cluster entities relationships"
3+
description = """
4+
Validate cluster entities relation of number of containers, their endpoints (ports), and IP addresses.
5+
"""
6+
7+
reviewed = "Partially, by a human"
8+
last_review_by = "Piotr"
9+
last_review_on = "30-01-2026"
410

511
[composite_config]
612

@@ -28,15 +34,22 @@ numerator = "endpoints"
2834
denominator = "containers"
2935
min_ratio = 0.5
3036
status = "yellow"
31-
message = "Entities: {containers} containers, {endpoints} endpoints, {ips} IPs - Low endpoint ratio"
37+
message = """
38+
Entities: {containers} containers, {endpoints} endpoints, {ips} IPs - Low endpoint to container ratio.
39+
This roughly means that more than half of the containers have 0 endpoints (ports).
40+
This is unusual, however possible.
41+
"""
3242

3343
[[composite_config.checks]]
3444
check_type = "ratio"
3545
numerator = "ips"
3646
denominator = "endpoints"
3747
min_ratio = 0.5
3848
status = "yellow"
39-
message = "Entities: {containers} containers, {endpoints} endpoints, {ips} IPs - Low IP ratio"
49+
message = """
50+
Entities: {containers} containers, {endpoints} endpoints, {ips} IPs - Low IP to endpoints ratio.
51+
We expect that there should be more unique IP addresses assigned to this number of containers and endpoints.
52+
"""
4053

4154
[messages]
4255
green = "Entities: {containers} containers, {endpoints} endpoints, {ips} IPs (healthy ratios)"

automated-rules/cpu_throttling.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
rule_type = "percentage"
22
display_name = "cpu_throttling"
33
description = "CPU throttling percentage"
4+
reviewed = "No, AI-generated"
5+
last_review_by = ""
6+
last_review_on = "never"
47

58
[percentage_config]
69
numerator = "rox_sensor_process_cpu_nr_throttled"

automated-rules/dedupe_cache_hit_rate.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
rule_type = "cache_hit_rate"
22
display_name = "dedupe_cache_hit_rate"
33
description = "Deduplication cache effectiveness"
4+
reviewed = "No, AI-generated"
5+
last_review_by = ""
6+
last_review_on = "never"
47

58
[cache_config]
69
hits_metric = "rox_sensor_dedupe_cache_hits"

automated-rules/file_descriptors.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
rule_type = "percentage"
22
display_name = "file_descriptors"
33
description = "File descriptor utilization"
4+
reviewed = "No, AI-generated"
5+
last_review_by = ""
6+
last_review_on = "never"
47

58
[percentage_config]
69
numerator = "process_open_fds"

automated-rules/go_goroutines.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ rule_type = "gauge_threshold"
22
metric_name = "go_goroutines"
33
display_name = "go_goroutines"
44
description = "Number of goroutines"
5+
reviewed = "No, AI-generated"
6+
last_review_by = ""
7+
last_review_on = "never"
58

69
[thresholds]
710
low = 10000

automated-rules/go_memstats_heap_objects.toml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,19 @@ rule_type = "gauge_threshold"
22
metric_name = "go_memstats_heap_objects"
33
display_name = "go_memstats_heap_objects"
44
description = "Number of heap objects"
5+
reviewed = "No, AI-generated"
6+
last_review_by = ""
7+
last_review_on = "never"
58

69
[thresholds]
710
low = 1000000
811
high = 10000000
912
higher_is_worse = true
1013

1114
[messages]
12-
green = "{value:.0f} heap objects (healthy)"
13-
yellow = "{value:.0f} heap objects (elevated - monitor memory)"
14-
red = "{value:.0f} heap objects (very high - significant memory use)"
15+
green = "{value_human} heap objects (healthy)"
16+
yellow = "{value_human} heap objects (elevated - monitor memory)"
17+
red = "{value_human} heap objects (very high - significant memory use)"
1518

1619
[remediation]
1720
red = "Very high heap object count. Check for memory leaks. Review object allocation patterns."

automated-rules/go_threads.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ rule_type = "gauge_threshold"
22
metric_name = "go_threads"
33
display_name = "go_threads"
44
description = "Number of OS threads"
5+
reviewed = "No, AI-generated"
6+
last_review_by = ""
7+
last_review_on = "never"
58

69
[thresholds]
710
low = 100

automated-rules/heap_utilization.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
rule_type = "percentage"
22
display_name = "heap_utilization"
33
description = "Heap memory utilization"
4+
reviewed = "No, AI-generated"
5+
last_review_by = ""
6+
last_review_on = "never"
47

58
[percentage_config]
69
numerator = "go_memstats_heap_alloc_bytes"

automated-rules/http_incoming_in_flight_requests.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ rule_type = "gauge_threshold"
22
metric_name = "http_incoming_in_flight_requests"
33
display_name = "http_incoming_in_flight_requests"
44
description = "HTTP in-flight requests"
5+
reviewed = "No, AI-generated"
6+
last_review_by = ""
7+
last_review_on = "never"
58

69
[thresholds]
710
low = 10

0 commit comments

Comments
 (0)