Summary
Adds a new Nagios provider for Keep, supporting both webhook-based alert ingestion and pull-based monitoring via the Nagios XI REST API.
Closes #3960
/claim #3960
Webhook Mode (Nagios Core + XI)
Accepts HTTP POST notifications from Nagios Core and Nagios XI using curl-based notification commands.
Supported notification types:
- PROBLEM / RECOVERY — service/host state changes
- ACKNOWLEDGEMENT — acknowledged alerts
- DOWNTIMESTART / DOWNTIMEEND / DOWNTIMECANCELLED — scheduled downtime
- FLAPPINGSTART / FLAPPINGSTOP / FLAPPINGDISABLED — flapping detection
State/severity mapping:
| Nagios State |
Keep Severity |
Keep Status |
| OK |
INFO |
RESOLVED |
| WARNING |
WARNING |
FIRING |
| CRITICAL |
CRITICAL |
FIRING |
| UNKNOWN |
INFO |
FIRING |
| UP |
INFO |
RESOLVED |
| DOWN |
CRITICAL |
FIRING |
| UNREACHABLE |
HIGH |
FIRING |
Includes detailed webhook setup documentation with ready-to-use Nagios notification command definitions.
Pull Mode (Nagios XI only)
Optionally fetches current problems from the Nagios XI REST API:
- Service problems (WARNING, CRITICAL, UNKNOWN states)
- Host problems (DOWN, UNREACHABLE states)
- Requires
agios_url\ and \pi_key\ in provider config
Files
- \keep/providers/nagios_provider/init.py\
- \keep/providers/nagios_provider/nagios_provider.py\ — main provider
- \keep/providers/nagios_provider/alerts_mock.py\ — mock alert for simulate_alert
- \ ests/test_nagios_provider.py\ — unit tests (11 test cases)
Testing
Unit tests cover:
- Service PROBLEM/RECOVERY formatting
- Host DOWN/RECOVERY formatting
- ACKNOWLEDGEMENT handling
- DOWNTIME (SUPPRESSED status)
- WARNING severity mapping
- Long output concatenation
- Fingerprint fields and provider metadata