一看必會系列:grafana安裝配置

來源:本站原創 Linux 超過1,670 views圍觀 0條評論

 yum install https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-5.1.3-1.x86_64.rpm
 
 
On CentOS / Fedora / Redhat:

$ wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-5.1.3-1.x86_64.rpm
$ sudo yum install initscripts fontconfig
$ sudo rpm -Uvh grafana-5.1.3-1.x86_64.rpm

————-以上安裝完成
修改配置
vim  /etc/grafana/grafana.ini
[server]
http_addr = 192.168.142.103
http_port = 3000
root_url = http://192.168.142.103:3000

$ systemctl daemon-reload
$ systemctl start grafana-server
$ systemctl status grafana-server
systemctl enable grafana-server.service

——添加圖形界面

https://www.nongziyi.xin/?p=282

———以下是備用方案

Install via YUM Repository

Add the following to a new file at /etc/yum.repos.d/grafana.repo

[grafana]
name=grafana
baseurl=https://packagecloud.io/grafana/stable/el/7/$basearch
repo_gpgcheck=1
enabled=1
gpgcheck=1
gpgkey=https://packagecloud.io/gpg.key https://grafanarel.s3.amazonaws.com/RPM-GPG-KEY-grafana
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt

Start the server (via systemd)

$ systemctl daemon-reload
$ systemctl start grafana-server
$ systemctl status grafana-server
systemctl enable grafana-server.service

Server side image rendering

Server side image (png) rendering is a feature that is optional but very useful when sharing visualizations, for example in alert notifications.

If the image is missing text make sure you have font packages installed.

yum install fontconfig
yum install freetype*
yum install urw-fonts

 

Environment file

The systemd service file and init.d script both use the file located at
/etc/sysconfig/grafana-server
for environment variables used when starting the back-end. Here you can override log directory, data directory and other variables.
Logging

By default Grafana will log to /var/log/grafana
Database

The default configuration specifies a sqlite3 database located at /var/lib/grafana/grafana.db.
Please backup this database before upgrades. You can also use MySQL or Postgres as the Grafana database, as detailed on the configuration page.

如要使用mysql 請如下操作
http://docs.grafana.org/installation/configuration/#database
[database]

Grafana needs a database to store users and dashboards (and other things). By default it is configured to use sqlite3 which is an embedded database (included in the main Grafana binary).
url

Use either URL or or the other fields below to configure the database Example: mysql://user:[email protected]:port/database

url

Use either URL or or the other fields below to configure the database Example: mysql://user:[email protected]:port/database
type

Either mysql, postgres or sqlite3, it’s your choice.
path

Only applicable for sqlite3 database. The file path where the database will be stored.
host

Only applicable to MySQL or Postgres. Includes IP or hostname and port. For example, for MySQL running on the same host as Grafana: host = 127.0.0.1:3306
name

The name of the Grafana database. Leave it set to grafana or some other name.
user

The database user (not applicable for sqlite3).
password

The database user’s password (not applicable for sqlite3). If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;"""

文章出自:CCIE那點事 http://www.qdxgqk.live/ 版權所有。本站文章除注明出處外,皆為作者原創文章,可自由引用,但請注明來源。 禁止全文轉載。
本文鏈接:http://www.qdxgqk.live/?p=3773轉載請注明轉自CCIE那點事
如果喜歡:點此訂閱本站
?
?
萌宠夺宝游戏 河南22选5开奖走势图 捕鱼达人单机版在哪下载 吉林麻将吉祥棋牌 四川快乐十二选五开奖预测今天 排列三质合走势图 外国男同志a片 加拿大快乐8开奖结果怎么查 全民欢乐捕鱼怎么玩 富贵棋牌手机版官网 怎样打好麻将 山东十一选五开奖走势 近日连续下跌的股票 二分时时彩是国家的吗 打牌老是输是什么原因 山西十一选五查询结果 黑龙江36选7周即开奖