1
+ rules :
2
+ - metadata :
3
+ kind : prequel
4
+ id : 9KdL2nQpR3sWyZzF4GxHkM
5
+ gen : 1
6
+ cre :
7
+ id : CRE-2025-0088
8
+ severity : 1
9
+ title : NATS JetStream Storage Exhaustion Detection
10
+ category : message-queue-problems
11
+ author : Community
12
+ description : |
13
+ Detects NATS JetStream storage exhaustion conditions when streams reach configured
14
+ storage limits (maximum bytes, maximum messages) causing message storage failures.
15
+ These patterns indicate insufficient stream storage capacity relative to message
16
+ production rate, leading to message rejection and potential data loss.
17
+ cause : |
18
+ JetStream streams configured with insufficient storage limits (max_bytes, max_msgs)
19
+ relative to message production rate and retention requirements. Messages exceed
20
+ configured stream storage capacity faster than they can be consumed or expired.
21
+ impact : |
22
+ Message storage failures, potential data loss, stream unavailability, producer
23
+ errors, degraded application performance, and inability to persist critical messages
24
+ in JetStream streams.
25
+ impactScore : 9
26
+ tags :
27
+ - nats
28
+ - jetstream
29
+ - storage-exhaustion
30
+ - message-storage-failure
31
+ - capacity-exceeded
32
+ - data-loss-risk
33
+ mitigation : |
34
+ Increase JetStream stream storage limits (max_bytes, max_msgs), implement stream
35
+ retention policies, scale consumer processing capacity, monitor stream storage
36
+ utilization, implement producer flow control, and configure appropriate discard
37
+ policies for stream overflow scenarios.
38
+ mitigationScore : 8
39
+ references :
40
+ - https://docs.nats.io/nats-concepts/jetstream/streams
41
+ - https://docs.nats.io/nats-concepts/jetstream/administration
42
+ - https://docs.nats.io/running-a-nats-service/nats_admin/jetstream_admin
43
+ applications :
44
+ - name : nats-server
45
+ version : " >=2.2.0"
46
+
47
+ rule :
48
+ set :
49
+ event :
50
+ source : cre.log.nats.jetstream
51
+ match :
52
+ - regex : ' (?i)jetstream\s+failed\s+to\s+store.*maximum\s+bytes\s+exceeded'
53
+ count : 1%
0 commit comments