Doyoung Lee | 8f30e15 | 2019-05-21 16:23:07 -0700 | [diff] [blame] | 1 | ##################### Grafana Configuration Example ##################### |
| 2 | # |
| 3 | # Everything has defaults so you only need to uncomment things you want to |
| 4 | # change |
| 5 | |
| 6 | # possible values : production, development |
| 7 | ;app_mode = production |
| 8 | |
| 9 | # instance name, defaults to HOSTNAME environment variable value or hostname if HOSTNAME var is empty |
| 10 | ;instance_name = ${HOSTNAME} |
| 11 | |
| 12 | #################################### Paths #################################### |
| 13 | [paths] |
| 14 | # Path to where grafana can store temp files, sessions, and the sqlite3 db (if that is used) |
| 15 | ;data = /var/lib/grafana |
| 16 | |
| 17 | # Directory where grafana can store logs |
| 18 | ;logs = /var/log/grafana |
| 19 | |
| 20 | # Directory where grafana will automatically scan and look for plugins |
| 21 | ;plugins = /var/lib/grafana/plugins |
| 22 | |
| 23 | # folder that contains provisioning config files that grafana will apply on startup and while running. |
| 24 | ;provisioning = conf/provisioning |
| 25 | |
| 26 | #################################### Server #################################### |
| 27 | [server] |
| 28 | # Protocol (http, https, socket) |
| 29 | ;protocol = http |
| 30 | |
| 31 | # The ip address to bind to, empty will bind to all interfaces |
| 32 | ;http_addr = |
| 33 | |
| 34 | # The http port to use |
| 35 | ;http_port = 3000 |
| 36 | |
| 37 | # The public facing domain name used to access grafana from a browser |
| 38 | ;domain = localhost |
| 39 | |
| 40 | # Redirect to correct domain if host header does not match domain |
| 41 | # Prevents DNS rebinding attacks |
| 42 | ;enforce_domain = false |
| 43 | |
| 44 | # The full public facing url you use in browser, used for redirects and emails |
| 45 | # If you use reverse proxy and sub path specify full url (with sub path) |
| 46 | ;root_url = http://localhost:3000 |
| 47 | |
| 48 | # Log web requests |
| 49 | ;router_logging = false |
| 50 | |
| 51 | # the path relative working path |
| 52 | ;static_root_path = public |
| 53 | |
| 54 | # enable gzip |
| 55 | ;enable_gzip = false |
| 56 | |
| 57 | # https certs & key file |
| 58 | ;cert_file = |
| 59 | ;cert_key = |
| 60 | |
| 61 | # Unix socket path |
| 62 | ;socket = |
| 63 | |
| 64 | #################################### Database #################################### |
| 65 | [database] |
| 66 | # You can configure the database connection by specifying type, host, name, user and password |
| 67 | # as separate properties or as on string using the url properties. |
| 68 | |
| 69 | # Either "mysql", "postgres" or "sqlite3", it's your choice |
| 70 | ;type = sqlite3 |
| 71 | ;host = 127.0.0.1:3306 |
| 72 | ;name = grafana |
| 73 | ;user = root |
| 74 | # If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;""" |
| 75 | ;password = |
| 76 | |
| 77 | # Use either URL or the previous fields to configure the database |
| 78 | # Example: mysql://user:secret@host:port/database |
| 79 | ;url = |
| 80 | |
| 81 | # For "postgres" only, either "disable", "require" or "verify-full" |
| 82 | ;ssl_mode = disable |
| 83 | |
| 84 | # For "sqlite3" only, path relative to data_path setting |
| 85 | ;path = grafana.db |
| 86 | |
| 87 | # Max idle conn setting default is 2 |
| 88 | ;max_idle_conn = 2 |
| 89 | |
| 90 | # Max conn setting default is 0 (mean not set) |
| 91 | ;max_open_conn = |
| 92 | |
| 93 | # Connection Max Lifetime default is 14400 (means 14400 seconds or 4 hours) |
| 94 | ;conn_max_lifetime = 14400 |
| 95 | |
| 96 | # Set to true to log the sql calls and execution times. |
| 97 | log_queries = |
| 98 | |
| 99 | #################################### Session #################################### |
| 100 | [session] |
| 101 | # Either "memory", "file", "redis", "mysql", "postgres", default is "file" |
| 102 | ;provider = file |
| 103 | |
| 104 | # Provider config options |
| 105 | # memory: not have any config yet |
| 106 | # file: session dir path, is relative to grafana data_path |
| 107 | # redis: config like redis server e.g. `addr=127.0.0.1:6379,pool_size=100,db=grafana` |
| 108 | # mysql: go-sql-driver/mysql dsn config string, e.g. `user:password@tcp(127.0.0.1:3306)/database_name` |
| 109 | # postgres: user=a password=b host=localhost port=5432 dbname=c sslmode=disable |
| 110 | ;provider_config = sessions |
| 111 | |
| 112 | # Session cookie name |
| 113 | ;cookie_name = grafana_sess |
| 114 | |
| 115 | # If you use session in https only, default is false |
| 116 | ;cookie_secure = false |
| 117 | |
| 118 | # Session life time, default is 86400 |
| 119 | ;session_life_time = 86400 |
| 120 | |
| 121 | #################################### Data proxy ########################### |
| 122 | [dataproxy] |
| 123 | |
| 124 | # This enables data proxy logging, default is false |
| 125 | ;logging = false |
| 126 | |
| 127 | #################################### Analytics #################################### |
| 128 | [analytics] |
| 129 | # Server reporting, sends usage counters to stats.grafana.org every 24 hours. |
| 130 | # No ip addresses are being tracked, only simple counters to track |
| 131 | # running instances, dashboard and error counts. It is very helpful to us. |
| 132 | # Change this option to false to disable reporting. |
| 133 | ;reporting_enabled = true |
| 134 | |
| 135 | # Set to false to disable all checks to https://grafana.net |
| 136 | # for new vesions (grafana itself and plugins), check is used |
| 137 | # in some UI views to notify that grafana or plugin update exists |
| 138 | # This option does not cause any auto updates, nor send any information |
| 139 | # only a GET request to http://grafana.com to get latest versions |
| 140 | ;check_for_updates = true |
| 141 | |
| 142 | # Google Analytics universal tracking code, only enabled if you specify an id here |
| 143 | ;google_analytics_ua_id = |
| 144 | |
| 145 | #################################### Security #################################### |
| 146 | [security] |
| 147 | # default admin user, created on startup |
| 148 | ;admin_user = admin |
| 149 | |
| 150 | # default admin password, can be changed before first start of grafana, or in profile settings |
| 151 | ;admin_password = admin |
| 152 | |
| 153 | # used for signing |
| 154 | ;secret_key = SW2YcwTIb9zpOOhoPsMm |
| 155 | |
| 156 | # Auto-login remember days |
| 157 | ;login_remember_days = 7 |
| 158 | ;cookie_username = grafana_user |
| 159 | ;cookie_remember_name = grafana_remember |
| 160 | |
| 161 | # disable gravatar profile images |
| 162 | ;disable_gravatar = false |
| 163 | |
| 164 | # data source proxy whitelist (ip_or_domain:port separated by spaces) |
| 165 | ;data_source_proxy_whitelist = |
| 166 | |
| 167 | # disable protection against brute force login attempts |
| 168 | ;disable_brute_force_login_protection = false |
| 169 | |
| 170 | #################################### Snapshots ########################### |
| 171 | [snapshots] |
| 172 | # snapshot sharing options |
| 173 | ;external_enabled = true |
| 174 | ;external_snapshot_url = https://snapshots-origin.raintank.io |
| 175 | ;external_snapshot_name = Publish to snapshot.raintank.io |
| 176 | |
| 177 | # remove expired snapshot |
| 178 | ;snapshot_remove_expired = true |
| 179 | |
| 180 | #################################### Dashboards History ################## |
| 181 | [dashboards] |
| 182 | # Number dashboard versions to keep (per dashboard). Default: 20, Minimum: 1 |
| 183 | ;versions_to_keep = 20 |
| 184 | |
| 185 | ;#################################### Dashboard JSON files ########################## |
| 186 | [dashboards.json] |
| 187 | enabled = true |
| 188 | path = /etc/grafana/provisioning/dashboards |
| 189 | |
| 190 | #################################### Users ############################### |
| 191 | [users] |
| 192 | # disable user signup / registration |
| 193 | ;allow_sign_up = true |
| 194 | |
| 195 | # Allow non admin users to create organizations |
| 196 | ;allow_org_create = true |
| 197 | |
| 198 | # Set to true to automatically assign new users to the default organization (id 1) |
| 199 | ;auto_assign_org = true |
| 200 | |
| 201 | # Default role new users will be automatically assigned (if disabled above is set to true) |
| 202 | ;auto_assign_org_role = Viewer |
| 203 | |
| 204 | # Background text for the user field on the login page |
| 205 | ;login_hint = email or username |
| 206 | |
| 207 | # Default UI theme ("dark" or "light") |
| 208 | ;default_theme = dark |
| 209 | |
| 210 | # External user management, these options affect the organization users view |
| 211 | ;external_manage_link_url = |
| 212 | ;external_manage_link_name = |
| 213 | ;external_manage_info = |
| 214 | |
| 215 | # Viewers can edit/inspect dashboard settings in the browser. But not save the dashboard. |
| 216 | ;viewers_can_edit = false |
| 217 | |
| 218 | [auth] |
| 219 | # Set to true to disable (hide) the login form, useful if you use OAuth, defaults to false |
| 220 | ;disable_login_form = false |
| 221 | |
| 222 | # Set to true to disable the signout link in the side menu. useful if you use auth.proxy, defaults to false |
| 223 | ;disable_signout_menu = false |
| 224 | |
| 225 | # URL to redirect the user to after sign out |
| 226 | ;signout_redirect_url = |
| 227 | |
| 228 | #################################### Anonymous Auth ########################## |
| 229 | [auth.anonymous] |
| 230 | # enable anonymous access |
| 231 | ;enabled = false |
| 232 | |
| 233 | # specify organization name that should be used for unauthenticated users |
| 234 | ;org_name = Main Org. |
| 235 | |
| 236 | # specify role for unauthenticated users |
| 237 | ;org_role = Viewer |
| 238 | |
| 239 | #################################### Github Auth ########################## |
| 240 | [auth.github] |
| 241 | ;enabled = false |
| 242 | ;allow_sign_up = true |
| 243 | ;client_id = some_id |
| 244 | ;client_secret = some_secret |
| 245 | ;scopes = user:email,read:org |
| 246 | ;auth_url = https://github.com/login/oauth/authorize |
| 247 | ;token_url = https://github.com/login/oauth/access_token |
| 248 | ;api_url = https://api.github.com/user |
| 249 | ;team_ids = |
| 250 | ;allowed_organizations = |
| 251 | |
| 252 | #################################### Google Auth ########################## |
| 253 | [auth.google] |
| 254 | ;enabled = false |
| 255 | ;allow_sign_up = true |
| 256 | ;client_id = some_client_id |
| 257 | ;client_secret = some_client_secret |
| 258 | ;scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email |
| 259 | ;auth_url = https://accounts.google.com/o/oauth2/auth |
| 260 | ;token_url = https://accounts.google.com/o/oauth2/token |
| 261 | ;api_url = https://www.googleapis.com/oauth2/v1/userinfo |
| 262 | ;allowed_domains = |
| 263 | |
| 264 | #################################### Generic OAuth ########################## |
| 265 | [auth.generic_oauth] |
| 266 | ;enabled = false |
| 267 | ;name = OAuth |
| 268 | ;allow_sign_up = true |
| 269 | ;client_id = some_id |
| 270 | ;client_secret = some_secret |
| 271 | ;scopes = user:email,read:org |
| 272 | ;auth_url = https://foo.bar/login/oauth/authorize |
| 273 | ;token_url = https://foo.bar/login/oauth/access_token |
| 274 | ;api_url = https://foo.bar/user |
| 275 | ;team_ids = |
| 276 | ;allowed_organizations = |
| 277 | |
| 278 | #################################### Grafana.com Auth #################### |
| 279 | [auth.grafana_com] |
| 280 | ;enabled = false |
| 281 | ;allow_sign_up = true |
| 282 | ;client_id = some_id |
| 283 | ;client_secret = some_secret |
| 284 | ;scopes = user:email |
| 285 | ;allowed_organizations = |
| 286 | |
| 287 | #################################### Auth Proxy ########################## |
| 288 | [auth.proxy] |
| 289 | ;enabled = false |
| 290 | ;header_name = X-WEBAUTH-USER |
| 291 | ;header_property = username |
| 292 | ;auto_sign_up = true |
| 293 | ;ldap_sync_ttl = 60 |
| 294 | ;whitelist = 192.168.1.1, 192.168.2.1 |
| 295 | |
| 296 | #################################### Basic Auth ########################## |
| 297 | [auth.basic] |
| 298 | ;enabled = true |
| 299 | |
| 300 | #################################### Auth LDAP ########################## |
| 301 | [auth.ldap] |
| 302 | ;enabled = false |
| 303 | ;config_file = /etc/grafana/ldap.toml |
| 304 | ;allow_sign_up = true |
| 305 | |
| 306 | #################################### SMTP / Emailing ########################## |
| 307 | [smtp] |
| 308 | ;enabled = false |
| 309 | ;host = localhost:25 |
| 310 | ;user = |
| 311 | # If the password contains # or ; you have to wrap it with trippel quotes. Ex """#password;""" |
| 312 | ;password = |
| 313 | ;cert_file = |
| 314 | ;key_file = |
| 315 | ;skip_verify = false |
| 316 | ;from_address = admin@grafana.localhost |
| 317 | ;from_name = Grafana |
| 318 | # EHLO identity in SMTP dialog (defaults to instance_name) |
| 319 | ;ehlo_identity = dashboard.example.com |
| 320 | |
| 321 | [emails] |
| 322 | ;welcome_email_on_sign_up = false |
| 323 | |
| 324 | #################################### Logging ########################## |
| 325 | [log] |
| 326 | # Either "console", "file", "syslog". Default is console and file |
| 327 | # Use space to separate multiple modes, e.g. "console file" |
| 328 | ;mode = console file |
| 329 | |
| 330 | # Either "debug", "info", "warn", "error", "critical", default is "info" |
| 331 | ;level = info |
| 332 | |
| 333 | # optional settings to set different levels for specific loggers. Ex filters = sqlstore:debug |
| 334 | ;filters = |
| 335 | |
| 336 | # For "console" mode only |
| 337 | [log.console] |
| 338 | ;level = |
| 339 | |
| 340 | # log line format, valid options are text, console and json |
| 341 | ;format = console |
| 342 | |
| 343 | # For "file" mode only |
| 344 | [log.file] |
| 345 | ;level = |
| 346 | |
| 347 | # log line format, valid options are text, console and json |
| 348 | ;format = text |
| 349 | |
| 350 | # This enables automated log rotate(switch of following options), default is true |
| 351 | ;log_rotate = true |
| 352 | |
| 353 | # Max line number of single file, default is 1000000 |
| 354 | ;max_lines = 1000000 |
| 355 | |
| 356 | # Max size shift of single file, default is 28 means 1 << 28, 256MB |
| 357 | ;max_size_shift = 28 |
| 358 | |
| 359 | # Segment log daily, default is true |
| 360 | ;daily_rotate = true |
| 361 | |
| 362 | # Expired days of log file(delete after max days), default is 7 |
| 363 | ;max_days = 7 |
| 364 | |
| 365 | [log.syslog] |
| 366 | ;level = |
| 367 | |
| 368 | # log line format, valid options are text, console and json |
| 369 | ;format = text |
| 370 | |
| 371 | # Syslog network type and address. This can be udp, tcp, or unix. If left blank, the default unix endpoints will be used. |
| 372 | ;network = |
| 373 | ;address = |
| 374 | |
| 375 | # Syslog facility. user, daemon and local0 through local7 are valid. |
| 376 | ;facility = |
| 377 | |
| 378 | # Syslog tag. By default, the process' argv[0] is used. |
| 379 | ;tag = |
| 380 | |
| 381 | #################################### Alerting ############################ |
| 382 | [alerting] |
| 383 | # Disable alerting engine & UI features |
| 384 | ;enabled = true |
| 385 | # Makes it possible to turn off alert rule execution but alerting UI is visible |
| 386 | ;execute_alerts = true |
| 387 | |
| 388 | #################################### Explore ############################# |
| 389 | [explore] |
| 390 | # Enable the Explore section |
| 391 | ;enabled = false |
| 392 | |
| 393 | #################################### Internal Grafana Metrics ########################## |
| 394 | # Metrics available at HTTP API Url /metrics |
| 395 | [metrics] |
| 396 | # Disable / Enable internal metrics |
| 397 | ;enabled = true |
| 398 | |
| 399 | # Publish interval |
| 400 | ;interval_seconds = 10 |
| 401 | |
| 402 | # Send internal metrics to Graphite |
| 403 | [metrics.graphite] |
| 404 | # Enable by setting the address setting (ex localhost:2003) |
| 405 | ;address = |
| 406 | ;prefix = prod.grafana.%(instance_name)s. |
| 407 | |
| 408 | #################################### Distributed tracing ############ |
| 409 | [tracing.jaeger] |
| 410 | # Enable by setting the address sending traces to jaeger (ex localhost:6831) |
| 411 | ;address = localhost:6831 |
| 412 | # Tag that will always be included in when creating new spans. ex (tag1:value1,tag2:value2) |
| 413 | ;always_included_tag = tag1:value1 |
| 414 | # Type specifies the type of the sampler: const, probabilistic, rateLimiting, or remote |
| 415 | ;sampler_type = const |
| 416 | # jaeger samplerconfig param |
| 417 | # for "const" sampler, 0 or 1 for always false/true respectively |
| 418 | # for "probabilistic" sampler, a probability between 0 and 1 |
| 419 | # for "rateLimiting" sampler, the number of spans per second |
| 420 | # for "remote" sampler, param is the same as for "probabilistic" |
| 421 | # and indicates the initial sampling rate before the actual one |
| 422 | # is received from the mothership |
| 423 | ;sampler_param = 1 |
| 424 | |
| 425 | #################################### Grafana.com integration ########################## |
| 426 | # Url used to to import dashboards directly from Grafana.com |
| 427 | [grafana_com] |
| 428 | ;url = https://grafana.com |
| 429 | |
| 430 | #################################### External image storage ########################## |
| 431 | [external_image_storage] |
| 432 | # Used for uploading images to public servers so they can be included in slack/email messages. |
| 433 | # you can choose between (s3, webdav, gcs, azure_blob, local) |
| 434 | ;provider = |
| 435 | |
| 436 | [external_image_storage.s3] |
| 437 | ;bucket = |
| 438 | ;region = |
| 439 | ;path = |
| 440 | ;access_key = |
| 441 | ;secret_key = |
| 442 | |
| 443 | [external_image_storage.webdav] |
| 444 | ;url = |
| 445 | ;public_url = |
| 446 | ;username = |
| 447 | ;password = |
| 448 | |
| 449 | [external_image_storage.gcs] |
| 450 | ;key_file = |
| 451 | ;bucket = |
| 452 | ;path = |
| 453 | |
| 454 | [external_image_storage.azure_blob] |
| 455 | ;account_name = |
| 456 | ;account_key = |
| 457 | ;container_name = |
| 458 | |
| 459 | [external_image_storage.local] |
| 460 | # does not require any configuration |
| 461 | |