Install
openclaw skills install log-to-alertUse when (1) user pastes server, application, or system log text and wants to extract error patterns into structured alert rules. (2) user says "create alerts from these logs", "monitor for this error", "set up alerts for this pattern", or "extract warning conditions". (3) user pastes log output and asks "alert me if this happens again".
openclaw skills install log-to-alertUse when (1) user pastes server, application, or system log text and wants to extract error patterns into structured alert rules. (2) user says "create alerts from these logs", "monitor for this error", "set up alerts for this pattern", or "extract warning conditions". (3) user pastes log output and asks "alert me if this happens again".
This skill solves the specific problem of: recurring errors in logs need to become automated alert rules — not just documented, but actively monitored.
This skill IS NOT:
This skill IS activated ONLY when: log text + alert creation intent are both present.
/log-to-alertDefault mode. Parses log entries, identifies error/warning patterns, and outputs structured alert rules.
When to use: User provides log text and wants alert rules (Prometheus, PagerDuty, Grafana, etc.)
/log-to-alert/dedupeGroups similar log lines into a single alert rule, eliminating duplicates.
When to use: Log contains many repeated instances of the same error.
level, message, timestamp, serviceERROR / FATAL / CRITICAL → high severityWARN / WARNING → medium severityINFO / DEBUG → informational (usually not alert-worthy)For each error class found:
| Field | Source |
|---|---|
| Alert name | Derived from error type + service name |
| Match pattern | Regex extracted from error message template |
| Severity | From log level (ERROR→critical, WARN→warning) |
| Source service | From log source field or filename |
| Frequency threshold | Trigger count before alert fires (default: ≥3 in 5 min) |
Output in the target system's format:
Prometheus AlertManager:
- alert: HighMemoryUsage
expr: node_memory_MemAvailable / node_memory_MemTotal < 0.1
for: 5m
labels:
severity: critical
annotations:
summary: "High memory usage on {{ $labels.instance }}"
Generic alert spec:
{
"name": "DatabaseConnectionFailed",
"pattern": "Connection refused|Connection timeout",
"severity": "critical",
"threshold": 3,
"window": "5m",
"action": "notify"
}
A good output:
A bad output:
| Scenario | Bad Output | Good Output |
|---|---|---|
| 500 identical error lines | 500 separate alert rules | 1 alert rule with threshold=3 |
| Dynamic error message | Pattern matches literal string | Pattern uses regex: user \d+ not found |
| Multiple services in logs | All alerts named "Error" | Alerts named by service: auth-DB-connection-failed |
| One INFO log line | Creates an alert | Skipped — INFO not alert-worthy |
references/ — Regex extraction patterns, alert format schemas for Prometheus/Grafana/PagerDuty