### Running Vigil Server with Configuration Source: https://context7.com/valeriansaliou/vigil/llms.txt This section provides command-line examples for running the Vigil server. It demonstrates how to start Vigil using a configuration file, both directly and via Cargo for development builds. It also includes an example for running Vigil using Docker, mounting a configuration file and exposing the necessary port. ```bash # Run with configuration file ./vigil -c /path/to/config.cfg # Or via Cargo cargo run --release -- -c config.cfg # Via Docker docker run -p 8080:8080 \ -v /path/to/config.cfg:/etc/vigil.cfg \ valeriansaliou/vigil:v1.28.6 ``` -------------------------------- ### Install Vigil Package (Debian/Ubuntu) Source: https://github.com/valeriansaliou/vigil/blob/master/README.md Installs the Vigil package after the repository has been added. This command updates the package list and then installs the Vigil server, making it available for configuration and execution. ```bash apt-get install vigil ``` -------------------------------- ### Install Vigil Server via Cargo Source: https://github.com/valeriansaliou/vigil/blob/master/README.md Installs the Vigil server directly using Rust's Cargo package manager. This method requires Cargo to be installed and assumes your PATH environment variable is correctly configured to access the installed binaries. ```bash cargo install vigil-server ``` -------------------------------- ### Example Shell Script Probe Configuration Source: https://github.com/valeriansaliou/vigil/blob/master/README.md This example demonstrates how to configure a custom probe using a shell script in Vigil. The script's return code determines the replica's health status (0 for healthy, 1 for sick, 2+ for dead). Scripts are passed as literal strings enclosed in triple quotes. ```shell scripts = [ ''' # Do some work... exit 1 ''' ] ``` -------------------------------- ### Example Webhook Payload Structure Source: https://github.com/valeriansaliou/vigil/blob/master/README.md This is an example of a JSON-formatted payload that Vigil sends via Webhook upon any status change. It includes alert details and can also include reminders if configured. This payload can be used to integrate Vigil with custom notification systems. ```json { "type": "changed", "status": "dead", "time": "08:58:28 UTC+0200", "replicas": [ "web:core:tcp://edge-3.pool.net.crisp.chat:80" ], "page": { "title": "Crisp Status", "url": "https://status.crisp.chat/" } } ``` -------------------------------- ### Add Vigil APT Repository (Debian/Ubuntu) Source: https://github.com/valeriansaliou/vigil/blob/master/README.md This snippet adds the Vigil APT repository to your system's sources list, allowing you to install Vigil using apt-get. It requires curl and gpg to fetch and store the repository's GPG key for secure package verification. ```bash 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 ``` -------------------------------- ### Compile Vigil from Source Source: https://github.com/valeriansaliou/vigil/blob/master/README.md Compiles the Vigil project from its source code using Cargo. This command builds a release version of Vigil, with the compiled binaries located in the `./target/release` directory. Ensure you have `libssl-dev` and optionally `libstrophe-dev` installed for SSL and XMPP support respectively. ```bash cargo build --release ``` -------------------------------- ### Get Report via MCP Source: https://context7.com/valeriansaliou/vigil/llms.txt Exposes an MCP endpoint for AI agents to query status reports when `mcp_server = true` is configured. ```APIDOC ## POST /mcp/probes ### Description When `mcp_server = true` is configured, Vigil exposes an MCP endpoint for AI agents to query status. This allows AI agents to use the `get_report` tool. ### Method POST ### Endpoint https://status.example.com/mcp/probes ### Parameters #### Headers - **Content-Type** (string) - Required - application/json #### Request Body - **jsonrpc** (string) - Required - Must be "2.0". - **method** (string) - Required - Must be "tools/call". - **params** (object) - Required - Parameters for the tool call. - **name** (string) - Required - The name of the tool, must be "get_report". - **arguments** (object) - Required - Arguments for the `get_report` tool (currently empty). - **id** (integer) - Required - The request ID. ### Request Example ```json { "jsonrpc": "2.0", "method": "tools/call", "params": { "name": "get_report", "arguments": {} }, "id": 1 } ``` ### Response #### Success Response (200) - The response contains the same data as the `/status/report` endpoint. The MCP server also provides instructions for AI agents. #### Response Example ```json { "jsonrpc": "2.0", "result": { "message": "Vigil MCP Server. Use this server to get the status report of all Vigil Status Page services and nodes.", "data": { ... status report data ... } }, "id": 1 } ``` ``` -------------------------------- ### Get Alert Ignore Rules Source: https://context7.com/valeriansaliou/vigil/llms.txt Retrieves the current duration for silencing downtime reminders. Requires manager authentication. ```APIDOC ## GET /manager/prober/alerts/ignored ### Description Retrieves the current reminder ignore duration (for silencing alerts). ### Method GET ### Endpoint https://status.example.com/manager/prober/alerts/ignored ### Parameters #### Headers - **Authorization** (string) - Required - Basic authentication with manager token. ### Response #### Success Response (200) - **reminders_seconds** (integer or null) - The duration in seconds for which reminders are silenced. Returns `null` if no ignore is active. #### Response Example ```json { "reminders_seconds": 450 } ``` ``` -------------------------------- ### Get Full Status Report Source: https://context7.com/valeriansaliou/vigil/llms.txt Fetches a comprehensive JSON report detailing the health status of all probes, nodes, and replicas. This provides a granular view of the system's health, including specific component statuses. ```bash # Get detailed status report curl https://status.example.com/status/report # Response: { "health": "healthy", "page": { "name": "Crisp Status", "url": "https://status.crisp.chat/" }, "probes": [ { "name": "Web nodes", "status": "healthy", "nodes": [ { "name": "Core main router", "status": "healthy", "replicas": ["healthy", "healthy"] }, { "name": "Core main load balancer", "status": "healthy", "replicas": ["healthy", "healthy", "healthy"] } ] }, { "name": "Relay nodes", "status": "sick", "nodes": [ { "name": "Visitor realtime sockets", "status": "sick", "replicas": ["healthy", "sick"] } ] } ] } ``` -------------------------------- ### Get Report via MCP Source: https://context7.com/valeriansaliou/vigil/llms.txt Exposes an MCP endpoint for AI agents to query the status report. This is enabled when `mcp_server = true` is configured. ```bash # MCP endpoint is available at /mcp/probes # This allows AI agents to use the get_report tool # Example MCP tool call (JSON-RPC format): curl -X POST https://status.example.com/mcp/probes \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "method": "tools/call", "params": { "name": "get_report", "arguments": {} }, "id": 1 }' ``` -------------------------------- ### Get Status Badge Source: https://context7.com/valeriansaliou/vigil/llms.txt Generates an SVG badge image representing the current system status. This is ideal for embedding in README files or other documentation to visually indicate service availability. ```bash # Get color badge (shows status with color) curl https://status.example.com/badge/color -o status-badge.svg # Get icon badge (shows status with icon) curl https://status.example.com/badge/icon -o status-icon.svg # Embed in Markdown: # ![Status](https://status.example.com/badge/color) ``` -------------------------------- ### List Published Announcements (HTTP GET) Source: https://github.com/valeriansaliou/vigil/blob/master/PROTOCOL.md Retrieves a list of all published announcements from the Vigil Manager API. Requires Basic authentication with a manager token. ```http HTTP GET https://status.example.com/manager/announcements/ ``` -------------------------------- ### Get Alert Ignore Rules via API Source: https://context7.com/valeriansaliou/vigil/llms.txt Retrieves the current duration for silencing downtime reminders. Requires a manager token for authorization. ```bash # Check current ignore rules curl https://status.example.com/manager/prober/alerts/ignored \ -H "Authorization: Basic $(echo -n ':YOUR_MANAGER_TOKEN' | base64)" ``` -------------------------------- ### Get Overall Status as Text Source: https://context7.com/valeriansaliou/vigil/llms.txt Retrieves the current overall health status of the system as a plain text string. This endpoint is useful for quick checks and integrations where only the high-level status is needed. ```bash # Get current status as plain text curl https://status.example.com/status/text # Response (plain text): healthy ``` -------------------------------- ### List Prober Alerts (HTTP GET) Source: https://github.com/valeriansaliou/vigil/blob/master/PROTOCOL.md Retrieves a list of prober alerts from the Vigil Manager API. Requires Basic authentication with a manager token. ```http HTTP GET https://status.example.com/manager/prober/alerts/ ``` -------------------------------- ### Resolve Prober Alert Ignore Rules (HTTP GET) Source: https://github.com/valeriansaliou/vigil/blob/master/PROTOCOL.md Retrieves the current ignore rules for prober alerts from the Vigil Manager API. Requires Basic authentication with a manager token. ```http HTTP GET https://status.example.com/manager/prober/alerts/ignored/ ``` -------------------------------- ### Script Probes Configuration Source: https://github.com/valeriansaliou/vigil/blob/master/README.md How to configure custom probes using shell scripts and the expected return codes for health status. ```APIDOC ## Script Probes Configuration ### Description Allows users to create custom monitoring probes by writing shell scripts. The script's exit code determines the health status of the monitored node. ### Method Configuration (not an HTTP endpoint) ### Endpoint N/A ### Parameters #### Configuration - **scripts** (array of strings) - A list of shell scripts to be executed for monitoring. - Scripts are passed as literal strings enclosed in `'''`. ### Script Return Codes - **`rc=0`**: `healthy` - **`rc=1`**: `sick` - **`rc=2` and higher**: `dead` ### Configuration Example ``` scripts = [ ''' # Do some work... exit 1 ''' ] ``` ### Notes - Scripts are executed in a system shell ran by a Vigil-owned sub-process. - It is recommended to run Vigil as a user with limited privileges to prevent security risks. ``` -------------------------------- ### Basic Server Configuration Source: https://context7.com/valeriansaliou/vigil/llms.txt TOML configuration for the Vigil server, including logging, network settings, worker count, MCP server enablement, and API tokens. ```toml # config.cfg [server] log_level = "error" # debug, info, warn, error inet = "[::1]:8080" # Listen address (IPv4/IPv6) workers = 4 # Number of HTTP workers mcp_server = false # Enable MCP server for AI agents manager_token = "secret123" # Token for Manager API reporter_token = "secret456" # Token for Reporter API [assets] path = "./res/assets/" # Path to static assets [branding] page_title = "Status Page" page_url = "https://status.example.com/" company_name = "My Company" icon_color = "#1972F5" icon_url = "https://example.com/icon.png" logo_color = "#1972F5" logo_url = "https://example.com/logo.svg" website_url = "https://example.com/" support_url = "mailto:support@example.com" ``` -------------------------------- ### Report Node Metrics via Reporter API Source: https://context7.com/valeriansaliou/vigil/llms.txt Reports CPU and RAM load from an application node for 'push' mode monitoring. Requires a reporter token for authorization and sends metrics in JSON format. Handles errors for invalid values, not found probes/nodes, or incorrect push mode configurations. ```bash # Report metrics from an application node curl -X POST https://status.example.com/reporter/web/api \ -H "Authorization: Basic $(echo -n ':YOUR_REPORTER_TOKEN' | base64)" \ -H "Content-Type: application/json; charset=utf-8" \ -d '{ "replica": "192.168.1.10", "interval": 30, "load": { "cpu": 0.45, "ram": 0.72 } }' # Response: 200 OK (empty body on success) # Error responses: # 400 Bad Request - Invalid load values # 404 Not Found - Probe/node not found # 412 Precondition Failed - Node is not in push mode ``` -------------------------------- ### Pull and Run Vigil Docker Image Source: https://github.com/valeriansaliou/vigil/blob/master/README.md Pulls a specific version of the Vigil Docker image from Docker Hub and runs it. This command maps port 8080 and mounts a local configuration file into the container. Ensure the configuration file has `server.inet` set to `0.0.0.0:8080` and `assets.path` set to `./res/assets/`. ```bash docker pull valeriansaliou/vigil:v1.28.6 docker run -p 8080:8080 -v /path/to/your/vigil/config.cfg:/etc/vigil.cfg valeriansaliou/vigil:v1.28.6 ``` -------------------------------- ### Create Announcement via API Source: https://context7.com/valeriansaliou/vigil/llms.txt Creates a new announcement on the status page. Requires a manager token for authorization and sends announcement details in JSON format. ```bash curl -X POST https://status.example.com/manager/announcement \ -H "Authorization: Basic $(echo -n ':YOUR_MANAGER_TOKEN' | base64)" \ -H "Content-Type: application/json; charset=utf-8" \ -d '{ "title": "Scheduled Maintenance", "text": "We will be performing scheduled maintenance on our database servers on Saturday, January 15th from 2:00 AM to 4:00 AM UTC. Some services may be temporarily unavailable during this time." }' ``` -------------------------------- ### Enabling ICMP Probes on Linux with setcap Source: https://context7.com/valeriansaliou/vigil/llms.txt This command uses `setcap` to grant the Vigil executable the necessary capabilities to create raw sockets on Linux. This is required for Vigil to perform ICMP probes, which are used for network-level reachability checks. Ensure the path to the Vigil binary is correct. ```bash # Allow Vigil to create raw sockets for ICMP probes setcap 'cap_net_raw+ep' /bin/vigil ``` -------------------------------- ### Create Announcement Source: https://context7.com/valeriansaliou/vigil/llms.txt Creates a new announcement to be displayed on the status page. Requires manager authentication. ```APIDOC ## POST /manager/announcement ### Description Creates a new announcement to be displayed on the status page. ### Method POST ### Endpoint https://status.example.com/manager/announcement ### Parameters #### Headers - **Authorization** (string) - Required - Basic authentication with manager token. - **Content-Type** (string) - Required - application/json; charset=utf-8 #### Request Body - **title** (string) - Required - The title of the announcement. - **text** (string) - Required - The main content of the announcement. ### Request Example ```json { "title": "Scheduled Maintenance", "text": "We will be performing scheduled maintenance on our database servers on Saturday, January 15th from 2:00 AM to 4:00 AM UTC. Some services may be temporarily unavailable during this time." } ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier of the created announcement. #### Response Example ```json { "id": "550e8400-e29b-41d4-a716-446655440000" } ``` ``` -------------------------------- ### Probe Configuration Source: https://context7.com/valeriansaliou/vigil/llms.txt TOML configuration for defining services, nodes, and probes, supporting both poll (HTTP, TCP, SSH, ICMP) and push modes. ```toml # HTTP/TCP/SSH/ICMP Poll Mode [probe] [[probe.service]] id = "web" label = "Web Services" [[probe.service.node]] id = "api" label = "API Servers" mode = "poll" replicas = [ "https://api.example.com/health", "https://api2.example.com/health" ] http_body_healthy_match = "\"status\":\"ok\"" # Optional: regex to match response body [[probe.service.node]] id = "router" label = "Network Router" mode = "poll" replicas = [ "icmp://router.example.com", "tcp://router.example.com:80", "ssh://router.example.com:22" ] # Push Mode (for Vigil Reporter) [[probe.service]] id = "apps" label = "Application Servers" [[probe.service.node]] id = "backend" label = "Backend Services" mode = "push" reveal_replica_name = true # Show replica IPs on status page ``` -------------------------------- ### Vigil Notification Configuration Source: https://context7.com/valeriansaliou/vigil/llms.txt This TOML configuration block details various notification settings for Vigil. It includes options for startup notifications, reminder intervals and backoff functions, and specific configurations for Slack, email, Telegram, and webhook notifiers. This allows users to customize how and where alerts are sent. ```toml [notify] startup_notification = true reminder_interval = 300 # Seconds between reminder notifications reminder_backoff_function = "linear" # none, linear, square, cubic reminder_backoff_limit = 3 [notify.slack] hook_url = "https://hooks.slack.com/services/xxx/yyy/zzz" mention_channel = true reminders_only = false [notify.email] from = "status@example.com" to = "alerts@example.com" smtp_host = "smtp.example.com" smtp_port = 587 smtp_username = "user" smtp_password = "pass" smtp_encrypt = true [notify.telegram] bot_token = "123456:ABC-DEF" chat_id = "-1001234567890" [notify.webhook] hook_url = "https://example.com/webhook/vigil" # Webhook payload format: # { # "type": "changed", # "changed" or "reminder" # "status": "dead", # "healthy", "sick", or "dead" # "time": "08:58:28 UTC+0200", # "replicas": ["web:api:https://api.example.com/health"], # "page": {"title": "Status Page", "url": "https://status.example.com/"} # } ``` -------------------------------- ### List Prober Alerts via API Source: https://context7.com/valeriansaliou/vigil/llms.txt Retrieves all current alerts, including sick and dead replicas, from the prober system. Requires a manager token for authorization. ```bash # Get all active alerts curl https://status.example.com/manager/prober/alerts \ -H "Authorization: Basic $(echo -n ':YOUR_MANAGER_TOKEN' | base64)" ``` -------------------------------- ### Vigil Metrics Tuning Configuration Source: https://context7.com/valeriansaliou/vigil/llms.txt This TOML configuration block specifies parameters for tuning Vigil's metrics collection and polling. It covers intervals, retries, HTTP status codes for health, delays for dead/sick states, and parallelism for polling and script execution. These settings allow for fine-tuning performance and responsiveness. ```toml [metrics] poll_interval = 120 # Seconds between poll checks poll_retry = 2 # Retries for failed polls poll_retry_wait = 500 # Milliseconds between retries poll_http_status_healthy_above = 200 poll_http_status_healthy_below = 400 poll_delay_dead = 10 # Seconds response time = dead poll_delay_sick = 5 # Seconds response time = sick poll_parallelism = 4 # Concurrent poll threads push_delay_dead = 20 # Seconds without report = dead push_system_cpu_sick_above = 0.90 push_system_ram_sick_above = 0.90 script_interval = 300 # Seconds between script runs script_parallelism = 2 # Concurrent script threads local_delay_dead = 40 # Seconds without local report = dead ``` -------------------------------- ### List Prober Alerts Source: https://context7.com/valeriansaliou/vigil/llms.txt Retrieves all current alerts, including sick and dead replicas, from the prober system. Requires manager authentication. ```APIDOC ## GET /manager/prober/alerts ### Description Retrieves all current alerts (sick and dead replicas). ### Method GET ### Endpoint https://status.example.com/manager/prober/alerts ### Parameters #### Headers - **Authorization** (string) - Required - Basic authentication with manager token. ### Response #### Success Response (200) - **dead** (array of objects) - List of dead replicas. Each object contains: - **probe** (string) - The probe identifier. - **node** (string) - The node identifier. - **replica** (string) - The replica URL or address. - **sick** (array of objects) - List of sick replicas. Each object contains: - **probe** (string) - The probe identifier. - **node** (string) - The node identifier. - **replica** (string) - The replica URL or address. #### Response Example ```json { "dead": [ { "probe": "web", "node": "api", "replica": "https://api.example.com/health" } ], "sick": [ { "probe": "relay", "node": "socket-client", "replica": "192.168.1.50" } ] } ``` ``` -------------------------------- ### List Announcements via Manager API Source: https://context7.com/valeriansaliou/vigil/llms.txt Retrieves a list of all published announcements currently displayed on the status page. Requires a manager token for authorization and returns an array of announcement objects, each with an ID and title. ```bash # List all announcements curl https://status.example.com/manager/announcements \ -H "Authorization: Basic $(echo -n ':YOUR_MANAGER_TOKEN' | base64)" # Response: [ { "id": "550e8400-e29b-41d4-a716-446655440000", "title": "Scheduled Maintenance" }, { "id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8", "title": "Database Migration in Progress" } ] ``` -------------------------------- ### Insert New Announcement (HTTP POST) Source: https://github.com/valeriansaliou/vigil/blob/master/PROTOCOL.md Inserts a new announcement into the Vigil Manager API. Requires Basic authentication with a manager token and sends announcement title and text as JSON. ```json { "title": "", "text": "<text>" } ``` -------------------------------- ### Report Health Status via Reporter API (Local Mode) Source: https://context7.com/valeriansaliou/vigil/llms.txt Reports the health status from a Vigil Local daemon for nodes behind firewalls, used in 'local' monitoring mode. Requires a reporter token for authorization and accepts health status ('healthy', 'sick', 'dead') in JSON format. ```bash # Report health from Vigil Local curl -X POST https://status.example.com/reporter/internal/gateway \ -H "Authorization: Basic $(echo -n ':YOUR_REPORTER_TOKEN' | base64)" \ -H "Content-Type: application/json; charset=utf-8" \ -d '{ "replica": "local-gateway-01", "interval": 30, "health": "healthy" }' # Health values: "healthy", "sick", "dead" # Response: 200 OK (empty body on success) ``` -------------------------------- ### Report Replica Status (HTTP POST) Source: https://github.com/valeriansaliou/vigil/blob/master/PROTOCOL.md Reports the status of a replica to the Vigil Reporter API. Requires Basic authentication with a reporter token and sends replica ID, push interval, and load metrics (CPU, RAM) as JSON. ```json { "replica": "<replica_id>", "interval": 30, "load": { "cpu": 0.30, "ram": 0.80 } } ``` -------------------------------- ### Vigil Reporter HTTP API Source: https://github.com/valeriansaliou/vigil/blob/master/README.md Information on how to manually report node metrics to the Vigil endpoint using its HTTP API. ```APIDOC ## Vigil Reporter HTTP API ### Description This API allows your applications to actively submit health information and metrics to Vigil. It's useful for monitoring application hosts and reporting system load. ### Method POST (typically, for submitting metrics) ### Endpoint `/api/reporter` (or your configured Vigil endpoint) ### Parameters Refer to the [Vigil Reporter HTTP API protocol specifications](./PROTOCOL.md#vigil-reporter-http-api) for detailed parameter information, including required fields for reporting metrics. ### Request Example (Refer to protocol specifications for detailed examples) ### Response #### Success Response (200) Indicates that the metrics were successfully received and processed by Vigil. #### Response Example (Refer to protocol specifications for detailed examples) ``` -------------------------------- ### Custom Script Probe for External Service Status Source: https://context7.com/valeriansaliou/vigil/llms.txt This snippet defines a custom probe for an external service using a shell script. It uses `curl` to fetch the status and exits with specific codes (0 for healthy, 1 for sick, 2 for dead) based on the response. This is useful for monitoring services where direct HTTP checks are not sufficient or when custom logic is needed. ```toml [[probe.service.node]] id = "external" label = "External Service" mode = "script" scripts = [ ''' response=$(curl -s https://external-api.com/status) if [ "$response" = "ok" ]; then exit 0 # healthy elif [ "$response" = "degraded" ]; then exit 1 # sick else exit 2 # dead fi ''' ] ``` -------------------------------- ### Vigil Manager HTTP API Source: https://github.com/valeriansaliou/vigil/blob/master/README.md Details on interacting with the Vigil Manager's HTTP API for administrative actions. ```APIDOC ## Vigil Manager HTTP API ### Description Provides an interface to perform administrative actions on a running Vigil instance, such as publishing public announcements. ### Method Various (e.g., POST, PUT, DELETE, depending on the action) ### Endpoint `/api/manager` (or your configured Vigil Manager endpoint) ### Parameters Refer to the [Vigil Manager HTTP API protocol specifications](./PROTOCOL.md#vigil-manager-http-api) for detailed endpoint paths and parameter requirements for administrative actions. ### Request Example (Refer to protocol specifications for detailed examples) ### Response #### Success Response (200) Indicates that the administrative action was successfully processed. #### Response Example (Refer to protocol specifications for detailed examples) ``` -------------------------------- ### Flush Replica via Reporter API Source: https://context7.com/valeriansaliou/vigil/llms.txt Removes a specific replica from monitoring, typically used when a server is shutting down. This DELETE request requires a reporter token and targets the replica by its identifier. Errors are returned if the replica is not found or if the node is not in push/local mode. ```bash # Remove a replica from monitoring curl -X DELETE https://status.example.com/reporter/web/api/192.168.1.10 \ -H "Authorization: Basic $(echo -n ':YOUR_REPORTER_TOKEN' | base64)" # Response: 200 OK (empty body on success) # Error responses: # 404 Not Found - Replica not found # 412 Precondition Failed - Node is not in push/local mode ``` -------------------------------- ### Vigil Manager API - List prober alerts Source: https://github.com/valeriansaliou/vigil/blob/master/PROTOCOL.md Retrieve a list of prober alerts. Requires manager authentication. ```APIDOC ## GET /manager/prober/alerts/ ### Description Retrieve a list of prober alerts. Requires manager authentication. ### Method GET ### Endpoint `https://status.example.com/manager/prober/alerts/` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) (Response structure not detailed in source) #### Response Example (No example provided in source) ``` -------------------------------- ### Reporter API Source: https://context7.com/valeriansaliou/vigil/llms.txt API endpoints for reporting metrics and health status to Vigil, used for push and local monitoring modes. ```APIDOC ## POST /reporter/web/api ### Description Reports CPU/RAM load from an application node running Vigil Reporter. Used for `push` mode nodes. ### Method POST ### Endpoint /reporter/web/api ### Parameters #### Headers - **Authorization** (string) - Required - Basic authentication with reporter token (`Basic :YOUR_REPORTER_TOKEN`). - **Content-Type** (string) - Required - `application/json; charset=utf-8`. #### Request Body - **replica** (string) - Required - The identifier for the replica reporting metrics. - **interval** (integer) - Required - The reporting interval in seconds. - **load** (object) - Required - An object containing CPU and RAM load. - **cpu** (number) - Required - CPU load, a value between 0 and 1. - **ram** (number) - Required - RAM load, a value between 0 and 1. ### Request Example ```json { "replica": "192.168.1.10", "interval": 30, "load": { "cpu": 0.45, "ram": 0.72 } } ``` ### Response #### Success Response (200) - Empty body on success. #### Error Responses - **400 Bad Request** - Invalid load values. - **404 Not Found** - Probe/node not found. - **412 Precondition Failed** - Node is not in push mode. ``` ```APIDOC ## POST /reporter/internal/gateway ### Description Reports health status from Vigil Local daemon for nodes behind firewalls. Used for `local` mode nodes. ### Method POST ### Endpoint /reporter/internal/gateway ### Parameters #### Headers - **Authorization** (string) - Required - Basic authentication with reporter token (`Basic :YOUR_REPORTER_TOKEN`). - **Content-Type** (string) - Required - `application/json; charset=utf-8`. #### Request Body - **replica** (string) - Required - The identifier for the replica reporting health. - **interval** (integer) - Required - The reporting interval in seconds. - **health** (string) - Required - The health status (`healthy`, `sick`, or `dead`). ### Request Example ```json { "replica": "local-gateway-01", "interval": 30, "health": "healthy" } ``` ### Response #### Success Response (200) - Empty body on success. #### Error Responses - **400 Bad Request** - Invalid health value. - **404 Not Found** - Probe/node not found. - **412 Precondition Failed** - Node is not in local mode. ``` ```APIDOC ## DELETE /reporter/web/api/{replica} ### Description Removes a replica from tracking, typically used when shutting down a server or a specific instance. ### Method DELETE ### Endpoint /reporter/web/api/{replica} ### Parameters #### Path Parameters - **replica** (string) - Required - The identifier of the replica to remove. #### Headers - **Authorization** (string) - Required - Basic authentication with reporter token (`Basic :YOUR_REPORTER_TOKEN`). ### Request Example ```bash curl -X DELETE https://status.example.com/reporter/web/api/192.168.1.10 \ -H "Authorization: Basic $(echo -n ':YOUR_REPORTER_TOKEN' | base64)" ``` ### Response #### Success Response (200) - Empty body on success. #### Error Responses - **404 Not Found** - Replica not found. - **412 Precondition Failed** - Node is not in push or local mode. ``` -------------------------------- ### Vigil Manager API - Resolve ignore rules for prober alerts Source: https://github.com/valeriansaliou/vigil/blob/master/PROTOCOL.md Retrieve the current ignore rules for prober alerts. Requires manager authentication. ```APIDOC ## GET /manager/prober/alerts/ignored/ ### Description Retrieve the current ignore rules for prober alerts. Requires manager authentication. ### Method GET ### Endpoint `https://status.example.com/manager/prober/alerts/ignored/` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) (Response structure not detailed in source) #### Response Example (No example provided in source) ``` -------------------------------- ### Vigil Manager API - List published announcements Source: https://github.com/valeriansaliou/vigil/blob/master/PROTOCOL.md Retrieve a list of all published announcements. Requires manager authentication. ```APIDOC ## GET /manager/announcements/ ### Description Retrieve a list of all published announcements. Requires manager authentication. ### Method GET ### Endpoint `https://status.example.com/manager/announcements/` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) (Response structure not detailed in source) #### Response Example (No example provided in source) ``` -------------------------------- ### Vigil Manager API - Insert a new announcement Source: https://github.com/valeriansaliou/vigil/blob/master/PROTOCOL.md Insert a new announcement into the Vigil system. Requires manager authentication and a JSON request body. ```APIDOC ## POST /manager/announcement/ ### Description Insert a new announcement into the Vigil system. Requires manager authentication and a JSON request body. ### Method POST ### Endpoint `https://status.example.com/manager/announcement/` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **title** (string) - Required - The title for the announcement. - **text** (string) - Required - The description text for the announcement (can be multi-line). ### Request Example ```json { "title": "<title>", "text": "<text>" } ``` ### Response #### Success Response (200) (Response structure not detailed in source) #### Response Example (No example provided in source) ``` -------------------------------- ### Manager API Source: https://context7.com/valeriansaliou/vigil/llms.txt API endpoints for managing announcements displayed on the status page. ```APIDOC ## GET /manager/announcements ### Description Retrieves all published announcements currently displayed on the status page. ### Method GET ### Endpoint /manager/announcements ### Parameters #### Headers - **Authorization** (string) - Required - Basic authentication with manager token (`Basic :YOUR_MANAGER_TOKEN`). ### Request Example ```bash curl https://status.example.com/manager/announcements \ -H "Authorization: Basic $(echo -n ':YOUR_MANAGER_TOKEN' | base64)" ``` ### Response #### Success Response (200) - **announcements** (array) - An array of announcement objects. - **id** (string) - The unique identifier of the announcement. - **title** (string) - The title of the announcement. #### Response Example ```json [ { "id": "550e8400-e29b-41d4-a716-446655440000", "title": "Scheduled Maintenance" }, { "id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8", "title": "Database Migration in Progress" } ] ``` ``` ```APIDOC ## POST /manager/announcements ### Description Publishes a new announcement to the status page. ### Method POST ### Endpoint /manager/announcements ### Parameters #### Headers - **Authorization** (string) - Required - Basic authentication with manager token (`Basic :YOUR_MANAGER_TOKEN`). - **Content-Type** (string) - Required - `application/json; charset=utf-8`. #### Request Body - **title** (string) - Required - The title of the announcement. - **content** (string) - Required - The main content of the announcement. - **starts_at** (string) - Optional - The start time for the announcement (ISO 8601 format). - **ends_at** (string) - Optional - The end time for the announcement (ISO 8601 format). - **severity** (string) - Optional - The severity level of the announcement (`info`, `warning`, `critical`). Defaults to `info`. ### Request Example ```json { "title": "System Update", "content": "We will be performing a system update on Saturday at 2 AM UTC.", "starts_at": "2023-10-27T02:00:00Z", "ends_at": "2023-10-27T04:00:00Z", "severity": "warning" } ``` ### Response #### Success Response (201 Created) - **id** (string) - The unique identifier of the newly created announcement. - **title** (string) - The title of the announcement. #### Error Responses - **400 Bad Request** - Invalid input data. ``` -------------------------------- ### Vigil Reporter API - Report a replica Source: https://github.com/valeriansaliou/vigil/blob/master/PROTOCOL.md Report the status of a replica to the Vigil system. This endpoint requires authentication and specific request data. ```APIDOC ## POST /reporter/<probe_id>/<node_id>/ ### Description Report the status of a replica to the Vigil system. This endpoint requires authentication and specific request data. ### Method POST ### Endpoint `https://status.example.com/reporter/<probe_id>/<node_id>/` ### Parameters #### Path Parameters - **probe_id** (string) - Required - The parent probe of the node. - **node_id** (string) - Required - The parent node of the reporting replica. #### Query Parameters None #### Request Body - **replica** (string) - Required - The replica unique identifier (e.g., the server LAN IP). - **interval** (integer) - Required - The push interval in seconds. - **load** (object) - Required - An object containing load information. - **cpu** (float) - Required - The general CPU load, from 0.00 to 1.00. - **ram** (float) - Required - The general RAM load, from 0.00 to 1.00. ### Request Example ```json { "replica": "<replica_id>", "interval": 30, "load": { "cpu": 0.30, "ram": 0.80 } } ``` ### Response #### Success Response (200) No specific success response body is detailed, but a successful report is indicated by the absence of an error. #### Response Example (No example provided in source) ``` -------------------------------- ### Update Alert Ignore Rules Source: https://context7.com/valeriansaliou/vigil/llms.txt Silences downtime reminders for a specified duration or clears the ignore rules. Requires manager authentication. ```APIDOC ## PUT /manager/prober/alerts/ignored ### Description Silences downtime reminders for a specified duration or clears the ignore rules. ### Method PUT ### Endpoint https://status.example.com/manager/prober/alerts/ignored ### Parameters #### Headers - **Authorization** (string) - Required - Basic authentication with manager token. - **Content-Type** (string) - Required - application/json; charset=utf-8 #### Request Body - **reminders_seconds** (integer or null) - Required - The duration in seconds to silence reminders. Use `null` to clear the ignore rules and resume reminders. ### Request Example (Silence for 10 minutes) ```json { "reminders_seconds": 600 } ``` ### Request Example (Clear ignore rules) ```json { "reminders_seconds": null } ``` ### Response #### Success Response (200) - Empty body on success. ``` -------------------------------- ### Public Status Endpoints Source: https://context7.com/valeriansaliou/vigil/llms.txt Endpoints for retrieving the public status of services monitored by Vigil. ```APIDOC ## GET /status/text ### Description Returns the current overall health status as a plain text string (`healthy`, `sick`, or `dead`). ### Method GET ### Endpoint /status/text ### Parameters None ### Request Example ```bash curl https://status.example.com/status/text ``` ### Response #### Success Response (200) - **status** (string) - The overall health status of the services. #### Response Example ``` healthy ``` ``` ```APIDOC ## GET /status/report ### Description Returns a comprehensive JSON report of all probes, nodes, and their health status. ### Method GET ### Endpoint /status/report ### Parameters None ### Request Example ```bash curl https://status.example.com/status/report ``` ### Response #### Success Response (200) - **health** (string) - The overall health status. - **page** (object) - Information about the status page. - **name** (string) - The name of the status page. - **url** (string) - The URL of the status page. - **probes** (array) - An array of probe objects. - **name** (string) - The name of the probe. - **status** (string) - The status of the probe. - **nodes** (array) - An array of node objects within the probe. - **name** (string) - The name of the node. - **status** (string) - The status of the node. - **replicas** (array) - An array of replica statuses. #### Response Example ```json { "health": "healthy", "page": { "name": "Crisp Status", "url": "https://status.crisp.chat/" }, "probes": [ { "name": "Web nodes", "status": "healthy", "nodes": [ { "name": "Core main router", "status": "healthy", "replicas": ["healthy", "healthy"] }, { "name": "Core main load balancer", "status": "healthy", "replicas": ["healthy", "healthy", "healthy"] } ] }, { "name": "Relay nodes", "status": "sick", "nodes": [ { "name": "Visitor realtime sockets", "status": "sick", "replicas": ["healthy", "sick"] } ] } ] } ``` ``` ```APIDOC ## GET /badge/color ### Description Returns an SVG badge image showing the current status, colored according to the status. ### Method GET ### Endpoint /badge/color ### Parameters None ### Request Example ```bash curl https://status.example.com/badge/color -o status-badge.svg ``` ### Response #### Success Response (200) - **SVG Image** - An SVG image representing the status badge. #### Response Example (SVG content representing the badge) ``` ```APIDOC ## GET /badge/icon ### Description Returns an SVG badge image showing the current status with an icon. ### Method GET ### Endpoint /badge/icon ### Parameters None ### Request Example ```bash curl https://status.example.com/badge/icon -o status-icon.svg ``` ### Response #### Success Response (200) - **SVG Image** - An SVG image representing the status badge with an icon. #### Response Example (SVG content representing the badge with an icon) ``` -------------------------------- ### Vigil Manager API - Update ignore rules for prober alerts Source: https://github.com/valeriansaliou/vigil/blob/master/PROTOCOL.md Update the ignore rules for prober alerts. Requires manager authentication and a JSON request body. ```APIDOC ## PUT /manager/prober/alerts/ignored/ ### Description Update the ignore rules for prober alerts. Requires manager authentication and a JSON request body. ### Method PUT ### Endpoint `https://status.example.com/manager/prober/alerts/ignored/` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **reminders_seconds** (integer) - Required - The number of seconds during which downtime reminders should not be sent anymore (skipped). ### Request Example ```json { "reminders_seconds": 600 } ``` ### Response #### Success Response (200) (Response structure not detailed in source) #### Response Example (No example provided in source) ``` -------------------------------- ### Update Alert Ignore Rules via API Source: https://context7.com/valeriansaliou/vigil/llms.txt Silences downtime reminders for a specified duration or clears the ignore rule. Requires a manager token and JSON payload for the duration in seconds. ```bash # Silence reminders for 10 minutes (600 seconds) curl -X PUT https://status.example.com/manager/prober/alerts/ignored \ -H "Authorization: Basic $(echo -n ':YOUR_MANAGER_TOKEN' | base64)" \ -H "Content-Type: application/json; charset=utf-8" \ -d '{ "reminders_seconds": 600 }' ``` ```bash # Clear the ignore (resume reminders) curl -X PUT https://status.example.com/manager/prober/alerts/ignored \ -H "Authorization: Basic $(echo -n ':YOUR_MANAGER_TOKEN' | base64)" \ -H "Content-Type: application/json; charset=utf-8" \ -d '{ "reminders_seconds": null }' ```