When the server (debug logging enabled) is restarted with low diskspace, we get these messages:
nats-0 nats [1] 2023/12/04 12:57:55.395683 [DBG] RAFT [S1Nunr6R - S-R3F-njKShA5R] Not switching to candidate, no resources
nats-0 nats [1] 2023/12/04 12:57:55.398691 [DBG] RAFT [S1Nunr6R - C-R3F-MAtRDrOk] AppendEntry not processing inbound, no resources
nats-1 and nats-2 are still working fine here, but nats stream report reports replicas for nats-0 like this
nats-0!, nats-1, nats-2*
I think that it would be great if the server could report this issue through the healthz endpoint. So that this issue could detected without looking at the log or using the natscli.
Note there is still actually space left, but this issue can be fixed by allocating even more diskspace, and restarting nats.
Proposed change
When the server (debug logging enabled) is restarted with low diskspace, we get these messages:
nats-1 and nats-2 are still working fine here, but
nats stream report
reports replicas for nats-0 like thisI think that it would be great if the server could report this issue through the healthz endpoint. So that this issue could detected without looking at the log or using the natscli.
Note there is still actually space left, but this issue can be fixed by allocating even more diskspace, and restarting nats.
This is what is looks like when nats starts up
So somehow it determines that the low storage left on the device 3.58GB is not enough to enable jetstream storage fully (sets it to -1 B).
Use case
To be able to detect that a server is running low on diskspace through healthcheck endpoint.
Contribution
No response