Monitoring Traditional Servers
This document was translated by GPT-4
# 1. Introduction
DeepFlow supports monitoring of traditional servers. Please note that the DeepFlow Server must be run on K8s. If you do not have a K8s cluster, you can refer to the All-in-One Quick Deployment section to deploy DeepFlow Server first.
# 2. Deployment Topology
# 3. Configuring DeepFlow Server
# 3.1 Update deepflow-server configuration
Check if all server sectors are in the following list of sectors
local_ip_ranges:
- 10.0.0.0/8
- 172.16.0.0/12
- 192.168.0.0/16
- 169.254.0.0/15
- 224.0.0.0-240.255.255.255
2
3
4
5
6
If not, you need to add the missing server sectors to the local_ip_ranges
list in the custom configuration file below.
Modify the values-custom.yaml
custom configuration file:
# add
configmap:
server.yaml:
controller:
genesis:
local_ip_ranges:
- 10.0.0.0/8
- 172.16.0.0/12
- 192.168.0.0/16
- 169.254.0.0/15
- 224.0.0.0-240.255.255.255
# - 7.8.0.0/16 # FIXME: your host all network cidr
trisolaris:
trident-type-for-unkonw-vtap: 3 # required
2
3
4
5
6
7
8
9
10
11
12
13
14
Update deepflow
helm upgrade deepflow -n deepflow -f values-custom.yaml deepflow/deepflow
## Restart deepflow-server
kubectl delete pods -n deepflow -l app=deepflow -l component=deepflow-server
2
3
# 3.2 Create Host Domain
unset DOMAIN_NAME
DOMAIN_NAME="legacy-host" # FIXME: domain name
cat << EOF | deepflow-ctl domain create -f -
name: $DOMAIN_NAME
type: agent_sync
EOF
2
3
4
5
6
7
# 3.3 Create Collector Group
Create a collector group:
unset AGENT_GROUP
AGENT_GROUP="legacy-host" # FIXME: domain name
deepflow-ctl agent-group create $AGENT_GROUP
deepflow-ctl agent-group list $AGENT_GROUP # Get agent-group ID
2
3
4
5
Create collector group configuration file agent-group-config.yaml
:
vtap_group_id: g-ffffff # FIXME: agent-group ID
platform_enabled: 1
2
Create collector group configuration:
deepflow-ctl agent-group-config create -f agent-group-config.yaml
# 4. Deploy DeepFlow Agent
Download deepflow-agent
curl -O https://deepflow-ce.oss-cn-beijing.aliyuncs.com/rpm/agent/stable/linux/$(arch | sed 's|x86_64|amd64|' | sed 's|aarch64|arm64|')/deepflow-agent-rpm.zip
unzip deepflow-agent-rpm.zip
yum -y localinstall x86_64/deepflow-agent-1.0*.rpm
2
3
curl -O https://deepflow-ce.oss-cn-beijing.aliyuncs.com/deb/agent/stable/linux/$(arch | sed 's|x86_64|amd64|' | sed 's|aarch64|arm64|')/deepflow-agent-deb.zip
unzip deepflow-agent-deb.zip
dpkg -i x86_64/deepflow-agent-1.0*.systemd.deb
2
3
curl -O https://deepflow-ce.oss-cn-beijing.aliyuncs.com/bin/agent/stable/linux/$(arch | sed 's|x86_64|amd64|' | sed 's|aarch64|arm64|')/deepflow-agent.tar.gz
tar -zxvf deepflow-agent.tar.gz -C /usr/sbin/
cat << EOF > /etc/systemd/system/deepflow-agent.service
[Unit]
Description=deepflow-agent.service
After=syslog.target network-online.target
[Service]
Environment=GOTRACEBACK=single
LimitCORE=1G
ExecStart=/usr/sbin/deepflow-agent
Restart=always
RestartSec=10
LimitNOFILE=1024:4096
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Modify the deepflow-agent's configuration file /etc/deepflow-agent.yaml
:
controller-ips:
- 10.1.2.3 # FIXME: K8s Node IPs
vtap-group-id-request: 'g-fffffff' # FIXME: agent-group ID
2
3
Start deepflow-agent:
systemctl enable deepflow-agent
systemctl restart deepflow-agent
2
Note:
If deepflow-agent cannot start normally due to missing dependency libraries, you can download a statically linked compiled deepflow-agent. Please note that statically linked compiled deepflow-agent has serious performance problems in multi-threading:
curl -O https://deepflow-ce.oss-cn-beijing.aliyuncs.com/rpm/agent/stable/linux/static-link/$(arch | sed 's|x86_64|amd64|' | sed 's|aarch64|arm64|')/deepflow-agent-rpm.zip
unzip deepflow-agent-rpm.zip
yum -y localinstall x86_64/deepflow-agent-1.0*.rpm
2
3
curl -O https://deepflow-ce.oss-cn-beijing.aliyuncs.com/deb/agent/stable/linux/static-link/$(arch | sed 's|x86_64|amd64|' | sed 's|aarch64|arm64|')/deepflow-agent-deb.zip
unzip deepflow-agent-deb.zip
dpkg -i x86_64/deepflow-agent-1.0*.systemd.deb
2
3
curl -O https://deepflow-ce.oss-cn-beijing.aliyuncs.com/bin/agent/stable/linux/static-link/$(arch | sed 's|x86_64|amd64|' | sed 's|aarch64|arm64|')/deepflow-agent.tar.gz
tar -zxvf deepflow-agent.tar.gz -C /usr/sbin/
cat << EOF > /etc/systemd/system/deepflow-agent.service
[Unit]
Description=deepflow-agent.service
After=syslog.target network-online.target
[Service]
Environment=GOTRACEBACK=single
LimitCORE=1G
ExecStart=/usr/sbin/deepflow-agent
Restart=always
RestartSec=10
LimitNOFILE=1024:4096
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# 5. Next Steps
- Universal Service Map - Experience DeepFlow's AutoMetrics Capabilities
- Distributed Tracing - Experience DeepFlow's AutoTracing Capabilities
- Eliminate Data Silos - Understand DeepFlow's AutoTagging and SmartEncoding Capabilities
- Say Goodbye to High-Base Troubles - Integrate Metrics Data such as Promethes
- Full Stack Distributed Tracing - Integrate Tracing Data such as OpenTelemetry