Skip to content

feat: add Nagios XI Provider - fixes #3960 - #6496

Closed
derekliutao-cmd wants to merge 4 commits into
keephq:mainfrom
derekliutao-cmd:feat/nagiosxi-provider
Closed

derekliutao-cmd wants to merge 4 commits into
keephq:mainfrom
derekliutao-cmd:feat/nagiosxi-provider

Conversation

@derekliutao-cmd

Copy link
Copy Markdown

Summary

Implements a polling-based Nagios XI Provider following the CentreonProvider pattern, as requested in #3960.

  • Polls host status (/api/v1/objects/hoststatus) and service status (/api/v1/objects/servicestatus) via Nagios XI REST API
  • Uses apikey authentication
  • Maps Nagios state codes (0=OK, 1=WARNING, 2=CRITICAL, 3=UNKNOWN) to Keep alert status/severity
  • Follows CentreonProvider polling pattern: _get_alerts() calls __get_host_status() and __get_service_status(), errors in one don't block the other
  • Handles single-object responses (API returns dict instead of list when only one host/service exists)
  • Includes comprehensive unit tests with mocked HTTP responses
  • Includes provider README with setup instructions and troubleshooting

Files Added

  • keep/providers/nagiosxi_provider/__init__.py
  • keep/providers/nagiosxi_provider/nagiosxi_provider.py
  • keep/providers/nagiosxi_provider/README.md
  • tests/test_nagiosxi_provider.py

Test Plan

  • Host status mapping (UP->RESOLVED/LOW, DOWN->FIRING/CRITICAL, UNREACHABLE->FIRING/WARNING)
  • Service status mapping (OK->RESOLVED/LOW, WARNING->FIRING/WARNING, CRITICAL->FIRING/CRITICAL, UNKNOWN->FIRING/INFO)
  • Combined alerts (3 hosts + 4 services = 7 total)
  • Error resilience (host failure doesn't block service alerts and vice versa)
  • Single-object response handling
  • Empty response handling
  • Scope validation (authenticated)
  • Config validation

Fixes #3960

🤖 Generated with Claude Code

@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label May 16, 2026
@CLAassistant

CLAassistant commented May 16, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@dosubot dosubot Bot added Feature A new feature Provider Providers related issues labels May 16, 2026
@shahargl

Copy link
Copy Markdown
Member

N/A

@shahargl shahargl closed this May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature A new feature Provider Providers related issues size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[🔌 Provider]: Nagios Provider

3 participants