部署grafana-7.4.0

部署grafana组件

解压grafana组件到指定目录

# 解压
tar xzvf grafana-7.4.0.linux-amd64.tar.gz -C /data/applications/prometheus
# 创建软连接
ln -s grafana-7.4.0 grafana

创建文件夹

# 进入文件夹
cd /data/applications/prometheus/grafana
# 创建文件夹
mkdir data logs dashboards script

配置grafana.ini文件

#################################### Paths ####################################
[paths]
# Path to where grafana can store temp files, sessions, and the sqlite3 db (if that is used)
# use "cfg:default.paths.data" to specified via command line
data = /data/applications/prometheus/grafana/data
#
# Directory where grafana can store logs
# use "cfg:default.paths.logs" to specified via command line
logs = /data/applications/prometheus/grafana/logs
#
# Directory where grafana will automatically scan and look for plugins
# use "cfg:default.paths.plugins" to specified via command line
plugins = /data/applications/prometheus/grafana/plugins
#################################### Server ####################################
[server]
# Protocol (http or https)
;protocol = http
;The ip address to bind to, empty will bind to all interfaces
;http_addr = 192.168.70.133
# The http port to use, defaults to 3000
http_port = 3000
# The public facing domain name used to access grafana from a browser
domain = 192.168.70.133
# Redirect to correct domain if host header does not match domain
# Prevents DNS rebinding attacks
;enforce_domain = false
# The full public facing url
;root_url = http://localhost:3000/grafana/
root_url = %(protocol)s://%(domain)s/grafana/
# Serve Grafana from subpath specified in `root_url` setting. By default it is set to `false` for compatibility reasons.
serve_from_sub_path = true

创建run_grafana.sh启动文件

cd /data/applications/prometheus/grafana/script
vim run_grafana.sh
#!/bin/bash
set -e
DEPLOY_DIR=/data/applications/prometheus/grafana/
cd "${DEPLOY_DIR}" || exit 1
exec /data/applications/prometheus/grafana/bin/grafana-server --config=/data/applications/prometheus/grafana/conf/grafana.ini 2>&1 &

登录grafana

http://192.167.70.133:3000/grafana
默认用户名与密码都是admin,首次登陆后,需要对admin的密码进行修改

选择您的配置选项

Grafana后端在其配置文件中定义了许多配置选项(通常在Linux系统上位于/etc/grafana/grafana.ini中)。
在此配置文件中,您可以更改默认管理员密码,http端口,grafana数据库(sqlite3,mysql,postgres),身份验证选项(google,github,ldap,auth proxy)以及许多其他选项。
启动您的grafana服务器。用您的管理员用户登录(默认为admin / admin)。打开侧面菜单(单击顶部菜单中的Grafana图标),转到数据源,然后添加数据源。

添加Prometheus的数据源。

第一步:添加数据源

第二步:设置数据源、数据源名称、类型、IP地址、端口号…

在grafana中导入相关json文件

导入的是MySQL_Overview.json

其他的json文件导入也是类似的。

界面展示:

本文作者:山河剑心

本文链接:https://www.cnblogs.com/ncayu2025/p/17692397.html

版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。

posted @   山河剑心  阅读(73)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示
💬
评论
📌
收藏
💗
关注
👍
推荐
🚀
回顶
收起
🔑
  1. 1 404 not found REOL
404 not found - REOL
00:00 / 00:00
An audio error has occurred.

作曲 : Reol

作词 : Reol

fade away...do over again...

fade away...do over again...

歌い始めの一文字目 いつも迷ってる

歌い始めの一文字目 いつも迷ってる

どうせとりとめのないことだけど

伝わらなきゃもっと意味がない

どうしたってこんなに複雑なのに

どうしたってこんなに複雑なのに

噛み砕いてやらなきゃ伝わらない

ほら結局歌詞なんかどうだっていい

僕の音楽なんかこの世になくたっていいんだよ

Everybody don't know why.

Everybody don't know why.

Everybody don't know much.

僕は気にしない 君は気付かない

何処にももういないいない

Everybody don't know why.

Everybody don't know why.

Everybody don't know much.

忘れていく 忘れられていく

We don't know,We don't know.

目の前 広がる現実世界がまた歪んだ

目の前 広がる現実世界がまた歪んだ

何度リセットしても

僕は僕以外の誰かには生まれ変われない

「そんなの知ってるよ」

気になるあの子の噂話も

シニカル標的は次の速報

麻痺しちゃってるこっからエスケープ

麻痺しちゃってるこっからエスケープ

遠く遠くまで行けるよ

安定なんてない 不安定な世界

安定なんてない 不安定な世界

安定なんてない きっと明日には忘れるよ

fade away...do over again...

fade away...do over again...

そうだ世界はどこかがいつも嘘くさい

そうだ世界はどこかがいつも嘘くさい

綺麗事だけじゃ大事な人たちすら守れない

くだらない 僕らみんなどこか狂ってるみたい

本当のことなんか全部神様も知らない

Everybody don't know why.

Everybody don't know why.

Everybody don't know much.

僕は気にしない 君は気付かない

何処にももういないいない

Everybody don't know why.

Everybody don't know why.

Everybody don't know much.

忘れていく 忘れられていく

We don't know,We don't know.