Prometheus

Prometheus 简介 概念 prometheus server exporter,用于server采集数据,有官方提供的node-exporter,也可以通过各种SDK自定义导出内容,暴露一个类似/metrics的路径用于采集 注意,exporter在多进程(gunicorn 多进程)模式下使用会有限制,参考文档 数据模型,和influxdb类似,是时序数据库,以metric为名称,多个label(key-value形式)组成:<metric name>{<label name>=<label value>, ...} 重载配置 Yes, sending SIGHUP to the Prometheus process or an HTTP POST request to the /-/reload endpoint will reload and apply the configuration file. The various components attempt to handle failing changes gracefully.

May 28, 2020 · 1 min · Peter

k3s

k3s 初次使用 multipass 环境准备 quick-start 参考1 参考2 # k3s1 node for master 192.168.64.5 multipass launch -v --name k3s1 20.04 multipass shell k3s1 curl -sfL https://get.k3s.io | sh - # default config sudo cat /etc/rancher/k3s/k3s.yaml # node-token sudo cat /var/lib/rancher/k3s/server/node-token # Check for Ready node, takes maybe 30 seconds sudo kubectl get nodes # k3s2 node 192.168.64.6 multipass launch -v --name k3s2 20.04 multipass shell k3s2 # add node to cluster # token in master cat /var/lib/rancher/k3s/server/node-token # K3S_NODE_NAME for unique hostname export K3S_TOKEN=x export K3S_URL=https://192.168.1.21:6443 curl -sfL https://get.k3s.io | K3S_URL=${K3S_URL} K3S_TOKEN=${K3S_TOKEN} sh - # if not register successfully, 查看日志可能是因为之前有重复node hostname # 原因:https://github.com/rancher/k3s/issues/802 移除node没有一同移除密码 sudo vim /var/lib/rancher/k3s/server/cred/node-passwd 查看节点状态: ...

May 16, 2020 · 3 min · Peter