当前位置: 首页 > 工具软件 > categraf > 使用案例 >

监控之夜莺-categraf部署安装

萧伟兆
2023-12-01

下载categraf安装包

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

修改categraf配置文件

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”

启动categraf

cd /opt/categraf/categraf-v0.2.38-linux-amd64
nohup ./categraf &> categraf.log &

查看categraf是否启动成功

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
 类似资料: