Skip to main content
APA
Sponsored by CAST AI — Kubernetes cost optimization Better Stack — Uptime monitoring and log management
⚠️

Alert thresholds depend on the nature of your applications. Some queries may have arbitrary tolerance thresholds. Building an efficient monitoring platform takes time. 😉

Apache Prometheus Alert Rules

3 Prometheus alerting rules for Apache. Exported via Lusitaniae/apache_exporter. These rules cover critical and warning conditions — copy and paste the YAML into your Prometheus configuration.

wget https://raw.githubusercontent.com/samber/awesome-prometheus-alerts/refs/heads/master/dist/rules/apache/lusitaniae-apache-exporter.yml
critical

4.2.1. Apache down

Apache down

- alert: ApacheDown
  expr: apache_up == 0
  for: 0m
  labels:
    severity: critical
  annotations:
    summary: Apache down (instance {{ $labels.instance }})
    description: "Apache down\n  VALUE = {{ $value }}\n  LABELS = {{ $labels }}"
warning

4.2.2. Apache workers load

Apache workers in busy state approach the max workers count 80% workers busy on {{ $labels.instance }}

- alert: ApacheWorkersLoad
  expr: (sum by (instance) (apache_workers{state="busy"}) / sum by (instance) (apache_scoreboard) ) * 100 > 80 and sum by (instance) (apache_scoreboard) > 0
  for: 2m
  labels:
    severity: warning
  annotations:
    summary: Apache workers load (instance {{ $labels.instance }})
    description: "Apache workers in busy state approach the max workers count 80% workers busy on {{ $labels.instance }}\n  VALUE = {{ $value }}\n  LABELS = {{ $labels }}"
info

4.2.3. Apache restart

Apache has just been restarted.

- alert: ApacheRestart
  expr: apache_uptime_seconds_total / 60 < 1
  for: 0m
  labels:
    severity: info
  annotations:
    summary: Apache restart (instance {{ $labels.instance }})
    description: "Apache has just been restarted.\n  VALUE = {{ $value }}\n  LABELS = {{ $labels }}"