Summary

Add a webhook-based Nagios provider for receiving host and service notifications in Keep.

Changes

  • nagios_provider.py: Webhook-only provider following the Checkmk provider pattern
    • Host notifications: UP/DOWN/UNREACHABLE → AlertStatus mapping
    • Service notifications: OK/WARNING/CRITICAL/UNKNOWN → AlertSeverity mapping
    • Fingerprint based on host + service for deduplication
    • _format_alert() handles both host-only and host+service payloads
  • alerts_mock.py: Mock fixtures for host_down and service_critical scenarios
  • README.md: Setup documentation with Nagios Core/XI command definitions and curl test examples

Webhook Configuration

define command{
command_name notify-keep-service
command_line /usr/bin/curl -s -X POST \
-H "Content-Type: application/json" \
-H "X-API-KEY: \$USER1\$" \
-d '{"host_name":"\$HOSTNAME\$","service_description":"\$SERVICEDESC\$","service_state":"\$SERVICESTATE\$","service_output":"\$SERVICEOUTPUT\$","notification_type":"\$NOTIFICATIONTYPE\$"}' \
KEEP_WEBHOOK_URL
}

Testing

curl -X POST http://localhost:8080/alerts/event/nagios \
-H "Content-Type: application/json" \
-H "X-API-KEY: your-api-key" \
-d '{"host_name":"testhost","host_state":"DOWN","host_output":"CRITICAL - Host unreachable","notification_type":"PROBLEM"}'

/claim #3960

Claim

Total prize pool $30
Total paid $0
Status Pending
Submitted March 09, 2026
Last updated March 09, 2026

Contributors

EU

Eunho Lee (Tony)

@lucky7323

100%

Sponsors

KE

Keep (YC W23)

@keephq

$30