Skip to the content.

观测

prometheus

集群的管理

grafana

# 验证: grafana 的默认刷新时间是 1 分钟的
for((i=0; i < 10000; i++)); do
  curl -d "test,tag=1111 time=12,this=$i" -X POST 'http://127.0.0.1:8428/write'
  sleep 1
done

初始化

cd ~/core
git clone https://github.com/VictoriaMetrics/VictoriaMetrics
cd  ~/core/VictoriaMetrics/deployment/docker
docker compose up -d
docker compose down # 删除

登录 127.0.0.1:3000

需要统计的

page fault 次数

内存的碎片化程度

buddy 的状态之类的

kvm 的状态,利用 kvm_stat 长期监测

io 和 网络流量,就是使用 sar 之类的观测就可以了

到底是谁在使用 shared memory

记录下一天共启动 qemu 多少次

参考

就个人使用而言,这个更加好

https://github.com/netdata/netdata

VictoriaMetrics

#!/usr/bin/env bash

set -E -e -u -o pipefail

cd ~/core
git clone https://github.com/VictoriaMetrics/VictoriaMetrics
cd VictoriaMetrics/deployment/docker
docker compose up -d
# docker compose down # 删除
echo "default user/passwd : admin admin"
google-chrome-stable 127.0.0.1:3000

想不到,这个 docker 构建网络还是从 172.17 开始的

curl -d 'measurement,tag1=value1,tag2=value2 field1=123,field2=1.23' -X POST 'http://localhost:8428/write'

Vector

从这里开始阅读,简单清晰啊: https://vector.dev/docs/about/

具体案例: https://github.com/vectordotdev/vector-demos/blob/main/aggregator/vector/agent/http/vector.toml

果然已经有人做了: https://github.com/vectordotdev/vector/issues/6508

本站所有文章转发 CSDN 将按侵权追究法律责任,其它情况随意。