普罗米修斯(Prometheus)安装配置部署

一、基础环境

环境/组件版本
操作系统CentOS Linux release 7.6.1810
Prometheusprometheus-2.22.1.linux-amd64.tar.gz
gogo1.15.4.linux-amd64.tar.gz
Grafanagrafana-7.3.3-1.x86_64.rpm

下载地址:
Prometheus下载地址:https://prometheus.io/download/#prometheus.
go下载地址:https://golang.org/dl/.
Grafana下载地址:https://dl.grafana.com/oss/release/grafana-7.3.3-1.x86_64.rpm.

二、安装go

1、解压安装

tar -C /usr/local/ -xvf go1.15.4.linux-amd64.tar.gz;

2、配置环境变量

vim /etc/profile

export PATH=$PATH:/usr/local/go/bin

source /etc/profile

3、验证

go version;

在这里插入图片描述

三、安装Prometheus

1、安装

tar -C /usr/local/ -xvf prometheus-2.22.1.linux-amd64.tar.gz;
ln -sv /usr/local/prometheus-2.22.1.linux-amd64/ /usr/local/Prometheus

2、启动
普罗米修斯默认配置文件 /usr/local/Prometheus/prometheus.yml

/usr/local/Prometheus/prometheus --config.file=/usr/local/Prometheus/prometheus.yml &

3、验证
浏览器打开IP:9090端口即可打开普罗米修斯自带的监控页面
在这里插入图片描述

四、安装Grafana

1、安装

rpm -ivh --nodeps grafana-7.3.3-1.x86_64.rpm

2、启动

/bin/systemctl daemon-reload
/bin/systemctl enable grafana-server.service
/bin/systemctl start grafana-server.service

3、访问grafana
浏览器访问IP:3000端口,即可打开grafana页面,默认用户名密码都是admin,初次登录会要求修改默认的登录密码
在这里插入图片描述
在这里插入图片描述

4、添加prometheus数据源
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

5、Dashboards页面选择“Prometheus 2.0 Stats”点击“import”按钮导入
在这里插入图片描述
6、Settings页面填写普罗米修斯地址并保存
在这里插入图片描述
7、切换到刚才添加的“Prometheus 2.0 Stats”即可看到整个监控页面
在这里插入图片描述
说明 :
如果安装grafana-7.3.3-1.x86_64.rpm提示缺失依赖包,可以使用yum方式安装

yum -y localinstall grafana-7.3.3-1.x86_64.rpm
  • 7
    点赞
  • 39
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
为了部署安装Prometheus,你可以按照以下步骤进行操作: 1. 首先,将Prometheus的软件包下载到你的机器上。你可以从官方网站上找到最新的版本下载链接,例如中提供的链接。 2. 下载完毕后,使用命令行工具解压该软件包。你可以使用tar命令,例如在Linux系统中,可以使用以下命令进行解压缩操作: ``` tar xf prometheus-2.31.1.linux-amd64.tar.gz -C /usr/local/ ``` 这将会把解压后的文件放置在`/usr/local/`目录下。 3. 接下来,进入解压后的目录,并将其重命名为`prometheus`,可以使用以下命令进行操作: ``` mv prometheus-2.31.1.linux-amd64/ prometheus ``` 4. 运行Prometheus服务器。进入`prometheus/`目录,并执行以下命令: ``` ./prometheus --config.file=prometheus.yml ``` 这将会启动Prometheus服务器,并使用`prometheus.yml`作为配置文件。 5. 最后,根据需要进行Prometheus配置。你可以根据官方文档提供的指导进行配置。 请注意,上述步骤仅供参考,请根据你的具体环境和需求进行相应调整。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *3* [Prometheus部署、操作及Grafana展示、告警](https://blog.csdn.net/m0_71521555/article/details/127497906)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] - *2* [Promethus(普罗米修斯安装配置](https://blog.csdn.net/m0_56305656/article/details/121546981)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值