System Monitoring 2022

systemd status notifier

Multi-Channel Notification System for systemd Service Monitoring

Duration

2 Weeks

Year

2022

Technologies

Bash systemd Email/SMTP Mattermost API PagerDuty API Pushover API Slack API sipgate SMS API

The Challenge

In critical server environments, immediate notifications about failed systemd services were necessary. The challenge was to develop a flexible system that supports various communication channels and seamlessly integrates into existing monitoring and alerting systems without impacting the performance of monitored services.

The Solution

The solution was a Bash-based notification system that can notify across multiple channels simultaneously: Email, Mattermost, PagerDuty, Pushover, Slack, and SMS (sipgate). The system monitors configurable systemd services and sends structured notifications with detailed service information. A modular architecture allows easy extension with additional notification channels.

Implementation

Implementation was done as an efficient Bash script with systemd integration. The system can run as a systemd service or cron job and supports granular configuration for service selection and notification channels. Comprehensive error handling, rate limiting, and template-based messages ensure reliable operation. HTML email templates provide professional presentation.

Results

A production-ready monitoring system deployed in critical infrastructures. The system significantly reduces MTTR (Mean Time To Repair) through immediate multi-channel notifications. The modular architecture enables easy adaptation to different environments and requirements. Support for all common notification services.

Key Features

Multi-Channel

Email, Slack, Mattermost, PagerDuty, Pushover, SMS

Real-time Monitoring

Immediate notifications on systemd service failures

Configurable

Flexible service selection and notification settings

Gallery