Prometheus完整安装
官方组件:
prometheus
node_exporter
blackbox_exporter
alertmanager
第三方开源软件:
部署环境:
centos 7
部署方式:
官方组件全部采用二进制部署,第三方开源组软件采用docker方式部署
安装步骤
官网下载官方组件,全部解压至/opt
修改文件名,去掉后面版本号
配置系统服务
cat > /etc/systemd/system/prometheus.service <<EOF
[Unit]
Description=prometheus
After=network.target
[Service]
Type=simple
User=prometheus
ExecReload=/bin/kill -HUP \$MAINPID
ExecStart=/opt/prometheus/prometheus --config.file=/opt/prometheus/prometheus.yml --storage.tsdb.path=/opt/prometheus/data --storage.tsdb.retention.time=2h --web.enable-lifecycle
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload &&
systemctl start prometheus &&
systemctl status prometheus &&
systemctl enable prometheus
cat > /etc/systemd/system/node_exporter.service <<EOF
[Unit]
Description=node_exporter
After=network.target
[Service]
Type=simple
User=prometheus
ExecStart=/opt/node_exporter/node_exporter --web.listen-address=:9100
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload &&
systemctl start node_exporter &&
systemctl status node_exporter &&
systemctl enable node_exporter
cat > /etc/systemd/system/alertmanager.service <<EOF
[Unit]
Description=alertmanager
After=network.target
[Service]
Type=simple
User=prometheus
ExecStart=/opt/alertmanager/alertmanager --config.file=/opt/alertmanager/alertmanager.yml --storage.path=/opt/alertmanager/data --cluster.advertise-address=0.0.0.0:9093
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl start alertmanager &&
systemctl status alertmanager &&
systemctl enable alertmanager
cat > /etc/systemd/system/blackbox_exporter.service<<EOF
[Unit]
Description=blackbox_exporter
After=network.target
[Service]
Type=simple
User=prometheus
ExecStart=/opt/blackbox_exporter/blackbox_exporter --config.file=/opt/blackbox_exporter/blackbox.yml
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload &&
systemctl start blackbox_exporter &&
systemctl status blackbox_exporter &&
systemctl enable blackbox_exporter
第三方软件参考github上安装
最终效果:
通过ConsulManager实现公有云虚机自动同步,自建主机可通过固定模板批量导入。相关配置文件可以在consulmanager的页面上查看,更新自己的proemtheus.yml文件即可。
url站点监控同理。
通过prometheusalert实现告警发送,路由可在web页面上设置,省略在alertmanager上配置的复杂。
Prometheus完整安装的更多相关文章
- 如何使用本地账户"完整"安装 SharePoint Server 2010+解决“New-SPConfigurationDatabase : 无法连接到 SharePoint_Config 的 SQL Server 的数据 库 master。此数据库可能不存在,或当前用户没有连接权限。”
注:目前看到的解决本地账户完整安装SharePoint Server 2010的解决方案如下,但是,有但是的哦: 当我们选择了"完整"模式安装SharePointServer201 ...
- IIS网站或系统验证码不显示问题——"使用了托管的处理程序,但是未安装或未完整安装 ASP.NET"
在IIS上发布了一个系统,但是登陆页面的验证码图片一直出不来,尝试了各种办法,权限.路径.继承父类路径等都不管用,进入Login.html,对着无验证码图片的图标,右键复制图片的网址,粘贴到地址栏,出 ...
- Win7 32bit(x86)/64bit(x64) 完整安装版(非GHOST版本)
Windows7 32bit 旗舰iso格式完整安装镜像 百度云盘:http://pan.baidu.com/s/1bpjLPs Windows7 64bit 旗舰iso格式完整安装镜像 百度云盘:h ...
- MS-DOS 7.10完整安装版(含图文安装程序)
大家知道,要想学习或使用DOS,安装一个DOS并进行实际操作是非常必要的.MS-DOS 7.10是一个非常好且强大实用的操作系统,而且兼容性和性能都十分强.要在系统中安装MS-DOS 7.10,可以使 ...
- Dreamweaver cs6中文版完整安装步骤:
Dreamweaver cs6中文版完整安装步骤: http://www.cr173.com/soft/72633.html 1.首先我们需要下载Dreamweaver cs6官方中文原版安装程序,下 ...
- ESP8266擦除工具完整安装
ESP8266擦除工具完整安装 一. ESP8266擦除工具路径:http://down.liangchan.net/ESP8266%B2%C1%B3%FD%B9%A4%BE%DF%CD%EA%D5 ...
- GreenPlum完全安装_GP5.11.3完整安装
1 概述 1.1 背景 1.2 目标 1.3 使用对象 2 配置系统信息 2.1 配置系统信息,做安装Greenplum的准备工作 Greenplum 数据库版本5.11.3 2.1.1 Greenp ...
- Prometheus(一):Prometheus+Grafana 安装配置
一.基础环境 系统 IP 监控主机 CentOS 7 192.168.56.200 被监控主机 CentOS 7 192.168.56.201 二.Prometheus服务端安装 以下操作皆在监控主机 ...
- 监控神器-普罗米修斯Prometheus的安装
搬砖党的福音:普罗米修斯-监控神器 功能: 在业务层用作埋点系统 Prometheus支持多种语言(Go,java,python,ruby官方提供客户端,其他语言有第三方开源客户端).我们可以通过客户 ...
随机推荐
- CIAGAN: Conditional Identity Anonymization Generative Adversarial Networks阅读笔记
CIAGAN: Conditional Identity Anonymization Generative Adversarial Networks 2020 CVPR 2005.09544.pdf ...
- Java实现数据库增删改查
代码示例: import java.sql.*; public class Renewal { // 创建类static Connection con; // 声明Connection对象static ...
- mongoDB 命令大全
每日一句 There should be a better way to start a day than waking up every morning. 应该有更好的方式开始新一天, 而不是千篇一 ...
- 渗透测试之sql注入验证安全与攻击性能
由于渗透测试牵涉到安全性以及攻击性,为了便于交流分享,本人这里不进行具体网址的透露了. 我们可以在网上查找一些公司官方网站如(http://www.XXXXXX.com/xxxx?id=1) 1.拿到 ...
- npm版本兼容导致的npm ERR! ERESOLVE unable to resolve dependency tree
当团队项目中,团队成员的npm包管理工具版本不一致时执行npm install报错: npm -v查看版本信息:7.x与6.x之间的兼容问题 解决方案: 一:升级或降级npm版本,保持一致npm in ...
- React中http-proxy-middleware代理使用
React项目npm run start启动本地服务后浏览器访问http://localhost:3000 start命令也可自定义port指定本地运行端口(eg: PORT=3002) 对于单点登录 ...
- 【由浅入深_打牢基础】HOST头攻击
[由浅入深_打牢基础]HOST头攻击 前几天一直准备别的事情,然后用了2/3天时间去挖了补天某厂的SRC,还是太菜了,最后提交了一个低危(还没出结果,还有点敏感信息泄露,感觉略鸡肋也没交),不过偶然发 ...
- Node.js精进(3)——流
在 JavaScript 中,一般只处理字符串层面的数据,但是在 Node.js 中,需要处理网络.文件等二进制数据. 由此,引入了Buffer和Stream的概念,两者都是字节层面的操作. Buff ...
- Sublime Text 3 如何清除上次打开文件记录
打开顶部菜单栏:进入 Preferences => Settings-User修改如下: {"hot_exit": false,"remember_open_fil ...
- labelimg使用指南
labelimg使用指南 From RSMX - https://www.cnblogs.com/rsmx/ 目录 labelimg使用指南 1. 确保已经安装了 Python 环境 2. 使用pip ...