]> git.pld-linux.org Git - packages/graphite-web.git/blame - local_settings.py
use apache 2.2/2.4 compatible config
[packages/graphite-web.git] / local_settings.py
CommitLineData
4fcc850f
MK
1## Graphite local_settings.py
2# It's based on 0.9.14 local_settings.py.example modified for PLD conventions
3#
4# Edit this file to customize the default Graphite webapp settings
5#
6# Additional customizations to Django settings can be added to this file as well
7
8#####################################
9# General Configuration #
10#####################################
11# Set this to a long, random unique string to use as a secret key for this
12# install. This key is used for salting of hashes used in auth tokens,
13# CRSF middleware, cookie storage, etc. This should be set identically among
14# instances if used behind a load balancer.
15SECRET_KEY = 'asgjakslgja;gas;djga;skdlgjasd'
16
17# In Django 1.5+ set this to the list of hosts your graphite instances is
18# accessible as. See:
19# https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-ALLOWED_HOSTS
20#ALLOWED_HOSTS = [ '*' ]
21
22# Set your local timezone (Django's default is America/Chicago)
23# If your graphs appear to be offset by a couple hours then this probably
24# needs to be explicitly set to your local timezone.
25#TIME_ZONE = 'America/Los_Angeles'
26
27# Override this to provide documentation specific to your Graphite deployment
28#DOCUMENTATION_URL = "http://graphite.readthedocs.org/"
29
30# Logging
31#LOG_RENDERING_PERFORMANCE = True
32#LOG_CACHE_PERFORMANCE = True
33#LOG_METRIC_ACCESS = True
34
35# Enable full debug page display on exceptions (Internal Server Error pages)
36DEBUG = False
37
38# If using RRD files and rrdcached, set to the address or socket of the daemon
39#FLUSHRRDCACHED = 'unix:/var/run/rrdcached.sock'
40
41# This lists the memcached servers that will be used by this webapp.
42# If you have a cluster of webapps you should ensure all of them
43# have the *exact* same value for this setting. That will maximize cache
44# efficiency. Setting MEMCACHE_HOSTS to be empty will turn off use of
45# memcached entirely.
46#
47# You should not use the loopback address (127.0.0.1) here if using clustering
48# as every webapp in the cluster should use the exact same values to prevent
49# unneeded cache misses. Set to [] to disable caching of images and fetched data
50#MEMCACHE_HOSTS = ['10.10.10.10:11211', '10.10.10.11:11211', '10.10.10.12:11211']
51#DEFAULT_CACHE_DURATION = 60 # Cache images and data for 1 minute
52
53
54#####################################
55# Filesystem Paths #
56#####################################
57# Change only GRAPHITE_ROOT if your install is merely shifted from /opt/graphite
58# to somewhere else
59#GRAPHITE_ROOT = '/opt/graphite'
60
61# Most installs done outside of a separate tree such as /opt/graphite will only
62# need to change these three settings. Note that the default settings for each
63# of these is relative to GRAPHITE_ROOT
64CONF_DIR = '/etc/webapps/graphite-web/'
65STORAGE_DIR = '/var/lib/graphite-web/'
66CONTENT_DIR = '/usr/share/graphite/webapp/content/'
67
68# To further or fully customize the paths, modify the following. Note that the
69# default settings for each of these are relative to CONF_DIR and STORAGE_DIR
70#
71## Webapp config files
72#DASHBOARD_CONF = '/opt/graphite/conf/dashboard.conf'
73#GRAPHTEMPLATES_CONF = '/opt/graphite/conf/graphTemplates.conf'
74
75## Data directories
76# NOTE: If any directory is unreadable in DATA_DIRS it will break metric browsing
77WHISPER_DIR = '/var/lib/carbon/whisper'
78RRD_DIR = '/var/lib/carbon/rrd'
79DATA_DIRS = [WHISPER_DIR, RRD_DIR] # Default: set from the above variables
80LOG_DIR = '/var/log/graphite-web/'
81INDEX_FILE = '/var/lib/graphite-web/index' # Search index file
82
83
84#####################################
85# Email Configuration #
86#####################################
87# This is used for emailing rendered Graphs
88# Default backend is SMTP
89#EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
90#EMAIL_HOST = 'localhost'
91#EMAIL_PORT = 25
92#EMAIL_HOST_USER = ''
93#EMAIL_HOST_PASSWORD = ''
94#EMAIL_USE_TLS = False
95# To drop emails on the floor, enable the Dummy backend:
96#EMAIL_BACKEND = 'django.core.mail.backends.dummy.EmailBackend'
97
98
99#####################################
100# Authentication Configuration #
101#####################################
102## LDAP / ActiveDirectory authentication setup
103#USE_LDAP_AUTH = True
104#LDAP_SERVER = "ldap.mycompany.com"
105#LDAP_PORT = 389
106# OR
107#LDAP_URI = "ldaps://ldap.mycompany.com:636"
108#LDAP_SEARCH_BASE = "OU=users,DC=mycompany,DC=com"
109#LDAP_BASE_USER = "CN=some_readonly_account,DC=mycompany,DC=com"
110#LDAP_BASE_PASS = "readonly_account_password"
111#LDAP_USER_QUERY = "(username=%s)" #For Active Directory use "(sAMAccountName=%s)"
112#
113# If you want to further customize the ldap connection options you should
114# directly use ldap.set_option to set the ldap module's global options.
115# For example:
116#
117#import ldap
118#ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_ALLOW)
119#ldap.set_option(ldap.OPT_X_TLS_CACERTDIR, "/etc/ssl/ca")
120#ldap.set_option(ldap.OPT_X_TLS_CERTFILE, "/etc/ssl/mycert.pem")
121#ldap.set_option(ldap.OPT_X_TLS_KEYFILE, "/etc/ssl/mykey.pem")
122# See http://www.python-ldap.org/ for further details on these options.
123
124## REMOTE_USER authentication. See: https://docs.djangoproject.com/en/dev/howto/auth-remote-user/
125#USE_REMOTE_USER_AUTHENTICATION = True
126
127# Override the URL for the login link (e.g. for django_openid_auth)
128#LOGIN_URL = '/account/login'
129
130
131##########################
132# Database Configuration #
133##########################
134# By default sqlite is used. If you cluster multiple webapps you will need
135# to setup an external database (such as MySQL) and configure all of the webapp
136# instances to use the same database. Note that this database is only used to store
137# Django models such as saved graphs, dashboards, user preferences, etc.
138# Metric data is not stored here.
139#
140# DO NOT FORGET TO RUN 'manage.py syncdb' AFTER SETTING UP A NEW DATABASE
141#
142# The following built-in database engines are available:
143# django.db.backends.postgresql # Removed in Django 1.4
144# django.db.backends.postgresql_psycopg2
145# django.db.backends.mysql
146# django.db.backends.sqlite3
147# django.db.backends.oracle
148#
149# The default is 'django.db.backends.sqlite3' with file 'graphite.db'
150# located in STORAGE_DIR
151# For Django < 1.8
152# sudo su - -s /bin/bash http
153# export DJANGO_SETTINGS_MODULE='graphite.settings'
154# django-admin.py syncdb
155#
156# For Django >= 1.8
157# sudo su - -s /bin/bash http
158# export DJANGO_SETTINGS_MODULE='graphite.settings'
159# django-admin.py migrate
160
161DATABASES = {
162 'default': {
163 'NAME': '/var/lib/graphite-web/graphite.db',
164 'ENGINE': 'django.db.backends.sqlite3',
165# 'USER': '',
166# 'PASSWORD': '',
167# 'HOST': '',
168# 'PORT': ''
169 }
170}
171#
172
173
174#########################
175# Cluster Configuration #
176#########################
177# (To avoid excessive DNS lookups you want to stick to using IP addresses only in this entire section)
178#
179# This should list the IP address (and optionally port) of the webapp on each
180# remote server in the cluster. These servers must each have local access to
181# metric data. Note that the first server to return a match for a query will be
182# used.
183#CLUSTER_SERVERS = ["10.0.2.2:80", "10.0.2.3:80"]
184
185## These are timeout values (in seconds) for requests to remote webapps
186#REMOTE_STORE_FETCH_TIMEOUT = 6 # Timeout to fetch series data
187#REMOTE_STORE_FIND_TIMEOUT = 2.5 # Timeout for metric find requests
188#REMOTE_STORE_RETRY_DELAY = 60 # Time before retrying a failed remote webapp
189#REMOTE_STORE_USE_POST = False # Use POST instead of GET for remote requests
190#REMOTE_FIND_CACHE_DURATION = 300 # Time to cache remote metric find results
191
192## Prefetch cache
193# set to True to fetch all metrics using a single http request per remote server
194# instead of one http request per target, per remote server.
195# Especially useful when generating graphs with more than 4-5 targets or if
196# there's significant latency between this server and the backends. (>20ms)
197#REMOTE_PREFETCH_DATA = False
198
199# During a rebalance of a consistent hash cluster, after a partition event on a replication > 1 cluster,
200# or in other cases we might receive multiple TimeSeries data for a metric key. Merge them together rather
201# that choosing the "most complete" one (pre-0.9.14 behaviour).
202#REMOTE_STORE_MERGE_RESULTS = True
203
204## Remote rendering settings
205# Set to True to enable rendering of Graphs on a remote webapp
206#REMOTE_RENDERING = True
207# List of IP (and optionally port) of the webapp on each remote server that
208# will be used for rendering. Note that each rendering host should have local
209# access to metric data or should have CLUSTER_SERVERS configured
210#RENDERING_HOSTS = []
211#REMOTE_RENDER_CONNECT_TIMEOUT = 1.0
212
213# If you are running multiple carbon-caches on this machine (typically behind a relay using
214# consistent hashing), you'll need to list the ip address, cache query port, and instance name of each carbon-cache
215# instance on the local machine (NOT every carbon-cache in the entire cluster). The default cache query port is 7002
216# and a common scheme is to use 7102 for instance b, 7202 for instance c, etc.
217#
218# You *should* use 127.0.0.1 here in most cases
219#CARBONLINK_HOSTS = ["127.0.0.1:7002:a", "127.0.0.1:7102:b", "127.0.0.1:7202:c"]
220#CARBONLINK_TIMEOUT = 1.0
221# Using 'query-bulk' queries for carbon
222# It's more effective, but python-carbon 0.9.13 (or latest from 0.9.x branch) is required
223# See https://github.com/graphite-project/carbon/pull/132 for details
224#CARBONLINK_QUERY_BULK = False
225
226#####################################
227# Additional Django Settings #
228#####################################
229# Uncomment the following line for direct access to Django settings such as
230# MIDDLEWARE_CLASSES or APPS
231#from graphite.app_settings import *
232
This page took 0.06077 seconds and 4 git commands to generate.