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以上目前存在类似问题。

相关推荐
7***q6084 小时前
在linux(Centos)中Mysql的端口修改保姆级教程
linux·mysql·centos
3***16106 小时前
【监控】Spring Boot+Prometheus+Grafana实现可视化监控
spring boot·grafana·prometheus
toooooop86 小时前
CentOS 7 系统上安装 **Nginx + MySQL 5.7 + PHP 7.3 + Redis** 的完整步骤
redis·mysql·nginx·centos·php7
奔跑吧邓邓子11 小时前
CentOS 7性能飞升秘籍:实战系统优化与调优
linux·运维·centos·实战·系统优化·性能调优
艾莉丝努力练剑13 小时前
【Git:多人协作】Git多人协作实战:从同分支到多分支工作流
服务器·c++·人工智能·git·gitee·centos·项目管理
星驰云1 天前
记一次CentOS 硬盘损坏无法启动修复教程
linux·运维·centos
努力发光的程序员1 天前
互联网大厂Java面试场景:微服务与Spring Cloud技术点解析
spring cloud·grafana·prometheus·微服务架构·jwt·api网关·jaeger
熊文豪1 天前
无需公网 IP,用 cpolar 让 Prometheus 监控随时随地可及
prometheus·cpolar
笨笨聊运维2 天前
CentOS官方不维护版本,配置python升级方法,无损版
linux·python·centos
阿拉斯攀登2 天前
CentOS 7.9 上 Docker 安装、配置与实战使用指南
docker·centos