Skip to content

Commit d4cdc3a

Browse files
committed
Add grafana configuration file
1 parent dfe0761 commit d4cdc3a

File tree

2 files changed

+240
-0
lines changed

2 files changed

+240
-0
lines changed

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ run chmod 0775 /var/lib/graphite/storage /var/lib/graphite/storage/whisper
3131
run chmod 0664 /var/lib/graphite/storage/graphite.db
3232
run cd /var/lib/graphite/webapp/graphite && python manage.py syncdb --noinput
3333

34+
# Add grafana config
35+
add ./grafana-defaults.ini /usr/share/grafana/conf/defaults.ini
36+
3437
# Nginx
3538
expose :80
3639
# Carbon line receiver port

grafana-defaults.ini

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

0 commit comments

Comments
 (0)