Skip to content

feat: Add Nagios XI Provider#5639

Open
Harmatta wants to merge 1 commit intokeephq:mainfrom
Harmatta:feat/nagios-provider
Open

feat: Add Nagios XI Provider#5639
Harmatta wants to merge 1 commit intokeephq:mainfrom
Harmatta:feat/nagios-provider

Conversation

@Harmatta
Copy link

/claim #3960

Proposed Changes

Adds a new Nagios XI provider for monitoring integration. This provider enables Keep to pull alerts from Nagios XI and receive webhook notifications.

Features

  • Pull alerts: Queries the Nagios XI REST API for service problems (WARNING/CRITICAL/UNKNOWN) and host problems (DOWN/UNREACHABLE)
  • Push alerts (webhook): Accepts webhook payloads from Nagios notification commands, supporting both host and service alert formats
  • Acknowledge problems: Supports acknowledging host and service problems via the Nagios XI command API
  • Severity mapping: Maps Nagios states (OK/WARNING/CRITICAL/UNKNOWN for services; UP/DOWN/UNREACHABLE for hosts) to Keep severity levels
  • Status mapping: Handles acknowledged, firing, and resolved states
  • SSL verification toggle: Supports self-signed certificates

Files Added

  • keep/providers/nagios_provider/nagios_provider.py — Main provider implementation
  • keep/providers/nagios_provider/alerts_mock.py — Mock alert data for testing
  • keep/providers/nagios_provider/README.md — Documentation with setup instructions
  • keep/providers/nagios_provider/__init__.py

Architecture

The provider follows the established Keep provider pattern:

  • Extends BaseProvider with NagiosProviderAuthConfig for authentication
  • Implements _get_alerts() for pull-based alert ingestion
  • Implements _format_alert() static method for webhook-based push ingestion
  • Implements validate_scopes() for API connectivity verification
  • Uses ProviderScope and ProviderMethod for capability declaration

Provider Category

  • Category: Monitoring
  • Tags: alert

Proof

The provider follows the exact same pattern as existing monitoring providers (Zabbix, Checkmk). Key design decisions:

  • Uses Nagios XI REST API v1 (/api/v1/objects/servicestatus, /api/v1/objects/hoststatus)
  • API key authentication via query parameter (standard Nagios XI pattern)
  • Acknowledges problems via /api/v1/system/command endpoint
  • Webhook format is flexible, accepting both Nagios macro variables and custom JSON payloads

Checklist

  • PR created against main branch
  • Follows existing provider patterns (Zabbix, Checkmk)
  • Documentation added (README.md)
  • Mock alerts provided for testing

Adds a new Nagios provider that supports:
- Pulling service and host status via Nagios XI REST API
- Receiving webhook notifications from Nagios
- Acknowledging host and service problems
- Severity and status mapping for Nagios states

Closes keephq#3960
@vercel
Copy link

vercel bot commented Feb 16, 2026

@Harmatta is attempting to deploy a commit to the KeepHQ Team on Vercel.

A member of the Team first needs to authorize it.

@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Feb 16, 2026
@github-actions
Copy link
Contributor

No linked issues found. Please add the corresponding issues in the pull request description.
Use GitHub automation to close the issue when a PR is merged

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 16, 2026

Target branch is not in the allowed branches list.

@dosubot dosubot bot added API API related issues Feature A new feature labels Feb 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API API related issues 🙋 Bounty claim Feature A new feature size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant