From 75862c1fe6fa12f48de31db95b56c8a7180df293 Mon Sep 17 00:00:00 2001 From: idanlodzki Date: Sat, 6 Dec 2025 20:14:15 +0200 Subject: [PATCH] adding alerts --- opsimate-docs/docs/integrations/gcp.md | 4 ++ opsimate-docs/docs/integrations/overview.md | 5 ++ .../docs/integrations/uptime-kuma.md | 60 +++++++++++++++++++ opsimate-docs/docusaurus.config.js | 1 - opsimate-docs/sidebars.js | 1 + 5 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 opsimate-docs/docs/integrations/uptime-kuma.md diff --git a/opsimate-docs/docs/integrations/gcp.md b/opsimate-docs/docs/integrations/gcp.md index cc70bae..df1dcca 100644 --- a/opsimate-docs/docs/integrations/gcp.md +++ b/opsimate-docs/docs/integrations/gcp.md @@ -26,6 +26,10 @@ The API token used in the webhook URL is managed by OpsiMate through an environm - **Env var**: `API_TOKEN` - **Default value**: `opsimate` +This value is also used as the default for the `api_token` query parameter in the webhook URL. + +If you are using the **simple deployment** (via the provided `docker-compose.yml`), the `API_TOKEN` environment variable is already defined there for you. + Make sure your OpsiMate server is started with `API_TOKEN` set (or rely on the default), and use the same value in the GCP webhook URL. ## Setting Up the Webhook in GCP diff --git a/opsimate-docs/docs/integrations/overview.md b/opsimate-docs/docs/integrations/overview.md index 4ebff6d..740878d 100644 --- a/opsimate-docs/docs/integrations/overview.md +++ b/opsimate-docs/docs/integrations/overview.md @@ -26,6 +26,10 @@ Push-based alerts from Google Cloud Platform into OpsiMate via webhooks. Cloud monitoring and analytics platform for infrastructure, applications, and logs. +### Uptime Kuma + +Self-hosted monitoring tool that can push uptime and incident alerts into OpsiMate via webhooks. + ## Getting Started 1. Navigate to **My Integrations** page @@ -42,3 +46,4 @@ Select an integration to learn how to set it up: - [Setting up Grafana Integration](/docs/integrations/grafana) - [Setting up GCP Integration](/docs/integrations/gcp) +- [Setting up Uptime Kuma Integration](/docs/integrations/uptime-kuma) diff --git a/opsimate-docs/docs/integrations/uptime-kuma.md b/opsimate-docs/docs/integrations/uptime-kuma.md new file mode 100644 index 0000000..193dbf0 --- /dev/null +++ b/opsimate-docs/docs/integrations/uptime-kuma.md @@ -0,0 +1,60 @@ +--- +sidebar_position: 5 +tags: [Alerts] +--- + +# Uptime Kuma Integration + +The **Uptime Kuma integration** lets you send alerts from Uptime Kuma into OpsiMate using **webhook-based push notifications**. + +Instead of OpsiMate pulling status from Uptime Kuma, your Uptime Kuma notifications **push alerts** directly to OpsiMate. + +## Webhook URL + +Configure your Uptime Kuma notification to send alerts to your OpsiMate server. + +Use your OpsiMate alerts webhook endpoint, for example: + +```text +http://localhost:3001/api/v1/alerts/custom/uptime-kuma?api_token={your_api_token} +``` + +Replace `{your_api_token}` with the API token configured in your OpsiMate server. + +> The exact path segment (for example `uptime-kuma`) should match how the Uptime Kuma integration is configured in your OpsiMate backend. + +## API Token Configuration + +The API token used in the webhook URL is managed by OpsiMate through an environment variable: + +- **Env var**: `API_TOKEN` +- **Default value**: `opsimate` + +This value is also used as the default for the `api_token` query parameter in the webhook URL. + +If you are using the **simple deployment** (via the provided `docker-compose.yml`), the `API_TOKEN` environment variable is already defined there for you. + +Make sure your OpsiMate server is started with `API_TOKEN` set (or rely on the default), and use the same value in the Uptime Kuma webhook URL. + +## Setting Up the Webhook in Uptime Kuma + +To send alerts from Uptime Kuma to OpsiMate via webhook: + +1. In **Uptime Kuma**, go to **Settings → Notifications**. +2. Click **Add New Notification**. +3. Choose **Webhook** as the notification type. +4. Set the **URL** to your OpsiMate endpoint, for example: + - `http://your-opsimate-host/api/v1/alerts/custom/uptime-kuma?api_token={your_api_token}` +5. Keep the **HTTP method** as `POST`. +6. (Optional) Adjust the **payload/template** only if you have customized parsing on the OpsiMate side; otherwise, use the default JSON payload from Uptime Kuma. +7. Save the notification. +8. Attach this notification to the monitors you want to forward to OpsiMate. + +## Important Disclaimer + +Uptime Kuma sends webhooks to **publicly reachable HTTP endpoints**. + +- If you are running OpsiMate locally (for example at `http://localhost:3001`), Uptime Kuma running on a different machine or in the cloud may **not** be able to call this URL directly. +- For production use, deploy OpsiMate behind a **reachable URL** (or expose it securely via tunneling / reverse proxy) so that Uptime Kuma can reach the webhook endpoint. + +Once configured, alerts pushed from Uptime Kuma will appear in the **alerts table** in OpsiMate with the **Uptime Kuma integration icon**, so you can easily identify their source. diff --git a/opsimate-docs/docusaurus.config.js b/opsimate-docs/docusaurus.config.js index 85debb6..052796b 100644 --- a/opsimate-docs/docusaurus.config.js +++ b/opsimate-docs/docusaurus.config.js @@ -42,7 +42,6 @@ module.exports = { logo: { alt: 'OpsiMate Logo', src: 'img/logo.png' }, items: [ { type: 'docSidebar', sidebarId: 'tutorialSidebar', position: 'left', label: 'Docs' }, - { type: 'doc', docId: 'dashboards/overview', position: 'left', label: 'Dashboard' }, { type: 'doc', docId: 'alerts/adding-alerts', position: 'left', label: 'Alerts' }, { type: 'doc', docId: 'integrations/overview', position: 'left', label: 'Integrations' }, { type: 'doc', docId: 'user-management/register-login', position: 'left', label: 'User Management' }, diff --git a/opsimate-docs/sidebars.js b/opsimate-docs/sidebars.js index b174965..f550aaf 100644 --- a/opsimate-docs/sidebars.js +++ b/opsimate-docs/sidebars.js @@ -63,6 +63,7 @@ const sidebars = { 'integrations/overview', 'integrations/grafana', 'integrations/gcp', + 'integrations/uptime-kuma', 'integrations/datadog', ], },