Custom alerting rules based on business metrics for website

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.
Development and maintenance of all types of websites:
Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Our competencies:
Development stages
Latest works
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1161
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1041
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    822
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    847
  • image_website-sbh_0.png
    Website development for SBH Partners
    999
  • image_website-_0.png
    Website development for Red Pear
    451

Custom Alerting on Business Metrics

Technical alerts on CPU and latency matter, but business rarely understands their impact. "Completed orders dropped 40% in last 15 minutes" is clear to everyone — developers and CEOs alike. Business metric alerts bridge the gap between technical monitoring and business impact.

Business Metrics for Alerting

Metrics depend on product type, but typical categories:

E-commerce:

  • Completed orders per hour (sharp decline)
  • Conversion from cart to payment (if < baseline X%)
  • Revenue per rolling hour
  • Payment errors (absolute count)

SaaS:

  • New user registrations (zero in last N hours)
  • Active online users (unexpected drop)
  • API requests from key customers (anomalous rise/fall)

Content projects:

  • Page views (sharp drop = SEO or CDN issue)
  • Bounce rate (sharp rise)
  • Forms submitted (zero in N hours)

Implementation via Prometheus

Business events in application code:

from prometheus_client import Counter, Histogram

# Initialize metrics
orders_completed = Counter(
    'orders_completed_total',
    'Total completed orders',
    ['payment_method', 'product_category']
)

order_value = Histogram(
    'order_value_rub',
    'Order value in rubles',
    buckets=[100, 500, 1000, 2500, 5000, 10000, 25000, 50000]
)

payment_errors = Counter(
    'payment_errors_total',
    'Payment processing errors',
    ['error_code', 'payment_provider']
)

# In order completion code
async def complete_order(order_data: dict):
    try:
        result = await payment_gateway.charge(order_data)

        orders_completed.labels(
            payment_method=order_data['payment_method'],
            product_category=order_data['category']
        ).inc()

        order_value.observe(order_data['amount'])

Alert Rules in Alertmanager

groups:
  - name: business_alerts
    rules:
      # E-commerce: orders dropped
      - alert: OrdersDropped
        expr: rate(orders_completed_total[15m]) < (rate(orders_completed_total[15m] offset 60m) * 0.6)
        for: 5m
        annotations:
          summary: "Orders dropped 40% in last 15 min"
          severity: "critical"
          slack: "#alerts-ecommerce"

      # SaaS: no signups
      - alert: NoSignups
        expr: rate(user_signups_total[1h]) == 0
        for: 30m
        annotations:
          summary: "Zero signups in last 30 minutes"
          severity: "warning"

      # Payment processing errors spike
      - alert: PaymentErrorsSpike
        expr: rate(payment_errors_total[5m]) > 0.5  # >50% error rate
        for: 2m
        annotations:
          summary: "Payment errors > 50%"
          severity: "critical"

Slack Notifications

import requests

def send_alert_to_slack(alert_name, severity, details):
    color = {'critical': '#FF0000', 'warning': '#FFA500'}.get(severity)

    message = {
        'attachments': [{
            'color': color,
            'title': alert_name,
            'text': details,
            'footer': 'Business Metrics Alert'
        }]
    }

    requests.post(SLACK_WEBHOOK, json=message)

Delivery Time

Setting up business metric collection, alerts, and notifications — 2–3 business days.