Centos 从0搭建grafana和Prometheus 服务以及问题解决

下载

虚拟机下载

https://customerconnect.vmware.com/en/downloads/info/slug/desktop_end_user_computing/vmware_workstation_player/17_0

cenos 镜像下载

https://www.centos.org/download/

grafana 服务下载

https://grafana.com/grafana/download/7.4.0?platform=linux

Prometheus 服务下载

https://prometheus.io/download/

命令

grafana安装

bash 复制代码
sudo yum install -y https://dl.grafana.com/enterprise/release/grafana-enterprise-7.2.0-1.x86_64.rpm

grafana 启动

bash 复制代码
sudo systemctl start grafana-server -- 启动服务
sudo systemctl stop grafana-server -- 停止服务
sudo systemctl status grafana-server -- 查看状态

prometheus 安装

bash 复制代码
wget https://github.com/prometheus/prometheus/releases/download/v2.30.3/prometheus-2.30.3.linux-amd64.tar.gz

 tar -xzf prometheus-2.30.3.linux-amd64.tar.gz 

prometheus 启动

找到解压目录

执行 ./prometheus

结果如图

虚拟机浏览器访问


搭建遇到问题

主机浏览器访问

这个一般通过 虚拟机ip 替换localhost 即可 加入你不可以 有几种情况

  • 一是你虚拟机不是桥接模式
  • 二可能你防火墙设置了

针对第二种你可以 通过命令关掉防火墙 (开发环境可以这样)

bash 复制代码
systemctl stop firewalld

grafana web 访问失败

出现如图所示的问题加入你符合他说的那几个情况 可以修改配置去调整,假如就是第一次按照没有代理没有docker ,直接安装的 在linux centos 环境中 那个就是版本问题。你需要按照低版本 目前我用7开头的版本实验是可以的。8以上目前存在类似问题。

相关推荐
飞翔沫沫情3 小时前
Prometheus 监控 ESXi 实战
grafana·prometheus·esxi·vcenter 监控·vsphere 监控
云动课堂4 小时前
【运维实战】企业级Samba文件共享服务 · 一键自动化部署方案 (适配银河麒麟 V10 /openEuler /CentOS)
运维·centos·自动化
莫非王土也非王臣4 小时前
Prometheus监控多个网站状态并推送到企业微信群机器人的完整方案
机器人·企业微信·prometheus
oMcLin5 小时前
如何在CentOS Stream 9上通过配置Hyper‑V虚拟化实现高效的资源隔离与虚拟机管理?
linux·运维·centos
tianyuanwo1 天前
深入解析CentOS 8网络配置:NetworkManager DNS管理机制与网卡类型深度剖析
linux·网络·centos
tianyuanwo1 天前
深入解析CentOS 8中NetworkManager重启后DNS配置被覆盖的机制与解决方案
linux·运维·centos·dns
Dragon~Snow1 天前
Linux-centOS Stream 9 系统 mysql-8.4.7 RPM版本
linux·mysql·centos
oMcLin1 天前
如何在 CentOS Stream 9 上配置并优化 PostgreSQL 15,支持高并发的数据插入与快速查询?
linux·postgresql·centos
goodlook01232 天前
监控平台搭建-日志-alloy篇(八)
grafana·prometheus
whlqjn_12112 天前
linux下使用SHC对Shell脚本进行封装和源码隐藏
linux·centos