mirror of
https://github.com/SpecterOps/Nemesis
synced 2026-06-08 12:36:42 +00:00
c739725756
- Alerting: return "sent"/"filtered"/"failed" from send_alert_with_retries() so filtered alerts don't log as delivery failures - file-enrichment: parse raw_data JSON string from asyncpg before indexing, add TypeError to except clause - titus-scanner: verify gzip contains tar archive before classifying as .tar.gz to avoid invalid tar header errors on plain .gz files
Alerting Service
A microservice for the Nemesis platform that handles alert notifications through various channels using the Apprise library.
Purpose
This service processes alert events from the Nemesis platform and delivers notifications to configured external services like Slack, Discord, email, webhooks, and other notification platforms supported by Apprise.
Features
- Multi-channel notification support via Apprise
- Rate limiting with configurable concurrent alert processing
- Automatic retry logic with exponential backoff
- Real-time feedback subscription from Hasura GraphQL
- Support for tagged notifications to specific channels
- Health monitoring and test endpoints
Configuration
The service is configured using environment variables:
APPRISE_URLS: Comma-separated list of Apprise notification URLs with optional tagsMAX_CONCURRENT_ALERTS: Maximum number of concurrent alert processing (default: 10)MAX_ALERT_RETRIES: Number of retry attempts for failed alerts (default: 5)RETRY_DELAY_SECONDS: Delay between retry attempts (default: 30)NEMESIS_URL: Base URL of the Nemesis installation (default: http://localhost/)
Alert Sources
The service handles alerts from two sources:
- Direct alerts: Published to the
alerttopic via Dapr pub/sub - Feedback alerts: Automatically generated from user feedback in the files_feedback table
Endpoints
GET /healthz: Health check endpoint for Docker healthcheckPOST /test/alert: Test endpoint for sending sample alerts
Notification Channels
Supports all Apprise-compatible services including:
- Slack
- Discord
- Microsoft Teams
- Email (SMTP)
- Webhooks
- And many more...