apt-get update
apt update
apt install -y wget
mkdir /opt/categraf
cd /opt/categraf
wget https://download.flashcat.cloud/categraf-v0.2.38-linux-amd64-with-cgo-plugin.tar.gz
tar -xvf categraf-v0.2.38-linux-amd64-with-cgo-plugin.tar.gz
vim /opt/categraf/categraf-v0.2.38-linux-amd64/conf/config.toml
#52行 端口修改为 17000
url = “http://127.0.0.1:17000/prometheus/v1/write”
#83行 false改为true
enable = true
#87行 端口改为17000
url = “http://127.0.0.1:17000/v1/n9e/heartbeat”
cd /opt/categraf/categraf-v0.2.38-linux-amd64
nohup ./categraf &> categraf.log &
root@wuyang-virtual-machine:/opt/categraf/categraf-v0.2.38-linux-amd64# netstat -tnlp | grep 8428
tcp 0 0 0.0.0.0:8428 0.0.0.0:* LISTEN 155858/./victoria-m