Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@
"providers/documentation/monday-provider",
"providers/documentation/mongodb-provider",
"providers/documentation/mysql-provider",
"providers/documentation/nagios-provider",
"providers/documentation/netbox-provider",
"providers/documentation/netdata-provider",
"providers/documentation/new-relic-provider",
Expand Down
94 changes: 94 additions & 0 deletions docs/providers/documentation/nagios-provider.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
---
title: "Nagios Provider"
sidebarTitle: "Nagios"
description: "Nagios Provider allows pulling alerts from Nagios XI and receiving webhooks from Nagios."
---
import AutoGeneratedSnippet from '/snippets/providers/nagios-snippet-autogenerated.mdx';

<AutoGeneratedSnippet />

import ProviderLogo from '@components/ProviderLogo';

<ProviderLogo src="/icons/nagios-icon.png" alt="Nagios Logo" />

# Nagios Provider

The Nagios provider lets you pull alerts from a Nagios XI instance and receive webhook notifications in Keep. Both API polling and webhooks are supported.

## Setup

### Prerequisites
1. A running Nagios XI instance
2. An API key (Admin > System Config > API Keys)
3. Network connectivity between Keep and Nagios XI

### Configuration

```yaml
authentication:
host_url: "https://nagios.example.com"
api_key: "your-nagios-xi-api-key"
```

### Webhook Configuration

To push alerts from Nagios to Keep in real time:

1. Create a notification command in Nagios that sends a POST request to Keep's webhook endpoint.

Example command definition (`commands.cfg`):

```cfg
define command {
command_name keep_notify_service
command_line /usr/bin/curl -s -X POST \
-H "Content-Type: application/json" \
-H "X-API-KEY: $USER2$" \
-d '{ \
"host_name": "$HOSTNAME$", \
"service_description": "$SERVICEDESC$", \
"state": "$SERVICESTATE$", \
"output": "$SERVICEOUTPUT$", \
"notification_type": "$NOTIFICATIONTYPE$", \
"timestamp": "$LONGDATETIME$", \
"service_attempt": "$SERVICEATTEMPT$" \
}' \
"<KEEP_WEBHOOK_URL>"
}

define command {
command_name keep_notify_host
command_line /usr/bin/curl -s -X POST \
-H "Content-Type: application/json" \
-H "X-API-KEY: $USER2$" \
-d '{ \
"host_name": "$HOSTNAME$", \
"host_state": "$HOSTSTATE$", \
"output": "$HOSTOUTPUT$", \
"notification_type": "$NOTIFICATIONTYPE$", \
"timestamp": "$LONGDATETIME$" \
}' \
"<KEEP_WEBHOOK_URL>"
}
```

2. Assign the command to a contact:

```cfg
define contact {
contact_name keep_contact
service_notification_commands keep_notify_service
host_notification_commands keep_notify_host
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,u,r
}
```

3. Add the contact to a contact group used by your hosts/services.

## Useful Links

- [Nagios XI](https://www.nagios.com/products/nagios-xi/)
- [Nagios XI API docs](https://www.nagios.com/products/nagios-xi/api/)
1 change: 1 addition & 0 deletions docs/providers/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ By leveraging Keep Providers, users are able to deeply integrate Keep with the t
- [Monday](/providers/documentation/monday-provider)
- [MongoDB](/providers/documentation/mongodb-provider)
- [MySQL](/providers/documentation/mysql-provider)
- [Nagios](/providers/documentation/nagios-provider)
- [NetBox](/providers/documentation/netbox-provider)
- [Netdata](/providers/documentation/netdata-provider)
- [New Relic](/providers/documentation/new-relic-provider)
Expand Down
8 changes: 8 additions & 0 deletions docs/providers/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,14 @@ By leveraging Keep Providers, users are able to deeply integrate Keep with the t
}
></Card>

<Card
title="Nagios"
href="/providers/documentation/nagios-provider"
icon={
<img src="https://img.logo.dev/nagios.com?token=pk_dfXfZBoKQMGDTIgqu7LvYg" />
}
></Card>

<Card
title="NetBox"
href="/providers/documentation/netbox-provider"
Expand Down
16 changes: 16 additions & 0 deletions docs/snippets/providers/nagios-snippet-autogenerated.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{/* This snippet is automatically generated using scripts/docs_render_provider_snippets.py
Do not edit it manually, as it will be overwritten */}

## Authentication
This provider requires authentication.
- **host_url**: Nagios XI Host URL (required: True, sensitive: False)
- **api_key**: Nagios XI API Key (required: True, sensitive: True)

Certain scopes may be required to perform specific actions or queries via the provider. Below is a summary of relevant scopes and their use cases:
- **read_alerts**: Read alerts from Nagios XI



## In workflows

This provider can't be used as a "step" or "action" in workflows. If you want to use it, please let us know by creating an issue in the [GitHub repository](https://github.com/keephq/keep/issues).
Binary file added keep-ui/public/icons/nagios-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading