New Three new products: fordway trading ERP, UEPS cloud rendering and WPECS delivery and operations View products →

From alert to answer: WPECS's 43 layered diagnosis rules

Engineering By SREYUN 0 views

At 3 a.m. an alert says "Redis instance stopped", and what the on-call engineer does next is almost always the same: log in, check the service status, read the journal, check dmesg, look at memory and disk, check the ports, and a quarter of an hour later learn that the kernel's OOM killer took the process out because memory ran short. WPECS's layered diagnosis hands this routine to the platform.

A four-layer model

WPECS sorts the possible causes of a service problem into four layers, from the bottom up, and checks them in order:

LayerFocusExample rules
L1 infrastructureIs the host itself healthy?Disk full, inodes exhausted, read-only file system, disk I/O errors, low memory, kernel OOM killer, heavy swapping, high load, clock out of sync, DNS failure, host unreachable
L2 runtimeCan the process run?Service failed / inactive / activating, restart storm, killed by SIGKILL, port already in use, expected port not listening, command or file not found, permission denied, wrong executable format, Java missing, JVM crash, too many open files
L3 dependenciesAre the services it depends on available?Connection refused, timeouts, TLS errors, DNS resolution, unreachable dependencies; ZooKeeper session loss, Kafka, etcd and Nacos problems; MySQL authentication and connectivity, Redis authentication
L4 applicationErrors in the application itselfJava main class exceptions, class loading failures, Spring startup failures, heap out of memory, configuration errors, error bursts, stack traces

There are 43 rules in all, each with an ID (such as L1-OOM-KILL, L2-RESTART-STORM or L2-PORT-NOT-LISTEN), evidence sources (dmesg, systemd, the journal, listening ports, application logs) and remediation advice.

What a diagnosis report looks like

For the Redis example above, the report concludes:

L1 infrastructure: the kernel OOM killer killed the process. Advice: memory is short; lower the component's heap or concurrency, or add memory.

Below it, every matched rule is listed with its evidence: Out of memory: Killed process ... (redis-server) in dmesg; the service in failed state; systemd reporting "Start request repeated too quickly" in the journal (a restart storm); the process exiting with SIGKILL; port 6379 not listening. Each of the four layers is marked abnormal or normal, so it is obvious at a glance that the problem sits at the bottom layer and the anomalies above it are knock-on effects.

Automatic diagnosis of alerts

Automatic alert diagnosis (under System settings) is on by default: when an alert fires, the platform runs a read-only layered diagnosis of the host or instance involved and attaches the conclusion and advice to the notification sent to Feishu, DingTalk, WeCom, email or a webhook. What the on-call engineer sees on their phone is no longer "Redis stopped" but "Redis was killed by the OOM killer; lower its memory or add more". Alerts are de-flapped so the same problem does not fire again and again, and the button on the notification card opens the diagnosis report directly.

AI is optional, and evidence is redacted first

Rule-based diagnosis does not depend on any LLM. For deeper root-cause analysis you can connect Claude or an internally hosted model (off by default), which analyzes the rule evidence. Evidence is redacted before it is sent to a model, and an internal model keeps the whole diagnosis inside your network.

More than rules: log analysis and security events

  • Error log analysis: only error and fatal log lines with their context; Java stack traces merged, Nginx 5xx statistics, abnormal Docker containers and database-specific log levels; results are grouped into more than 20 root causes with remediation advice.
  • Security and abnormal events: SSH brute force, sudo escalation, account changes, Fail2ban bans, port changes, OOM, disk I/O errors, kernel soft lockups, service crashes and restart storms, and host reboots.
  • In-depth monitoring: CPU breakdown, load, memory, disk capacity, throughput and busy time, network interfaces, TCP and handles; CPU, RSS, threads, handles and restart counts for every service.
  • Problem location on the overview: the overview ranks every issue by severity with its evidence and next actions (view events, diagnose, see advice), and lists the riskiest hosts.

After diagnosis: the toolbox and tickets

When a person needs to step in, the ops toolbox solution installs common tools and six scripts on hosts: wpecs-check for health checks, wpecs-perf for performance snapshots, wpecs-net for network diagnosis, wpecs-clean for safe cleanup (a dry run unless you add --apply), wpecs-jvm for Java thread diagnosis and wpecs-tune for tuning checks. Alerts can be delegated to colleagues as tickets, with assignment, reassignment, acceptance, resolution and closing all tracked.

In short

Layered diagnosis turns "check layer by layer from experience" into "the platform gathers evidence by layer and people read the conclusion". The 43 rules cover the failures seen most often on delivery sites, and automatic alert diagnosis has the first-hand information ready by the time the alert arrives. Learn more on the WPECS product page.

Related articles