feature alerts monitoring

Introducing Custom Pattern Alerts

Create alerts that trigger on specific log patterns, not just error counts. Match messages, metadata, and log levels to get notified about exactly what matters to your application.

L
Loggy Team
· 5 min read

There’s a certain kind of bug that threshold alerts will never catch. You know the one - it’s not an error spike, it’s a single log entry that says something like “Payment processing failed for user 12345” buried in a sea of normal activity. Your error count looks fine, your dashboards are green, but somewhere a customer is staring at a broken checkout page wondering why their card won’t work.

We built custom pattern alerts to solve exactly this problem. Instead of waiting for errors to pile up and trigger a threshold, you can now tell Loggy to watch for specific patterns in your logs and alert you the moment they appear. It’s like having a team member who reads every single log line and taps you on the shoulder when something important happens.

How It Works

The idea is simple: you define what you’re looking for, and Loggy watches for it. You can match on three different criteria, and they work together to give you precise control over what triggers an alert.

Log Level - Maybe you only care about errors, or maybe you want to catch warnings too. You can filter by level so you’re not getting alerts for debug logs that happen to match your pattern.

Message Pattern - This is the core of it. You specify a string, and Loggy will alert you whenever a log message contains that text. Looking for “payment failed”? Just type it in. The matching is case-insensitive, so you don’t need to worry about capitalization.

Metadata Filters - This is where it gets powerful. If your logs include structured metadata (and they should), you can match on specific key-value pairs. Want to know when a request to /api/checkout returns a 500 status code? Set up a filter for endpoint=/api/checkout and statusCode=500. Only logs matching all your filters will trigger the alert.

Custom Pattern Alert
Live Log Stream
info

User logged in successfully

userId=user_123ip=192.168.1.1
info

Processing payment request

orderId=ord_456amount=$99.00
error

Payment processing failed

orderId=ord_456reason=card_declined
info

Retry attempt initiated

orderId=ord_456attempt=1
warn

Rate limit approaching

endpoint=/api/paymentsusage=85%
Alert Rule: Payment Failures
Level:error
Pattern:payment.*failed
Metadata:reason=card_declined

Logs stream in from your application...

Creating Your First Alert

There are two ways to create a custom pattern alert. The first is the quick way: when you’re looking at your logs and you see something that should have alerted you, click the “Alert me” button on that log entry. Loggy will create an alert rule pre-filled with that log’s level, message, and metadata. You can then edit it to remove any fields that are too specific (like unique request IDs that would never match again).

The second way is to create an alert from scratch. Head to the Alerts page, click on the Rules tab, and you’ll see a “New Alert” button in the Custom Pattern Alerts section. This opens a form where you can define exactly what you’re looking for.

Here’s a practical example. Let’s say you want to know whenever a user’s subscription renewal fails. You might set up an alert like this:

  • Name: Subscription Renewal Failed
  • Level: error
  • Message Pattern: subscription renewal
  • Metadata Filters: event=renewal_failed

Now, whenever a log comes in that matches all three criteria, you’ll get an email (and a Slack or Discord message if you’ve set up those integrations). The cooldown setting prevents alert fatigue - if the same issue happens repeatedly, you won’t get spammed with notifications.

The Edit Modal

One thing we learned from early testing is that the “Alert me” button often captures too much information. If you click it on a log that has a unique request ID in the metadata, that alert would never fire again because no future log would have the same ID.

That’s why we built a full editing interface. When you open an alert rule, you can see every field that’s being matched and easily remove the ones that are too specific. See a requestId field? Just click the X to remove it. The alert will now match any log with the remaining criteria, regardless of request ID.

You can also add new filters if you realize you need to be more specific. Maybe your original alert is firing too often because it’s matching logs from your staging environment. Add a filter for environment=production and you’ll only hear about issues that affect real users.

Available on All Plans

We wanted custom pattern alerts to be useful for everyone, so we’ve made them available on all plans with tier-based limits:

  • Free: 5 custom pattern alerts
  • Pro: 25 custom pattern alerts
  • Team: 100 custom pattern alerts

This means even if you’re just getting started with Loggy, you can set up alerts for the five most critical things you need to watch. As your monitoring needs grow, you can upgrade to get more.

What’s Next

Custom pattern alerts are just the beginning of what we want to do with intelligent log monitoring. We’re already thinking about regex support for more complex pattern matching, alert grouping to reduce noise from related issues, and anomaly detection that learns what “normal” looks like for your application.

But for now, we’re excited to get this into your hands. The ability to say “tell me when this specific thing happens” is something we’ve wanted in Loggy for a long time, and we think you’re going to find it incredibly useful.

Head over to the Alerts page and try creating your first custom pattern alert. And as always, if you have feedback or run into any issues, we’d love to hear from you.

Ready to simplify your logging?

Join developers who are already using Loggy to debug faster.

Get Started for Free