Repository navigation
feat(prometheus): add module_id to node series - #105
Merged
Merged
Conversation
Core 3.22.0 publishes per-module series on the node exporter, such as ns8_container_* and ns8_module_*_bytes, labeled with "module". Module alert rules are scoped by "module_id", so they could not match them. Copy "module" to "module_id" on node targets, only when the series has no module_id and the value is a module ID. Modules can then alert on their own containers without running a dedicated exporter. Assisted-by: Claude Code:claude-sonnet-5-5
Node series now carry module_id, a copy of module. The raw ns8_container_info query of the Containers table would show it as an extra, duplicated column. Assisted-by: Claude Code:claude-haiku-5-5
gsanchietti
force-pushed
the
containers_add_module_id
branch
from
October 16, 2026 09:47
afbbed5 to
825bee3
Compare
gsanchietti
marked this pull request as ready for review
October 16, 2026 12:11
This was referenced Oct 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Modules need to alert when one of their own services stops, without running an extra exporter for it. Core 3.22.0 already publishes per-module container and volume series on each node, but they carry a
modulelabel, while module alert rules only match series bymodule_id. Related to NethServer/dev#8093.Prometheus now copies
moduletomodule_idon node series, only when the series has nomodule_idyet and the value is a module ID. Core containers (module="core") and unattributed ones (module="unknown") are left unchanged. Alerts on these series now follow the same grouping as other module alerts.provision-prometheus: add the relabel rule to the scrape jobtests/30__node_module_id.robot: new suite, skipped on cores without container metricsmodule_idcolumn in tablesHow to test
ns8_container_info{module_id="metrics1"}: it returns the module containersns8_container_info{module="core",module_id!=""}: it returns nothingSee also
Generated by Claude Code:claude-haiku-5-5 with nethserver-pr