computer-playbook/roles/sys-ctl-alm-compose
Kevin Veen-Birkenbach b49fdc509e
Refactor alarm compose service and systemctl templates
- Fixed bug where not both alarm services (email + telegram) were triggered.
- Removed direct OnFailure references for email and telegram,
  now handled by unified compose service.
- Introduced 01_core.yml in sys-ctl-alm-compose to structure
  role execution (subservices → core service → test run).
- Added configurable variables SYSTEMCTL_ALARM_COMPOSER_SUBSERVICES
  and SYSTEMCTL_ALARM_COMPOSER_DUMMY_MESSAGE.
- Replaced dedicated @.service template with generic systemctl template
  using systemctl_tpl_* variables for flexibility.
- Updated script.sh.j2 to collect exit codes and print clear errors.
- Fixed typos and streamlined vars in sys-systemctl.

See conversation: https://chatgpt.com/share/68a46172-7c3c-800f-a69c-0cb9edd6839f
2025-08-19 13:35:39 +02:00
..

Unified Service Failure Notifier

Description

This role installs a systemd service that sends notifications via both sys-ctl-alm-telegram and sys-ctl-alm-email when any service fails.

Overview

Optimized for prompt and comprehensive failure alerts, this role configures a unified notification service. It leverages the capabilities of both Telegram and Email notifications to ensure that administrators are quickly informed about service issues, enabling rapid troubleshooting.

Purpose

The primary purpose of this role is to provide a centralized mechanism for service failure notifications. By integrating with both the Telegram and Email notifier roles, it delivers reliable alerts through multiple channels, enhancing overall system observability and responsiveness.

Features

  • Unified Notification Service: Installs a systemd service that triggers both Telegram and Email alerts.
  • Dependency Integration: Works seamlessly with the sys-ctl-alm-telegram and sys-ctl-alm-email roles.
  • Automated Service Management: Automatically restarts the notifier service upon configuration changes.
  • Centralized Alerting: Provides a unified approach to monitor and notify about service failures.