Skip to content

Log-based alerts and notifications for applications #5232

Description

@DomingoMG

What problem will this feature address?

Dokploy already provides application logs and a notification system for events such as deployments, build failures, backups, and server resource thresholds.

However, there is currently no native way to trigger notifications based on application logs.

For example, an application may be running correctly from Dokploy's perspective while continuously producing errors such as:

{
  "level": "error",
  "message": "Failed to connect to database",
  "context": "DatabaseService"
}

In this situation, the container is still healthy and the deployment has not failed, so no Dokploy notification is triggered.

For basic application monitoring, this means users need to deploy and maintain additional observability tools such as Grafana/Loki just to detect errors that are already visible in Dokploy's application logs.

It would be useful if Dokploy could provide basic log-based alerting directly from the existing application logs.

Describe the solution you'd like

I would like to be able to create alert rules for an Application or Docker Compose service based on its logs.

For example:

  • Application: my-api
  • Match: "level":"error"
  • Threshold: 5 occurrences
  • Time window: 5 minutes
  • Cooldown: 15 minutes
  • Notification provider: Email / Discord / Slack / Telegram / Webhook / etc.

A simple rule could look conceptually like:

If the application produces 5 or more logs containing "level":"error" within 5 minutes, trigger a notification.

It would be useful to support matching options such as:

  • Contains text
  • Does not contain text
  • Regular expressions
  • JSON field matching, if feasible

For structured JSON logs, being able to define conditions such as:

level = "error"

Or more specific conditions such as:

level = "error" AND context = "DatabaseService"

Ideally, these alerts could reuse Dokploy's existing notification providers, so users could configure log alerts using the same Email, Discord, Slack, Telegram, Webhook, and other integrations already available in Dokploy.

The goal would not be to replace full observability platforms such as Grafana/Loki, but to provide lightweight application-level alerting for users who already use Dokploy to inspect their application logs and do not need a complete external observability stack.

Describe alternatives you've considered

The main alternative would be to deploy a dedicated observability stack such as Grafana + Loki (or another external log monitoring solution) and configure log-based alerts there.

While this provides much more advanced observability capabilities, it also introduces additional services to deploy, configure, monitor, update, and maintain.

For users who already rely on Dokploy for deployments, application logs, server monitoring, and notifications, this can feel unnecessarily complex when the requirement is relatively simple: detect certain errors in application logs and send a notification.

Another alternative would be to implement alerting directly inside each application, but this couples monitoring and notification infrastructure with application code and requires implementing the same logic across multiple services.

A lightweight log-based alerting feature integrated into Dokploy would provide a simpler solution while still allowing users with advanced observability requirements to use Grafana, Loki, or other dedicated platforms.

Additional context

A common use case would be a backend API using structured JSON logging.

For example:

{
  "level": "error",
  "message": "Failed to process request",
  "context": "PaymentService",
  "timestamp": "2026-08-31T07:30:00Z"
}

The application container may remain healthy and continue running normally, so infrastructure-level monitoring would not detect the problem.

However, repeated error or fatal logs could indicate an application-level incident that requires attention.

Since these logs are already available and searchable inside Dokploy, being able to create a notification rule from them would make the existing logging and notification features work well together.

This could start as a simple text/regex matching feature with thresholds and potentially evolve to support structured JSON fields in the future.

Will you send a PR to implement it?

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions