Skip to content

chore(mixin): describe NodeNetworkTransmitErrs/NodeNetworkReceiveErrs as a share of packets - #3890

Open
lbarrosby wants to merge 2 commits into
prometheus:masterfrom
lbarrosby:mixin-network-errs-percentage
Open

lbarrosby wants to merge 2 commits into
prometheus:masterfrom
lbarrosby:mixin-network-errs-percentage

Conversation

@lbarrosby

Copy link
Copy Markdown

Supersedes #3752, carries over @v-zhuravlev's work (their commit is kept, with them as author).

NodeNetworkReceiveErrs and NodeNetworkTransmitErrs fire on rate(errs) / rate(packets) > 0.01, so $value is a ratio, but the description printed it as a count with printf "%.0f". A firing alert at 3% errors read "has encountered 0 receive errors in the last two minutes".

#3752 changed the format to %.2f; this applies @ArthurSens's suggestion from the review there and renders it with humanizePercentage:

host1 interface eth0 reported receive errors for 3% of packets in the last two minutes.

Tested by rendering the mixin and running a rule unit test:

jsonnet -S docs/node-mixin/alerts.jsonnet > node_alerts.yaml
promtool check rules node_alerts.yaml        # SUCCESS: 26 rules found
promtool test rules test.yaml                # SUCCESS

test.yaml feeds 3 receive errors and 2 transmit errors per 100 packets per minute for eth0 and expects both alerts at 75m with the descriptions above (3% and 2%). jsonnetfmt reports no diff.

AI disclosure: written with the help of Claude Code, reviewed and tested by me.

v-zhuravlev and others added 2 commits November 9, 2026 19:57
…escriptions

Signed-off-by: v-zhuravlev <v-zhuravlev@users.noreply.github.com>
The NodeNetworkReceiveErrs and NodeNetworkTransmitErrs expressions are
an error/packet ratio, so render the value with humanizePercentage.

Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com>
Signed-off-by: Lucas Barros <lucasbarros.kam@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants