博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Grafana Configuration 参数详解(1)
阅读量:5204 次
发布时间:2019-06-13

本文共 3321 字,大约阅读时间需要 11 分钟。

---恢复内容开始---

  Granfana Configuration 配置文件grafana.ini包含很多选项,可对其进行调整,调整后重启grafana服务方可生效。

Paths配置段

#################################### Paths ####################################[paths]# Path to where grafana can store temp files, sessions, and the sqlite3 db (if that is used);data = /var/lib/grafana    # 默认存放数据位置# Temporary files in `data` directory older than given duration will be removed;temp_data_lifetime = 24h # 删除 'data'目录给定时间前的临时文件,使用0则不删除临时文件,时间格式h,m。如168h,30m,10h30m # Directory where grafana can store logs;logs = /var/log/grafana # grafana存储日志的目录# Directory where grafana will automatically scan and look for plugins;plugins = /var/lib/grafana/plugins # grafana存放插件的目录# folder that contains provisioning config files that grafana will apply on startup and while running.;provisioning = conf/provisioning

Server配置段

#################################### Server ####################################[server]# Protocol (http, https, socket);protocol = http# The ip address to bind to, empty will bind to all interfaces;http_addr =         # 绑定ip地址,空及绑定所有ip地址# The http port  to use;http_port = 3000    # 使用端口,若要调整为使用80端口,需要执行如下命令:$ sudo setcap 'cap_net_bind_service=+ep' /usr/sbin/grafana-server              或是可以使用nginx或是apache所做前端服务器,将请求代理给grafana。 # The public facing domain name used to access grafana from a browser;domain = localhost# Redirect to correct domain if host header does not match domain# Prevents DNS rebinding attacks;enforce_domain = false# The full public facing url you use in browser, used for redirects and emails# If you use reverse proxy and sub path specify full url (with sub path);root_url = http://localhost:3000# Serve Grafana from subpath specified in `root_url` setting. By default it is set to `false` for compatibility reasons.;serve_from_sub_path = false# Log web requests;router_logging = false# the path relative working path;static_root_path = public# enable gzip;enable_gzip = false# https certs & key file;cert_file =;cert_key =# Unix socket path;socket =

 Database配置段

#################################### Database ####################################[database]# You can configure the database connection by specifying type, host, name, user and password# as separate properties or as on string using the url properties.# Either "mysql", "postgres" or "sqlite3", it's your choice;type = sqlite3               # 默认使用sqlite3作为grafana数据存储;host = 127.0.0.1:3306;name = grafana;user = root# If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;""";password =          #如果密码包含#或;需要使用三引号括起来如"""#password;""" # Use either URL or the previous fields to configure the database# Example: mysql://user:secret@host:port/database;url =# For "postgres" only, either "disable", "require" or "verify-full";ssl_mode = disable# For "sqlite3" only, path relative to data_path setting;path = grafana.db# Max idle conn setting default is 2;max_idle_conn = 2# Max conn setting default is 0 (mean not set);max_open_conn =# Connection Max Lifetime default is 14400 (means 14400 seconds or 4 hours);conn_max_lifetime = 14400# Set to true to log the sql calls and execution times.;log_queries =# For "sqlite3" only. cache mode setting used for connecting to the database. (private, shared);cache_mode = private

 

转载于:https://www.cnblogs.com/weidongliu/p/11557720.html

你可能感兴趣的文章
一位90后程序员的自述:如何从年薪3w到30w!
查看>>
HDU-1242-Rescue
查看>>
在.net core上使用Entity FramWork(Db first)
查看>>
linux命令总结sed命令详解
查看>>
obiee11g中关闭缓存
查看>>
Eclipse中如何开启断言(Assert),方法有二
查看>>
System.Net.WebException: 无法显示错误消息,原因是无法找到包含此错误消息的可选资源程序集...
查看>>
Eclipse注释模板
查看>>
WordCount运行详解
查看>>
压缩图片 待验证
查看>>
冲刺进度条7
查看>>
UIImage 和 iOS 图片压缩UIImage / UIImageVIew
查看>>
MongoDB的数据库、集合的基本操作
查看>>
JS 多种变量定义
查看>>
redis可执行文件说明
查看>>
ajax向后台传递数组
查看>>
剑指offer系列14:包含min函数的栈
查看>>
疯狂JAVA16课之对象与内存控制
查看>>
[转载]树、森林和二叉树的转换
查看>>
WPF移动Window窗体(鼠标点击左键移动窗体自定义行为)
查看>>