跳转至

监控数据

需要安装 influxDB

docker run \
 --name influxdb2 \
 --publish 8086:8086 \
 --mount type=volume,source=influxdb2-data,target=/var/lib/influxdb2 \
 --mount type=volume,source=influxdb2-config,target=/etc/influxdb2 \
 --env DOCKER_INFLUXDB_INIT_MODE=setup \
 --env DOCKER_INFLUXDB_INIT_USERNAME=ADMIN_USERNAME \
 --env DOCKER_INFLUXDB_INIT_PASSWORD=ADMIN_PASSWORD \
 --env DOCKER_INFLUXDB_INIT_ORG=ORG_NAME \
 --env DOCKER_INFLUXDB_INIT_BUCKET=BUCKET_NAME \
 --env DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=ADMIN_TOKEN \
 influxdb:2

beegfs-mon

安装监控程序

dnf install -y beegfs-mon

配置文件存放于:

/etc/beegfs/beegfs-mon.conf

配置监控地址

# 设置管理地址
crudini --set /etc/beegfs/beegfs-mon.conf '' sysMgmtdHost "10.24.2.1"
# 关闭认证
crudini --set /etc/beegfs/beegfs-mon.conf '' connDisableAuthentication "true"
# 指定网卡
crudini --set /etc/beegfs/beegfs-mon.conf '' connInterfacesFile "/etc/beegfs/conn-inf.conf"

# 设置 db
crudini --set /etc/beegfs/beegfs-mon.conf '' dbType "influxdb2"
crudini --set /etc/beegfs/beegfs-mon.conf '' dbHostName "10.24.110.200"
crudini --set /etc/beegfs/beegfs-mon.conf '' dbHostPort "8086"
crudini --set /etc/beegfs/beegfs-mon.conf '' dbAuthFile "/etc/beegfs/beegfs-mon.auth"
crudini --set /etc/beegfs/beegfs-mon.conf '' dbBucket "BUCKET_NAME"

telegraf 监控

安装 telegraf:https://docs.influxdata.com/telegraf/v1/install/?t=RedHat+%26amp%3B+CentOS

编辑文件:/etc/telegraf/telegraf.d/beegfs_mon_telegraf.conf

[[outputs.influxdb_v2]]
urls = ["http://localhost:8086"] # Replace with the actual InfluxDB URL
token = "ADMIN_TOKEN" # Replace with your InfluxDB 2.x token
organization = "ORG_NAME" # Replace with your InfluxDB 2.x organization
bucket = "BUCKET_NAME" # Replace with your InfluxDB 2.x bucket

[[inputs.cpu]]
percpu = true
totalcpu = true
collect_cpu_time = false
report_active = false
core_tags = false

[[inputs.disk]]
ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"]

[[inputs.diskio]]
[[inputs.mem]]
[[inputs.processes]]
[[inputs.system]]

[[inputs.procstat]]
systemd_unit = "beegfs-meta.service"
[[inputs.procstat]]
systemd_unit = "beegfs-storage.service"

监控面板

Grafana dashboard 导入:

cd /opt/beegfs/scripts/grafana

./import-dashboards default