ams-grafana.ini 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. ##################### Grafana Configuration Example #####################
  2. #
  3. # Everything has defaults so you only need to uncomment things you want to
  4. # change
  5. # possible values : production, development
  6. ; app_mode = production
  7. #################################### Paths ####################################
  8. [paths]
  9. # Path to where grafana can store temp files, sessions, and the sqlite3 db (if that is used)
  10. #
  11. ;data = /var/lib/grafana
  12. data = /var/lib/ambari-metrics-grafana
  13. #
  14. # Directory where grafana can store logs
  15. #
  16. ;logs = /var/log/grafana
  17. logs = /var/log/ambari-metrics-grafana
  18. #################################### Server ####################################
  19. [server]
  20. # Protocol (http or https)
  21. ;protocol = http
  22. # The ip address to bind to, empty will bind to all interfaces
  23. ;http_addr =
  24. # The http port to use
  25. ;http_port = 3000
  26. # The public facing domain name used to access grafana from a browser
  27. ;domain = localhost
  28. # Redirect to correct domain if host header does not match domain
  29. # Prevents DNS rebinding attacks
  30. ;enforce_domain = false
  31. # The full public facing url
  32. ;root_url = %(protocol)s://%(domain)s:%(http_port)s/
  33. # Log web requests
  34. ;router_logging = false
  35. # the path relative working path
  36. ;static_root_path = public
  37. static_root_path = /usr/lib/ambari-metrics-grafana/public
  38. # enable gzip
  39. ;enable_gzip = false
  40. # https certs & key file
  41. ;cert_file =
  42. ;cert_key =
  43. #################################### Database ####################################
  44. [database]
  45. # Either "mysql", "postgres" or "sqlite3", it's your choice
  46. ;type = sqlite3
  47. ;host = 127.0.0.1:3306
  48. ;name = grafana
  49. ;user = root
  50. ;password =
  51. # For "postgres" only, either "disable", "require" or "verify-full"
  52. ;ssl_mode = disable
  53. # For "sqlite3" only, path relative to data_path setting
  54. ;path = grafana.db
  55. #################################### Session ####################################
  56. [session]
  57. # Either "memory", "file", "redis", "mysql", "postgres", default is "file"
  58. ;provider = file
  59. # Provider config options
  60. # memory: not have any config yet
  61. # file: session dir path, is relative to grafana data_path
  62. # redis: config like redis server e.g. `addr=127.0.0.1:6379,pool_size=100,db=grafana`
  63. # mysql: go-sql-driver/mysql dsn config string, e.g. `user:password@tcp(127.0.0.1:3306)/database_name`
  64. # postgres: user=a password=b host=localhost port=5432 dbname=c sslmode=disable
  65. ;provider_config = sessions
  66. # Session cookie name
  67. ;cookie_name = grafana_sess
  68. # If you use session in https only, default is false
  69. ;cookie_secure = false
  70. # Session life time, default is 86400
  71. ;session_life_time = 86400
  72. #################################### Analytics ####################################
  73. [analytics]
  74. # Server reporting, sends usage counters to stats.grafana.org every 24 hours.
  75. # No ip addresses are being tracked, only simple counters to track
  76. # running instances, dashboard and error counts. It is very helpful to us.
  77. # Change this option to false to disable reporting.
  78. ;reporting_enabled = true
  79. # Google Analytics universal tracking code, only enabled if you specify an id here
  80. ;google_analytics_ua_id =
  81. #################################### Security ####################################
  82. [security]
  83. # default admin user, created on startup
  84. ;admin_user = admin
  85. # default admin password, can be changed before first start of grafana, or in profile settings
  86. ;admin_password = admin
  87. # used for signing
  88. ;secret_key = SW2YcwTIb9zpOOhoPsMm
  89. # Auto-login remember days
  90. ;login_remember_days = 7
  91. ;cookie_username = grafana_user
  92. ;cookie_remember_name = grafana_remember
  93. # disable gravatar profile images
  94. ;disable_gravatar = false
  95. # data source proxy whitelist (ip_or_domain:port seperated by spaces)
  96. ;data_source_proxy_whitelist =
  97. #################################### Users ####################################
  98. [users]
  99. # disable user signup / registration
  100. ;allow_sign_up = true
  101. # Allow non admin users to create organizations
  102. ;allow_org_create = true
  103. # Set to true to automatically assign new users to the default organization (id 1)
  104. ;auto_assign_org = true
  105. # Default role new users will be automatically assigned (if disabled above is set to true)
  106. ;auto_assign_org_role = Viewer
  107. # Background text for the user field on the login page
  108. ;login_hint = email or username
  109. #################################### Anonymous Auth ##########################
  110. [auth.anonymous]
  111. # enable anonymous access
  112. ;enabled = true
  113. # specify organization name that should be used for unauthenticated users
  114. ;org_name = Main Org.
  115. # specify role for unauthenticated users
  116. ;org_role = Admin
  117. #################################### Github Auth ##########################
  118. [auth.github]
  119. ;enabled = false
  120. ;allow_sign_up = false
  121. ;client_id = some_id
  122. ;client_secret = some_secret
  123. ;scopes = user:email,read:org
  124. ;auth_url = https://github.com/login/oauth/authorize
  125. ;token_url = https://github.com/login/oauth/access_token
  126. ;api_url = https://api.github.com/user
  127. ;team_ids =
  128. ;allowed_organizations =
  129. #################################### Google Auth ##########################
  130. [auth.google]
  131. ;enabled = false
  132. ;allow_sign_up = false
  133. ;client_id = some_client_id
  134. ;client_secret = some_client_secret
  135. ;scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email
  136. ;auth_url = https://accounts.google.com/o/oauth2/auth
  137. ;token_url = https://accounts.google.com/o/oauth2/token
  138. ;api_url = https://www.googleapis.com/oauth2/v1/userinfo
  139. ;allowed_domains =
  140. #################################### Auth Proxy ##########################
  141. [auth.proxy]
  142. ;enabled = false
  143. ;header_name = X-WEBAUTH-USER
  144. ;header_property = username
  145. ;auto_sign_up = true
  146. #################################### Basic Auth ##########################
  147. [auth.basic]
  148. ;enabled = true
  149. #################################### Auth LDAP ##########################
  150. [auth.ldap]
  151. ;enabled = false
  152. ;config_file = /etc/grafana/ldap.toml
  153. #################################### SMTP / Emailing ##########################
  154. [smtp]
  155. ;enabled = false
  156. ;host = localhost:25
  157. ;user =
  158. ;password =
  159. ;cert_file =
  160. ;key_file =
  161. ;skip_verify = false
  162. ;from_address = admin@grafana.localhost
  163. [emails]
  164. ;welcome_email_on_sign_up = false
  165. #################################### Logging ##########################
  166. [log]
  167. # Either "console", "file", default is "console"
  168. # Use comma to separate multiple modes, e.g. "console, file"
  169. ;mode = console, file
  170. # Buffer length of channel, keep it as it is if you don't know what it is.
  171. ;buffer_len = 10000
  172. # Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace"
  173. ;level = Info
  174. # For "console" mode only
  175. [log.console]
  176. ;level =
  177. # For "file" mode only
  178. [log.file]
  179. ;level =
  180. # This enables automated log rotate(switch of following options), default is true
  181. ;log_rotate = true
  182. # Max line number of single file, default is 1000000
  183. ;max_lines = 1000000
  184. # Max size shift of single file, default is 28 means 1 << 28, 256MB
  185. ;max_lines_shift = 28
  186. # Segment log daily, default is true
  187. ;daily_rotate = true
  188. # Expired days of log file(delete after max days), default is 7
  189. ;max_days = 7
  190. #################################### AMPQ Event Publisher ##########################
  191. [event_publisher]
  192. ;enabled = false
  193. ;rabbitmq_url = amqp://localhost/
  194. ;exchange = grafana_events
  195. ;#################################### Dashboard JSON files ##########################
  196. [dashboards.json]
  197. ;enabled = false
  198. ;path = /var/lib/grafana/dashboards
  199. path = /usr/lib/ambari-metrics-grafana/public/dashboards