# Automate System Monitoring & Alerting with Uptime Kuma and Freshdesk

This guide covers setting up Uptime Kuma to monitor a system, trigger email alerts to Freshdesk on downtime, and automatically create tickets with the correct priority and assignment.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1755772446909/ef937fce-6a41-41b1-ad95-f031263c3b88.gif align="left")

> This setup showcases a real-world integration that streamlines incident management by ensuring downtime alerts are promptly turned into actionable tickets, reducing manual intervention and improving response times.

### Prerequisites

*   Before we begin, ensure you have the following:
    
*   [**Docker**](https://docs.docker.com/engine/install/ubuntu/) **&** [**Docker Compose**](https://docs.docker.com/compose/install/linux/) installed on an **Ubuntu 22.04 server**.
    
*   A **Freshdesk account** ([Free plan](https://www.freshworks.com/freshdesk/lp/home/?tactic_id=6780391&utm_source=google-adwords&utm_medium=FD-Search-Brand-Broad-MEA-Tier-2&utm_campaign=FD-Search-Brand-Broad-MEA-Tier-2&utm_term=freshdesk%20plans&device=c&matchtype=e&network=g&gclid=CjwKCAiAw5W-BhAhEiwApv4goJ0heygRCG1iS9pt0HGjg7lLmOnCU9dvi_M7qGcBRFsHFMnMgY9KBhoCVfsQAvD_BwE&audience=kwd-47765166336&ad_id=718584053892&gad_source=1)  - simply  scroll to the bottom of their website to sign up).
    
*   A **custom Freshdesk email address** for ticket creation (e.g., `support@yourcompany.freshdesk.com`).
    
*   **SMTP credentials** for sending emails from **Uptime Kuma**.
    

* * *

### What is Uptime Kuma?

A self-hosted monitoring tool that allows you to track the uptime and performance of your **websites, APIs, and services**.

### Key Features:

*   **Supports multiple monitoring options**: **HTTP, HTTPS, TCP, ICMP Ping, DNS**, and more.
    
*   **Customisable alerts**:
    
*   **Email, webhooks, Slack, Discord**, etc.
    
*   **User-friendly web UI** for viewing uptime history and logs.
    
*   **Multi-user support** for team-based monitoring.
    
*   **Easy Docker deployment** for quick setup.
    

### Problem Statement

Manual system monitoring is **inefficient,** if your system goes down, you need to be notified immediately.

### How This Automation Works:

*   **Uptime Kuma** detects **downtime** and sends an **alert email** to **Freshdesk**.
    
*   **Freshdesk** automatically **creates a ticket** based on the alert.
    
*   An **automation rule** in Freshdesk ensures that:
    

1.  The **ticket priority** is set to **Urgent**.
    
2.  The **ticket type** is classified as an **Incident**.
    
3.  The ticket is **assigned to a specific group** for streamlined handling.
    
4.  The ticket is **automatically assigned to a designated agent**.
    

This setup **removes the need for manual intervention**, ensuring that critical system outages are promptly addressed by the right team. It also **enhances incident response time** by guaranteeing that no downtime goes unnoticed.

* * *

### Step 1: Deploy Uptime Kuma with Docker Compose

Create a directory for **Uptime Kuma** and a `docker-compose.yml` file:

```bash
mkdir -p ~/uptime-kuma && cd ~/uptime-kuma
```

```bash
nano docker-compose.yml
```

Paste the following configuration in your `docker-compose.yml` file:

```yaml
---
services:
  uptime-kuma:
    image: louislam/uptime-kuma:1  # NB: ALWAYS use pinned versions
    container_name: uptime-kuma
    restart: always

    ports:
      - "3001:3001"

    volumes:
      - uptime-kuma-data:/app/data  # persistent storage

    environment:
      - TZ=Africa/Johannesburg  # set to your local timezone
      - UMASK=0022  # file permission control

    networks:
      - kuma_network

    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:3001"]
      interval: 30s
      retries: 3
      start_period: 10s
      timeout: 5s

    logging:
      driver: "json-file"
      options:
        max-size: "10m"
        max-file: "3"

volumes:
  uptime-kuma-data:

networks:
  kuma_network:
    driver: bridge
```

Save and exit (`CTRL+X`, `Y`, `Enter`), then start the container:

```bash
docker compose up -d
```

Make sure uptime kuma is running:

```bash
docker ps
```

![](https://cdn.hashnode.com/uploads/covers/68a5e6b9bf57f369891da8e0/62370a26-76ea-45a5-9b12-9b4c04a5a111.png align="center")

Container status is healthy

Access **Uptime Kuma** at:  
`http://<your-host-ip>:3001`

Create your admin account:

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1755772449990/9e01aba1-400c-49e9-a7b5-257164ba8a04.png align="left")

* * *

### Step 2: Adding a system to monitor

1.  Click on the **“Add New Monitor”** button at the top-left.
    
2.  In the **“Add New Monitor”** window, fill in the details:
    
3.  **Monitor Type:** Choose `HTTP(s)` for website monitoring.
    
4.  **Name:** Enter a descriptive name for your monitor (e.g., `Network IP Scanner`).
    
5.  **URL:** Enter your website URL (e.g., `[https://mylan.com]`[.](https://mysite.com%29.)
    
6.  **Method:** Select `GET` (default).
    
7.  **Heartbeat Interval:** Set the time interval for Uptime Kuma to check your site (e.g., 30 seconds).
    
8.  **Retries:** Configure how many times Kuma should retry if the check fails.
    
9.  **Notification Settings:** Choose the method you want to use for your alerts, in this demo, I’m using Email(SMTP).
    
10.  **Tags:** (Optional) Add tags to organise your monitors.
     
11.  Click **“Save”** to start monitoring.
     
12.  The monitor should now appear in your **Uptime Kuma dashboard**.
     
13.  If the site is online, it should show a green **“UP”** status(screenshot below):
     

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1755772451684/3a15effe-2af2-4d8f-a0bf-b6605b6d6fae.png align="left")

* * *

### Step 3: Configure Notifications (Email)

1.  Go to **Settings > Notification**.
    
2.  Click **Add New Notification** and select a notification method (**Email SMTP**), this requires a valid user mailbox along with your SMTP provider settings.
    

> **Note**: I’ve added my Freshdesk email address in the **To:** field.

3\. Follow your email provider setup instructions and save the settings.

4\. Link the notification to the service you want to monitor.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1755772453126/17341450-08c9-4f44-a936-c567663ca247.png align="left")

### Verifying ticket creation after an outage(screenshot below)

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1755772454699/d8e01af2-9d73-4c28-bd64-628a2c5a1a68.png align="left")

As you can see, Uptime Kuma has successfully created a ticket. However, Freshdesk applies default settings, requiring manual updates that can be easily overlooked as more tickets come in. **Let’s automate this to streamline the process**.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1755772455966/25191b13-1210-4596-9278-4a7de6d34c56.png align="left")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1755772457518/3d686f0d-f465-4482-a969-ff0d89aeb7c4.png align="left")

Uptime Kuma ticket created in Freshdesk with default settings.

* * *

### Step 4: Automatically Assign Tickets and Set Priority to Urgent

To ensure downtime alerts are handled efficiently, we’ll create an **automation rule** in Freshdesk to automatically assign tickets and set the appropriate priority.

#### <mark class="bg-yellow-200 dark:bg-yellow-500/30">Steps to Create the&nbsp;Rule:</mark>

1.  In Freshdesk, navigate to **Admin → Automations**.
    
2.  Click **New Rule** and give it a name, e.g., **“Uptime Kuma Alerts”**.
    
3.  Apply the following **conditions and actions**:
    

#### <mark class="bg-yellow-200 dark:bg-yellow-500/30">Rule Configuration:</mark>

**Event:**

*   When a **ticket is created.**
    

**Conditions:**

If **Requester Email** is `*uptime_kuma@yourdomain.com*`

*   AND if **Subject** contains `[? Down]`
    

**Actions:**

*   Set **Type** to **Incident**
    
*   Set **Priority** to **Urgent**
    
*   Assign to **Group: Technical Support**
    
*   Assign to **Agent: Luqmaan**
    

> **<mark class="bg-yellow-200 dark:bg-yellow-500/30">Note:</mark>** Before creating this rule, identify a **consistent part of the subject line** that never changes (e.g., `*[? Down]*`). First, test how Uptime Kuma formats its email subjects by allowing it to generate a ticket. Then, use that fixed pattern in your rule to ensure accuracy.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1755772459236/b2c181fb-2822-4022-afd1-d9da36e516cc.png align="left")

After previewing, saving, and enabling the rule, your configuration should look like this:

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1755772460448/1a95dc3d-f656-4389-b03b-3b23554dc23f.png align="left")

> You can create multiple rules to customise ticket handling for different services, ensuring that only specific alerts have predefined priorities.

* * *

### Final Testing

The automation is now in action. After testing, the rules worked exactly as expected where tickets were created with the correct priority, type, and assignments. Your system is now set up for seamless incident management.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1755772462090/9c740fd6-51c2-4545-8d60-ecdab0d926ec.png align="left")

Our automation rules are now in action, ensuring immediate response when a critical system goes offline.

### Taking It a Step Further

To fully automate the incident lifecycle, feel free to create another Freshdesk automation rule that **automatically closes tickets** when Uptime Kuma detects the service is back online. Since Uptime Kuma raises a separate alert when the system recovers, you can use a similar rule to match the subject line and set the ticket status to **Closed**.

### Conclusion

Integrating Uptime Kuma with Freshdesk creates a basic incident workflow where downtime is detected, a ticket is generated, and ownership is assigned without manual handling.

This reduces the need for constant monitoring and keeps incident tracking consistent.

The same approach applies beyond this specific setup. The core value is in understanding how systems can communicate, trigger actions, and remove manual steps from operational workflows.
