• CentOS-7安装grafana


    一、通用设置(分别在4台虚拟机设置)

    1、配置主机名

    hostnamectl set-hostname --static 主机名
    
    • 1

    2、修改hosts文件

    vim /etc/hosts
    输入:
    192.168.15.129 master
    192.168.15.133 node1
    192.168.15.134 node2
    192.168.15.136 node3
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6

    3、 保持服务器之间时间同步

    yum install -y  ntpdate && ntpdate time.windows.com
    
    • 1

    4、关闭防火墙(生产上不要这样操作、重启虚拟机后需重新操作)

    systemctl stop firewalld 
    systemctl disable firewalld 
    iptables -F
    
    • 1
    • 2
    • 3

    二、在node2节点安装Grafana

    1、打开3000端口的防火墙

    vi /etc/sysconfig/iptables
    
    • 1

    在这里插入图片描述

    2、重启防火墙

    systemctl restart [iptables.service](http://iptables.service)
    
    • 1

    3、防火墙开机启动

    systemctl enable [iptables.service](http://iptables.service)
    
    • 1

    因为在测试,直接iptables -F

    4、进入/usr/local目录

    cd /usr/local
    
    • 1

    5、下载安装包

    wgethttps://dl.grafana.com/enterprise/release/grafana-enterprise-9.4.1-1.x86_64.rpm
    
    • 1

    6、安装

    sudo yum install grafana-enterprise-9.4.1-1.x86_64.rpm
    
    • 1

    7、granafa默认使用3000端口,启动前查看3000端口是否占用

    netstat -anp | grep 3000 或ss -ntlp | grep grafana
    
    • 1

    8、如果被占用,kill该进程 (生产环境不要这样操作,换个端口启动)

    kill -9 4028
    
    • 1

    9、再次查看,确认kill成功

    netstat -anp | grep 3000
    
    • 1

    10、启动服务

    systemctl restart grafana-server
    
    • 1

    11、设置服务开机启动

    systemctl enable grafana-server
    
    • 1

    12、访问

    http://192.168.15.134:3000/d/aka/node-exporter-dashboard-220413-consulmanager?orgId=1

    在这里插入图片描述

  • 相关阅读:
    angular 实现模块共享
    毕业设计不要再做 XX 管理系统了
    解决appium或selenium使用时driver.find_element_by_xpath中间有删除线问题
    小型超市管理系统
    浅析JVM invokedynamic指令和Java Lambda语法|得物技术
    【python与数据分析】Tushare库详解(1)
    Redis 有哪些适合的场景?
    1 基础知识
    Leetcode 第320场周赛
    第二章 矩阵
  • 原文地址:https://blog.csdn.net/weixin_42924611/article/details/138126370