Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Grafana basic profile

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

How does the official interpretation of Grafana:

Grafana is an open source program for visualizing large measurement data. It provides a powerful and elegant way to create, share, and browse data. Dashboard shows the data from your different metric data sources.

Grafana is most commonly used in Internet infrastructure and application analysis, but it is also used in other areas, such as industrial sensors, home automation, process control, and so on.

Grafana has hot-swappable control panels and extensible data sources, and currently supports Graphite, InfluxDB, OpenTSDB, and Elasticsearch.

App_mode: application name. Default is production.

[database]

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

; type = sqlite3

; host = 127.0.0.1purl 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 is used by default, and the storage data source can be modified according to actual conditions.

[server]

Http_addr: the ip address of the listener, default is 0.0.0.0

Http_port: listening port. Default is 3000.

Protocol:http or https, defaults to http

Domain: this setting is part of root_url, the public domian name when you access grafana through a browser. The default is localhost.

Enforce_domain: if the header of the host does not match the domian, jump to a correct domain. The default is false.

Root_url: this is a full-path url that accesses grafana on web. The default is% (protocol), domain, and / or% (http_port).

Router_logging: whether to log web requests. Default is false.

Cert_file: if you use https, you need to set the

Cert_key: if you use https, you need to set the

[database]

By default, grafana needs to use a database to store user and dashboard information, and sqlite3 by default to store it. You can also convert it to other databases.

Type: can be mysql, postgres, sqlite3. Default is sqlite3.

Path: only sqlite3 needs to define the storage path of sqlite3

Host: only required by mysql and postgres. Default is 127.0.0.1

Database name of name:grafana. Default is grafana.

User: the user who connects to the database

Password: the password of the database user

Ssl_mode: only postgres uses

[security]

Admin_user:grafana default admin user, default is admin

Default password for admin_password:grafana admin. Default is admin.

Login_remember_days: how many days to keep login status

Secret_key: a signature that keeps the login status

Disable_gravatar:

[users]

Allow_sign_up: whether to allow ordinary users to log in. If set to false, users are not allowed to log in. The default is true, then admin can create users and log in to grafana.

Allow_org_create: if set to false, users are prohibited from creating new organizations. The default is true.

Auto_assign_org: when set to true, new users are automatically added to the organization with id 1, and when set to false, a new organization is added when new users are created

Auto_assign_org_role: create a rule attached to the user. Default is Viewer, and can also be Admin or Editor

[auth.anonymous]

Enabled: set to true to enable anonymous access. Default is false.

Org_name: sets the organization name for anonymous users

Org_role: access rule set for anonymous users. Default is Viewer.

[auth.github]

For the github project, obviously, hehe

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]

For 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: when set to true, basic authentication is enabled for http api

[auth.ldap]

Enabled: set to true to enable LDAP authentication. Default is false.

Config_file: if LDAP is enabled, specify the configuration file / etc/grafana/ldap.toml of LDAP

[auth.proxy]

Allows you to set authentication settings on a HTTP reverse proxy

Enabled: default is false

Header_name: default is X-WEBAUTH-USER

Header_property: the default is a name username

Auto_sign_up: the default is true. Enable automatic registration if the user does not exist in grafana DB

[analytics]

Reporting_enabled: if set to true, anonymous usage analysis is sent to stats.grafana.org, which is mainly used to track allowed instances, versions, dashboard, and error statistics. Default is true

Google_analytics_ua_id: use GA for analysis and fill in your GA ID.

[dashboards.json]

If you have a system that automatically generates dashboard in json format, you can turn on this feature to try

Enabled: default is false

Path: a full path is used to contain your json dashboard. Default is / var/lib/grafana/dashboards.

[session]

Provider: the default is file, and the values can also be memory, mysql, postgres

Provider_config: the configuration of this value is determined by the setting of provider. If provider is file, it is the data/xxxx path type. If provider is mysql, it is user:password@tcp (127.0.0.1 postgres 3306) / database_name. If provider is postgres, it is user=a password=b host=localhost port=5432 dbname=c sslmode=disable.

Cookie name of the cookie_name:grafana

Cookie_secure: if set to true, grafana depends on https. Default is false.

Session_life_time:session expiration time. Default is 86400 seconds, 24 hours.

The use of the alert feature in version 4.0

[smtp]

Enabled = true

Host = smtp.126.com:25

User = gamebarlepus1

Client authorization code with 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: can be console, file, default is console, file, or you can set multiple, separated by commas

The buffer length of buffer_len:channel. Default is 10000.

Level: can be "Trace", "Debug", "Info", "Warn", "Error", "Critical". Default is info.

[log.console]

Level: setting level

[log.file]

Level: setting level

Log_rotate: whether to turn on automatic rotation

Max_lines: the maximum number of lines for a single log file. Default is 1000000.

Max_lines_shift: the maximum size of a single log file. The default is 28, which means 256MB.

Daily_rotate: whether to rotate logs every day. Default is true.

Max_days: the expiration time of the log. By default, it will be deleted after 7 days.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report