Skip to content

Add NethVoice failed unit alerts - #78

Closed
Amygos wants to merge 4 commits into
mainfrom
systemd-unit-failed-alert
Closed

Amygos wants to merge 4 commits into
mainfrom
systemd-unit-failed-alert

Conversation

@Amygos

@Amygos Amygos commented Jul 8, 2026 •

Copy link
Copy Markdown
Member

Summary

Add a built-in Prometheus alert for failed systemd service units exposed by
module exporters. The current selector is intentionally scoped to NethVoice and
NethVoice Proxy modules, matching nethvoice[0-9]* and
nethvoice-proxy[0-9]* module IDs.

This solves the immediate NethVoice use case, but the approach can be
generalized later to cover systemd service failures for all modules that expose
the same metric labels.

The PR also wires the alert to alert-proxy with a stable legacy alert ID,
checks that Prometheus loads the rule in Robot tests, and documents the new
available alert.

Related issue

NethServer/dev#8093

How to test

Automated checks already passed on this branch:

  • Publish images
  • Test module install scenario
  • Test module update scenario

Manual/local validation performed before opening the PR:

PYTHONDONTWRITEBYTECODE=1 python3 -m py_compile alert-proxy/alert-proxy
robot --dryrun --outputdir /tmp/ns8-metrics-robot-dryrun tests/10__check_services.robot
git diff --check

On an NS8 cluster with NethVoice or NethVoice Proxy exposing
systemd_unit_state, put one of their service units in failed state and
verify that Prometheus fires SystemdUnitFailed after 2 minutes.

Dependencies

Depends on the NethVoice exporter metric introduced by:

Amygos added 4 commits July 8, 2026 14:17
Generate a built-in rule for NethVoice systemd exporter targets.

Map alerts to a stable ID so portal state follows each failed unit.

Assisted-by: Codex:gpt-5.5-xhigh
Assert that Prometheus loads the generated SystemdUnitFailed rule.

Keep coverage at the metrics module level without failing services.

Assisted-by: Codex:gpt-5.5-xhigh
Document the new NethVoice systemd service failure alert.

Keep the available alerts list aligned with generated rules.

Assisted-by: Codex:gpt-5.5-xhigh
Extend the built-in failed systemd unit alert to match both
nethvoice and nethvoice-proxy module IDs. This keeps proxy services
covered by the same NethVoice alert flow.

Update the Robot check and README list to reflect the wider scope.

Assisted-by: Codex:gpt-5.5-xhigh
@Amygos Amygos self-assigned this Jul 8, 2026
@Amygos Amygos linked an issue Jul 8, 2026 that may be closed by this pull request
@Amygos
Amygos marked this pull request as ready for review July 8, 2026 14:59
@Amygos
Amygos requested review from DavidePrincipi, edospadoni and gsanchietti and removed request for gsanchietti July 8, 2026 14:59

@DavidePrincipi DavidePrincipi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Amygos Amygos closed this Jul 22, 2026
@Amygos

Amygos commented Jul 23, 2026

Copy link
Copy Markdown
Member Author

This was closed in favor of a more complete solution: NethServer/dev#8100

@Amygos
Amygos deleted the systemd-unit-failed-alert branch July 23, 2026 13:03
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.

NethVoice: Monitor service availability

2 participants