溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

Grafana基礎配置文件

發布時間:2020-04-02 20:35:13 來源:網絡 閱讀:1461 作者:DBAspace 欄目:數據庫

官方是怎么解釋Grafana的:

    grafana是用于可視化大型測量數據的開源程序,他提供了強大和優雅的方式去創建、共享、瀏覽數據。dashboard中顯示了你不同metric數據源中的數據。

    grafana最常用于因特網基礎設施和應用分析,但在其他領域也有機會用到,比如:工業傳感器、家庭自動化、過程控制等等。

    grafana有熱插拔控制面板和可擴展的數據源,目前已經支持Graphite、InfluxDB、OpenTSDB、Elasticsearch。

    


app_mode:應用名稱,默認是production


[database]

# Either "mysql", "postgres" or "sqlite3", it's your choice

;type = sqlite3

;host = 127.0.0.1:3306

;name = grafana

;user = root

;password =


# For "postgres" only, either "disable", "require" or "verify-full"

;ssl_mode = disable


# For "sqlite3" only, path relative to data_path setting

;path = grafana.db

默認使用sqlite3,可以根據實際修改存儲數據源

[server]

http_addr:監聽的ip地址,,默認是0.0.0.0

http_port:監聽的端口,默認是3000

protocol:http或者https,,默認是http

domain:這個設置是root_url的一部分,當你通過瀏覽器訪問grafana時的公開的domian名稱,默認是localhost

enforce_domain:如果主機的header不匹配domian,則跳轉到一個正確的domain上,默認是false

root_url:這是一個web上訪問grafana的全路徑url,默認是%(protocol)s://%(domain)s:%(http_port)s/

router_logging:是否記錄web請求日志,默認是false

cert_file:如果使用https則需要設置

cert_key:如果使用https則需要設置


[database]

grafana默認需要使用數據庫存儲用戶和dashboard信息,默認使用sqlite3來存儲,你也可以換成其他數據庫

type:可以是mysql、postgres、sqlite3,默認是sqlite3

path:只是sqlite3需要,定義sqlite3的存儲路徑

host:只是mysql、postgres需要,默認是127.0.0.1:3306

name:grafana的數據庫名稱,默認是grafana

user:連接數據庫的用戶

password:數據庫用戶的密碼

ssl_mode:只是postgres使用



[security]

admin_user:grafana默認的admin用戶,默認是admin

admin_password:grafana admin的默認密碼,默認是admin

login_remember_days:多少天內保持登錄狀態

secret_key:保持登錄狀態的簽名

disable_gravatar:



[users]

allow_sign_up:是否允許普通用戶登錄,如果設置為false,則禁止用戶登錄,默認是true,則admin可以創建用戶,并登錄grafana

allow_org_create:如果設置為false,則禁止用戶創建新組織,默認是true

auto_assign_org:當設置為true的時候,會自動的把新增用戶增加到id為1的組織中,當設置為false的時候,新建用戶的時候會新增一個組織

auto_assign_org_role:新建用戶附加的規則,默認是Viewer,還可以是Admin、Editor



[auth.anonymous]

enabled:設置為true,則開啟允許匿名訪問,默認是false

org_name:為匿名用戶設置組織名稱

org_role:為匿名用戶設置的訪問規則,默認是Viewer



[auth.github]

針對github項目的,很明顯,呵呵

enabled = false

allow_sign_up = false

client_id = some_id

client_secret = some_secret

scopes = user:email

auth_url = https://github.com/login/oauth/authorize

token_url = https://github.com/login/oauth/access_token

api_url = https://api.github.com/user

team_ids =

allowed_domains =

allowed_organizations =



[auth.google]

針對google app的

enabled = false

allow_sign_up = false

client_id = some_client_id

client_secret = some_client_secret

scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email

auth_url = https://accounts.google.com/o/oauth3/auth

token_url = https://accounts.google.com/o/oauth3/token

api_url = https://www.googleapis.com/oauth3/v1/userinfo

allowed_domains =



[auth.basic]

enabled:當設置為true,則http api開啟基本認證



[auth.ldap]

enabled:設置為true則開啟LDAP認證,默認是false

config_file:如果開啟LDAP,指定LDAP的配置文件/etc/grafana/ldap.toml



[auth.proxy]

允許你在一個HTTP反向代理上進行認證設置

enabled:默認是false

header_name:默認是X-WEBAUTH-USER

header_property:默認是個名稱username

auto_sign_up:默認是true。開啟自動注冊,如果用戶在grafana DB中不存在


[analytics]

reporting_enabled:如果設置為true,則會發送匿名使用分析到stats.grafana.org,主要用于跟蹤允許實例、版本、dashboard、錯誤統計。默認是true

google_analytics_ua_id:使用GA進行分析,填寫你的GA ID即可



[dashboards.json]

如果你有一個系統自動產生json格式的dashboard,則可以開啟這個特性試試

enabled:默認是false

path:一個全路徑用來包含你的json dashboard,默認是/var/lib/grafana/dashboards



[session]

provider:默認是file,值還可以是memory、mysql、postgres

provider_config:這個值的配置由provider的設置來確定,如果provider是file,則是data/xxxx路徑類型,如果provider是mysql,則是user:password@tcp(127.0.0.1:3306)/database_name,如果provider是postgres,則是user=a password=b host=localhost port=5432 dbname=c sslmode=disable

cookie_name:grafana的cookie名稱

cookie_secure:如果設置為true,則grafana依賴https,默認是false

session_life_time:session過期時間,默認是86400秒,24小時



在4.0版本alert功能使用

[smtp]

enabled = true

host = smtp.126.com:25

user =gamebarlepus1

password =126的客戶端授權碼

;cert_file =

;key_file =

;skip_verify = false

from_address = gamebarlepus1@126.com


[emails]

welcome_email_on_sign_up = false

templates_pattern = emails/*.html



[log]

mode:可以是console、file,默認是console、file,也可以設置多個,用逗號隔開

buffer_len:channel的buffer長度,默認是10000

level:可以是"Trace", "Debug", "Info", "Warn", "Error", "Critical",默認是info


[log.console]

level:設置級別


[log.file]

level:設置級別

log_rotate:是否開啟自動輪轉

max_lines:單個日志文件的最大行數,默認是1000000

max_lines_shift:單個日志文件的最大大小,默認是28,表示256MB

daily_rotate:每天是否進行日志輪轉,默認是true

max_days:日志過期時間,默認是7,7天后刪除


向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

亚洲午夜精品一区二区_中文无码日韩欧免_久久香蕉精品视频_欧美主播一区二区三区美女