一,下载安装包并解压 **下载地址:**https://github.com/prometheus/node_exporter/releases 同样物理机上下载,然后上传到服务器,本次安装使用的版本为:node_exporter-1.5.0.linux-amd64 1,根据服务器情况选择安装目录,
apiVersion:v1kind:Servicemetadata:labels:k8s-app:etcdname:node-exporter-svc-systemdnamespace:kube-systemspec:clusterIP:NoneclusterIPs:-NoneinternalTrafficPolicy:ClusteripFamilies:-IPv4-IPv6ipFamilyPolicy:RequireDualStackports:-name:metricsport:9100protocol:TCPtargetPort:9100sessionAffinity:Nonetype:ClusterIP...
[root@k8s-master system]# systemctl enable node_exporter.service Failed to execute operation: File exists 解决方法: 1、执行 find / -name node_exporter.service,查找由于之前安装 node_exporter没有卸载干净,产生了重复的文件 node_exporter.service以及符号链接. [root@k8s-master system]# find / -name ...
通过以下的api,从consul中注销service curl \ --request PUT \ http://127.0.0.1:8500/v1/agent/service/deregister/node_export-172.20.58.18-8088 最后的参数是service的id. ok,8088的实例已经下线。 再看prometheus 只剩下一个节点了。 这样,每次增加,减少node exporter,就不需要手动的更新prometheus的配置文件...
2.4.创建node_exporter.service vim /etc/systemd/system/node_exporter.service 2.5.添加配置 [Unit] Description=Node Exporter Wants=network-online.target After=network-online.target [Service] User=root ExecStart=/home/software/node_exporter/node_exporter [Install] WantedBy=default.target 2.6.重新载入设置...
WantedBy=multi-user.target [root@ubuntu2004 local]#systemctl daemon-reload [root@ubuntu2004 local]#systemctl enable --now node_exporter.service [root@ubuntu2004 local]#systemctl status node_exporter.service #验证监听的端口,并测试访问其暴露的指标 [root@ubuntu2004 local]#ss -ntlp State Recv-Q ...
name: node-exporter spec: containers: - name: node-exporter image: quay.io/prometheus/node-exporter:v0.18.1 imagePullPolicy: IfNotPresent ports: - containerPort: 9100 resources: requests: cpu: 0.15 securityContext: privileged: true args: ...
2、node-exporter服务相关yaml 准备 2.1、prometheus-node-exporter-rbac vi prometheus-node-exporter-rbac.yaml apiVersion: v1 kind: ServiceAccount metadata: name: node-exporter namespace: monitoring --- apiVersion: rbac.authorization.k8s.io/v1 ...
[Service]ExecStart=/usr/local/node_exporter/node_exporter[Install]WantedBy=multi-user.target[Unit]Description=node_exporter After=network.target step10: 重载配置 [root@zentao node_exporter]# systemctl daemon-reload step11: 开启服务 [root@zentao node_exporter]# systemctl start node_exporter ...
启动 systemctl enable node_exporter.service && systemctl start node_exporter.service 查看端口成功 netstat -lntup|grep 9100 tcp6 0 0 :::9100 :::* LISTEN 592061/node_exporte