快速安装 prometheus 监控节点

简介: 快速安装 prometheus 监控节点

本教程基于AlpineLinux,请注意将apk相关命令替换为对应系统的包命令,比如aptyum

安装监控服务

apk add prometheus-node-exporter
rc-update add node-exporter default
# 配置节点
ARGS="--collector.processes --web.listen-address=:2910 --web.config=/etc/prometheus/web-config.yml"
sed -i "s#ARGS=\"\"#ARGS=\"$ARGS\"#" /etc/conf.d/node-exporter
# 授权配置,请注意修改密码
mkdir -p /etc/prometheus
cat <<EOF >/etc/prometheus/web-config.yml
basic_auth_users:
  report:LPPRfab4H8npBbKkf1A9YAFdHVwfi
EOF
# 自动启动
rc-service node-exporter start

卸载监控程序

# 停止服务
rc-update del node-exporter default
rc-service node-exporter stop
# 删除服务
apk del --purge prometheus-node-exporter
deluser prometheus
# 清理记录
rm -rf /etc/prometheus /var/lib/prometheus /var/log/prometheus
相关文章
|
4月前
|
编解码 Prometheus 运维
Prometheus 的监控方法论
【1月更文挑战第24天】
|
4月前
|
存储 Prometheus 监控
Prometheus vs. ELK Stack:容器监控与日志管理工具的较量
随着容器化技术的广泛应用,容器监控与日志管理成为了关键任务。本文将对两种常用工具进行比较与选择,分别是Prometheus和ELK Stack。Prometheus是一款开源的监控系统,专注于时序数据的收集和告警。而ELK Stack则是一套完整的日志管理解决方案,由Elasticsearch、Logstash和Kibana三个组件组成。通过比较它们的特点、优势和适用场景,读者可以更好地了解如何选择适合自己需求的工具。
|
4月前
|
Prometheus 监控 Kubernetes
Prometheus + Grafana安装
Prometheus + Grafana安装
|
3月前
|
Prometheus 监控 Kubernetes
如何用 Prometheus Operator 监控 K8s 集群外服务?
如何用 Prometheus Operator 监控 K8s 集群外服务?
|
4月前
|
Prometheus Cloud Native Java
微服务框架(二十三)Prometheus + Grafana 安装、配置及使用
此系列文章将会描述Java框架Spring Boot、服务治理框架Dubbo、应用容器引擎Docker,及使用Spring Boot集成Dubbo、Mybatis等开源框架,其中穿插着Spring Boot中日志切面等技术的实现,然后通过gitlab-CI以持续集成为Docker镜像。 本文为Prometheus + Grafana 安装、配置及使用 本系列文章中所使用的框架版本为Spring ...
|
3月前
|
Prometheus 监控 Kubernetes
Prometheus Operator 与 kube-prometheus 之二 - 如何监控 1.23+ kubeadm 集群
Prometheus Operator 与 kube-prometheus 之二 - 如何监控 1.23+ kubeadm 集群
|
13天前
|
Prometheus 监控 Cloud Native
使用Prometheus配置监控与报警
通过以上步骤,你可以使用Prometheus和Alertmanager实现监控和报警配置,以确保系统在出现性能问题或故障时能够及时通知相关人员。欢迎关注威哥爱编程,一起学习成长。
|
25天前
|
Prometheus 监控 Cloud Native
Prometheus 安装与配置
Prometheus 安装与配置
|
3月前
|
Prometheus 监控 Cloud Native
使用 Prometheus 配置 SLO 监控和告警
使用 Prometheus 配置 SLO 监控和告警
|
4月前
|
Prometheus 监控 Java
微服务框架(二十四)Prometheus 监控埋点
此系列文章将会描述Java框架Spring Boot、服务治理框架Dubbo、应用容器引擎Docker,及使用Spring Boot集成Dubbo、Mybatis等开源框架,其中穿插着Spring Boot中日志切面等技术的实现,然后通过gitlab-CI以持续集成为Docker镜像。 本文为Prometheus 监控埋点 本系列文章中所使用的框架版本为Spring Boot 2.0.3-REL...