What is Vigil?
masterstatus.example.com) to inform your users about service availability and planned maintenance announcements.repository·master·Indexed 24 days ago
https://github.com/valeriansaliou/vigilAn open-source microservices status page and monitoring tool that monitors distributed infrastructure and provides automated alerting via channels such as Slack, SMS, Email, Telegram, and Webhooks. Vigil supports multiple monitoring methods including HTTP, TCP, SSH, and ICMP probes, custom shell scripts, and integration via Vigil Reporter libraries or Vigil Local daemons for unreachable LAN services. Version 1.29.0.
status.example.com) to inform your users about service availability and planned maintenance announcements.Vigil uses three different methods to monitor infrastructure, depending on the type of service and network accessibility:
To ensure rapid notification and minimize downtime, it is recommended to configure these probes and reports to run frequently.
Vigil uses specific status variants to represent the health of your services:
healthy: No issues ongoing.sick: Services are under high load.dead: An outage is occurring.partial: A special status reported when a node has part of its replica dead, but the service is still considered partially degraded rather than in a full outage. This requires the probe.service.node.min_replicas_available option to be configured on the node.Vigil Local is an optional slave daemon used to monitor hosts that are behind a firewall or bound to a local loop/LAN network that the main Vigil master cannot reach.
Vigil Local monitors local poll and script replicas and periodically reports their status to the main Vigil status page master server.
To actively submit detailed health information (like CPU and RAM load) from your applications to Vigil, use a Vigil Reporter library. This allows Vigil to detect if a host system is under high load.
Available libraries include:
node-vigil-reporterts-vigil-reporterpy-vigil-reportergo-vigil-reporterrs-vigil-reporterdart-vigil-reportercs-vigil-reporterIf a library for your language is not listed, you can manually report metrics using the Vigil Reporter HTTP API.
You can define custom probes using shell scripts. These are passed in the Vigil configuration as a list of scripts to be executed for a specific node.
Scripts must return specific exit codes to communicate health status:
rc=0: healthyrc=1: sickrc=2 or higher: deadSince scripts are often multi-line, use triple single quotes (''') to define them in the configuration.
Security Warning: Scripts run in a system shell via a Vigil-owned sub-process. Always run Vigil as a non-root UNIX user with limited privileges to prevent scripts from performing unauthorized root-level actions.
scripts = [
'''
# Do some work...
exit 1
'''
]You can run Vigil using a pre-built Docker image.
docker pull valeriansaliou/vigil:v1.29.0docker run -p 8080:8080 -v /path/to/your/vigil/config.cfg:/etc/vigil.cfg valeriansaliou/vigil:v1.29.0Important Configuration for Docker:
In your config.cfg, you must set:
server.inet to 0.0.0.0:8080 (to allow external access to the container).assets.path to ./res/assets/ (to use the assets bundled inside the container).docker run -p 8080:8080 -v /path/to/your/vigil/config.cfg:/etc/vigil.cfg valeriansaliou/vigil:v1.29.0For Debian-based systems, you can use the official Vigil APT repository. Note that pre-built packages currently target 64-bit Debian 11 (bullseye) and 12 (bookworm), but they are compatible with other Debian versions and Ubuntu.
echo "deb [signed-by=/usr/share/keyrings/valeriansaliou_vigil.gpg] https://packagecloud.io/valeriansaliou/vigil/debian/ bookworm main" > /etc/apt/sources.list.d/valeriansaliou_vigil.listcurl -fsSL https://packagecloud.io/valeriansaliou/vigil/gpgkey | gpg --dearmor -o /usr/share/keyrings/valeriansaliou_vigil.gpgapt-get update
apt-get install vigil/etc/vigil/vigil.cfg and then run service vigil restart.echo "deb [signed-by=/usr/share/keyrings/valeriansaliou_vigil.gpg] https://packagecloud.io/valeriansaliou/vigil/debian/ bookworm main" > /etc/apt/sources.list.d/valeriansaliou_vigil.list
curl -fsSL https://packagecloud.io/valeriansaliou/vigil/gpgkey | gpg --dearmor -o /usr/share/keyrings/valeriansaliou_vigil.gpg
apt-get update
apt-get install vigilTo ensure reliable monitoring and avoid false positives, follow these deployment recommendations:
dead when they encounter a bot challenge.If you prefer using Rust's package manager, you can install the server directly via Cargo:
cargo install vigil-serverEnsure your $PATH is configured to include Cargo binaries. To build from source manually, use:
cargo build --releaseDependencies for source compilation:
libssl-dev (OpenSSL headers): Required for HTTPS probes and email notifications.libstrophe-dev (XMPP library headers): Required only if you need the XMPP notifier.cargo install vigil-serverVigil provides helper methods on the Notification struct to manage complex notification logic like escalation and reminders:
expected(reminders_only: bool): Determines if a notification is expected. If reminders_only is true, it returns true only if the status has NOT changed (changed == false), allowing for periodic reminders without re-triggering status change alerts.escalated_for(target_index: usize): Used to implement progressive paging. If escalation is enabled and the status hasn't changed, it returns true if the target_index is within the current escalated count. This allows notifying a primary on-call person first, and progressively notifying others as an outage persists.impl<'a> Notification<'a> {
pub fn expected(&self, reminders_only: bool) -> bool {
// ...
}
pub fn escalated_for(&self, target_index: usize) -> bool {
// ...
}
}When Vigil sends a notification to Gotify, it constructs a message with the following characteristics:
branding.page_title configured in Vigil.) or a reminder (This is a reminder.
). - The status of the service (e.g., STATUS: OK`).
- A list of nodes/replicas.
- The timestamp of the notification.
escalated_for(0), the priority parameter is set to 10 in the Gotify request.