Step‑by‑Step Guide to Install and Configure Apache SkyWalking with ElasticSearch and DingTalk Alerts
This guide walks through installing Apache SkyWalking, setting up an ElasticSearch storage cluster, configuring agents, launching services, and integrating DingTalk notifications for alarm handling, providing complete commands, configuration snippets, and troubleshooting tips.
Overview
Apache SkyWalking is an open‑source APM platform for microservices, cloud‑native and container‑based architectures. It collects, aggregates and visualizes metrics and distributed traces, providing topology views, endpoint monitoring and alarm rules.
Architecture
Probes (Agents) : collect data from services and report to the backend.
Platform backend (OAP) : processes, stores and serves data.
Storage : persists metrics (e.g., ElasticSearch, InfluxDB, MySQL, TiDB, H2).
UI : visualizes data and alerts.
Download and Installation
Two distribution types exist: ElasticSearch‑backed and non‑ES. This guide uses the ES version.
Download URLs:
https://skywalking.apache.org/downloads/
https://archive.apache.org/dist/skywalking/
After extraction the directory contains agent, bin, config, oap‑libs and webapp folders.
Storage Selection
Supported storages: H2, ElasticSearch 6/7, MySQL, TiDB, InfluxDB. For production InfluxDB is recommended; the guide proceeds with ElasticSearch 7.
Reference documentation: https://github.com/apache/skywalking/blob/master/docs/en/setup/backend/backend-storage.md
Installing ElasticSearch 7
Download from the official site (e.g., https://www.elastic.co/guide/en/elasticsearch/reference/7.10/targz.html) and start:
# start
./bin/elasticsearch -d -p pid
# stop
pkill -F pidElasticSearch 7 requires Java 11+. Common startup issues and fixes:
Increase file descriptor limits and virtual memory (edit /etc/security/limits.conf and /etc/sysctl.conf).
Set cluster.initial_master_nodes and network.host in elasticsearch.yml.
Example three‑node cluster (IPs 192.168.100.14, .15, .19) with identical elasticsearch.yml and JVM options ( -Xms2g -Xmx2g). Start each node and verify logs.
Configuring SkyWalking Backend
Edit config/application.yml to point to the ES cluster:
storage:
selector: ${SW_STORAGE:elasticsearch7}
elasticsearch7:
nameSpace: ${SW_NAMESPACE:""}
clusterNodes: ${SW_STORAGE_ES_CLUSTER_NODES:192.168.100.14:9200,192.168.100.15:9200,192.168.100.19:9200}Installing and Configuring the Agent
Copy the agent directory to each service host: scp -r ./agent [email protected]:~/ Optional plugins can be placed in plugins. Edit agent/config/agent.config (or use environment variables) to set service name and collector address:
agent.service_name=${SW_AGENT_NAME:user-center}
collector.backend_service=${SW_AGENT_COLLECTOR_BACKEND_SERVICES:192.168.100.17:11800}Start the Java application with the agent:
java -javaagent:/path/to/skywalking-agent/skywalking-agent.jar -jar yourApp.jarLaunching SkyWalking Services
Adjust webapp/webapp.yml for port and backend address, then start: bin/startup.sh Or start components individually:
bin/oapService.sh
bin/webappService.shVerify logs and access the UI at http://127.0.0.1:9000.
Alarm Configuration
Edit alarm-settings.yml to define rules and notifications. For DingTalk integration, create a DingTalk robot and configure its webhook and secret.
Key Maven dependency for custom alarm handling (optional):
<dependency>
<groupId>org.apache.skywalking</groupId>
<artifactId>server-core</artifactId>
<version>8.2.0</version>
</dependency>Define a DTO for alarm messages ( AlarmMessageDTO) and implement a service ( DingTalkAlarmService) that signs the request and sends a text message via the DingTalk robot API. Expose a REST endpoint ( /skywalking/alarm) in AlarmController to receive alarm payloads and forward them to the DingTalk service.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Liangxu Linux
Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
