InfluxDB與Grafana安裝與基本使用

在下一篇中有具體的安裝過程

下一篇博文對應,不明白的可以去查看一下:InfluxDB與Grafana的安裝,無廢話版本

 

本文是按照CentOS7版本的配置:

1、安裝

2、啓動influxDB

3、測試

4、基本操作

5、Grafana安裝

5.1、rpm安裝

5.2、簡單使用

5.3、文件地址

6、使用InfluxDB與Grafana

6.1創建數據源

6.2、創建一個面板

6.3、結果


本文是按照CentOS7版本的配置:

1、安裝

(對號入座)https://portal.influxdata.com/downloads

2、啓動influxDB

systemctl enable influxdb
systemctl start influxdb

3、測試

4、基本操作

#創建數據庫
create database "db_name"
 
#顯示所有的數據庫
show databases
 
#刪除數據庫
drop database "db_name"
 
#使用數據庫
use db_name
 
#顯示該數據庫中所有的表
show measurements
 
#創建表,直接在插入數據的時候指定表名
insert test,host=127.0.0.1,monitor_name=test count=1
 
#刪除表
drop measurement "measurement_name"

5、Grafana安裝

之前安裝了很多次Grafana,均以失敗而告終,後來直接使用的這個grafana-5.1.4-1.x86_64.rpm版本就沒問題了。

5.1、rpm安裝

wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-5.0.3-1.x86_64.rpm

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

5.2、簡單使用

systemctl daemon-reload
systemctl start grafana-server
systemctl stop grafana-server
systemctl restart grafana-server
systemctl status grafana-server

默認用戶名密碼爲:admin/admin

5.3、文件地址

安裝二進制文件          /usr/sbin/grafana-server
將init.d腳本複製到         /etc/init.d/grafana-server
安裝默認文件(環境變量)         /etc/sysconfig/grafana-server
將配置文件複製到         /etc/grafana/grafana.ini
安裝systemd服務(如果systemd可用)名稱 grafana-server.service
默認配置使用日誌文件      /var/log/grafana/grafana.log
默認配置指定sqlite3數據庫 /var/lib/grafana/grafana.db

6、使用InfluxDB與Grafana

6.1創建數據源

6.2、創建一個面板

6.3、結果

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章