麒麟官网 https://m.kylinos.cn/support/trial.html?trial=44548
Grafana是一款用Go语言开发的开源数据可视化工具,可以做数据监控和数据统计,带有告警功能,支持Graphite、elasticsearch、zabbix、InfluxDB、Prometheus和OpenTSDB作为数据源。Grafana主要特性:灵活丰富的图形化选项;可以混合多种风格;支持白天和夜间模式;多个数据源
#先安装jdk,后面装点别的 #x86和arm64的安装过程是一样的 sudo -i #查看系统版本 cat /etc/.kyinfo uname -a #使用麒麟镜像源查询可安装jdk版本 apt-cache search jdk #安装jdk1.8 apt-get install openjdk-8-jdk #查看jdk版本 java -version #或者jdk安装方式参照https://bbs.huaweicloud.com/blogs/301909
#grafana官网 https://grafana.com/ #wget下载grafana wget https://dl.grafana.com/oss/release/grafana-7.2.0.linux-arm64.tar.gz wget https://dl.grafana.com/oss/release/grafana-7.2.0.linux-amd64.tar.gz #解压 tar -zxvf grafana-7.2.0.linux-amd64.tar.gz
#cd到bin目录下,启动grafana-server ,开机自启 ./grafana-server start ./grafana-server enable
##浏览器输入IP:3000 账号密码默认admin/admin 设置新密码
#prometheus官网 https://prometheus.io/download/ #通过wget下载prometheus wget https://github.com/prometheus/prometheus/releases/download/v2.16.0/prometheus-2.30.0.linux-arm64.tar.gz wget https://github.com/prometheus/prometheus/releases/download/v2.16.0/prometheus-2.30.0.linux-amd64.tar.gz wget https://github.com/prometheus/prometheus/releases/download/v2.16.0/prometheus-2.30.0.linux-mips64.tar.gz wget https://github.com/prometheus/prometheus/releases/download/v2.16.0/prometheus-2.16.0.linux-amd64.tar.gz
#解压至/usr/local/ tar -zxvf prometheus-2.16.0.linux-amd64.tar.gz -C /usr/local/ #将prometheus-2.30.0.linux-arm64改名为prometheus cd /usr/local/ mv /usr/local/prometheus cd /usr/local/prometheus ls #启动Prometheus—使用默认配置文件启动 /usr/local/prometheus/prometheus --config.file="/usr/local/prometheus/prometheus.yml" &
#查看9090端口是否开启 ss -anlt | grep 9090
#通过浏览器进入页面 IP:9090 #数据展示 IP:9090/metrics