Summary
Add a new Nagios provider that enables Keep to receive alerts from Nagios Core and Nagios XI via webhook notifications.
Implementation
Provider (keep/providers/nagios_provider/nagios_provider.py)
- Webhook-only provider (same pattern as Checkmk provider)
- Receives JSON payloads POSTed by Nagios notification commands
- Supports both host alerts (UP/DOWN/UNREACHABLE) and service alerts (OK/WARNING/CRITICAL/UNKNOWN)
- Maps Nagios severity levels to Keep’s AlertSeverity enum
- Maps Nagios states + notification types (PROBLEM/RECOVERY/ACKNOWLEDGEMENT) to Keep’s AlertStatus
- Generates deep-link URLs to Nagios web UI when
nagios_url is configured
- Comprehensive webhook setup documentation with example Nagios command definitions, contact, and contactgroup configs
Severity Mapping
| Nagios Host State |
Keep Severity |
| UP |
INFO |
| DOWN |
CRITICAL |
| UNREACHABLE |
HIGH |
| Nagios Service State |
Keep Severity |
| OK |
INFO |
| WARNING |
WARNING |
| CRITICAL |
CRITICAL |
| UNKNOWN |
INFO |
Tests (tests/test_nagios_provider.py)
- Critical service alert formatting
- Service recovery (OK) alert
- Warning service alert with long output
- Host DOWN alert
- Host UP recovery
- Host UNREACHABLE alert
- ACKNOWLEDGEMENT notification handling
- Alert ID construction for both service and host alerts
- Unknown object type fallback
- Graceful handling of missing fields
Icon
- Added Nagios icon at
keep-ui/public/icons/nagios-icon.png
Nagios Setup
Users configure Nagios notification commands that curl JSON payloads to Keep’s webhook URL. Full setup instructions are included in the provider’s webhook_markdown documentation, covering:
- Host and service notification command definitions
- Contact and contact group configuration
- Restart instructions
/claim #3960