OLD | NEW |
(Empty) | |
| 1 ## Graphite local_settings.py |
| 2 # Edit this file to customize the default Graphite webapp settings |
| 3 # |
| 4 # Additional customizations to Django settings can be added to this file as well |
| 5 |
| 6 ##################################### |
| 7 # General Configuration # |
| 8 ##################################### |
| 9 # Set this to a long, random unique string to use as a secret key for this |
| 10 # install. This key is used for salting of hashes used in auth tokens, |
| 11 # CRSF middleware, cookie storage, etc. This should be set identically among |
| 12 # instances if used behind a load balancer. |
| 13 SECRET_KEY = 'asldfj923 9udnv0782309xc655sd-09fasn-9123$%^&' |
| 14 |
| 15 # In Django 1.5+ set this to the list of hosts your graphite instances is |
| 16 # accessible as. See: |
| 17 # https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-ALLOWED_HOSTS |
| 18 #ALLOWED_HOSTS = [ '*' ] |
| 19 |
| 20 # Set your local timezone (Django's default is America/Chicago) |
| 21 # If your graphs appear to be offset by a couple hours then this probably |
| 22 # needs to be explicitly set to your local timezone. |
| 23 #TIME_ZONE = 'America/Los_Angeles' |
| 24 |
| 25 # Override this to provide documentation specific to your Graphite deployment |
| 26 #DOCUMENTATION_URL = "http://graphite.readthedocs.org/" |
| 27 |
| 28 # Metric data and graphs are cached for one minute by default |
| 29 #DEFAULT_CACHE_DURATION = 60 |
| 30 |
| 31 # Logging |
| 32 #LOG_RENDERING_PERFORMANCE = True |
| 33 #LOG_CACHE_PERFORMANCE = True |
| 34 #LOG_METRIC_ACCESS = True |
| 35 |
| 36 # Enable full debug page display on exceptions (Internal Server Error pages) |
| 37 DEBUG = True |
| 38 |
| 39 # If using RRD files and rrdcached, set to the address or socket of the daemon |
| 40 #FLUSHRRDCACHED = 'unix:/var/run/rrdcached.sock' |
| 41 |
| 42 # This lists the memcached servers that will be used by this webapp. |
| 43 # If you have a cluster of webapps you should ensure all of them |
| 44 # have the *exact* same value for this setting. That will maximize cache |
| 45 # efficiency. Setting MEMCACHE_HOSTS to be empty will turn off use of |
| 46 # memcached entirely. |
| 47 # |
| 48 # You should not use the loopback address (127.0.0.1) here if using clustering |
| 49 # as every webapp in the cluster should use the exact same values to prevent |
| 50 # unneeded cache misses. Set to [] to disable caching of images and fetched data |
| 51 #MEMCACHE_HOSTS = ['10.10.10.10:11211', '10.10.10.11:11211', '10.10.10.12:11211'
] |
| 52 #DEFAULT_CACHE_DURATION = 60 # Cache images and data for 1 minute |
| 53 |
| 54 |
| 55 ##################################### |
| 56 # Filesystem Paths # |
| 57 ##################################### |
| 58 # Change only GRAPHITE_ROOT if your install is merely shifted from /opt/graphite |
| 59 # to somewhere else |
| 60 GRAPHITE_ROOT = '/home/www-data/graphite' |
| 61 |
| 62 # Most installs done outside of a separate tree such as /opt/graphite will only |
| 63 # need to change these three settings. Note that the default settings for each |
| 64 # of these is relative to GRAPHITE_ROOT |
| 65 #CONF_DIR = '/opt/graphite/conf' |
| 66 #STORAGE_DIR = '/opt/graphite/storage' |
| 67 CONTENT_DIR = '/home/www-data/graphite/webapp/content' |
| 68 |
| 69 # To further or fully customize the paths, modify the following. Note that the |
| 70 # default settings for each of these are relative to CONF_DIR and STORAGE_DIR |
| 71 # |
| 72 ## Webapp config files |
| 73 #DASHBOARD_CONF = '/opt/graphite/conf/dashboard.conf' |
| 74 #GRAPHTEMPLATES_CONF = '/opt/graphite/conf/graphTemplates.conf' |
| 75 |
| 76 ## Data directories |
| 77 # NOTE: If any directory is unreadable in STANDARD_DIRS it will break metric bro
wsing |
| 78 #CERES_DIR = '/opt/graphite/storage/ceres' |
| 79 #WHISPER_DIR = '/opt/graphite/storage/whisper' |
| 80 #RRD_DIR = '/opt/graphite/storage/rrd' |
| 81 # Data directories using the "Standard" finder (i.e. not Ceres) |
| 82 #STANDARD_DIRS = [WHISPER_DIR, RRD_DIR] # Default: set from the above variables |
| 83 #LOG_DIR = '/opt/graphite/storage/log/webapp' |
| 84 #INDEX_FILE = '/opt/graphite/storage/index' # Search index file |
| 85 |
| 86 |
| 87 ##################################### |
| 88 # Email Configuration # |
| 89 ##################################### |
| 90 # This is used for emailing rendered Graphs |
| 91 # Default backend is SMTP |
| 92 #EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' |
| 93 #EMAIL_HOST = 'localhost' |
| 94 #EMAIL_PORT = 25 |
| 95 #EMAIL_HOST_USER = '' |
| 96 #EMAIL_HOST_PASSWORD = '' |
| 97 #EMAIL_USE_TLS = False |
| 98 # To drop emails on the floor, enable the Dummy backend: |
| 99 #EMAIL_BACKEND = 'django.core.mail.backends.dummy.EmailBackend' |
| 100 |
| 101 |
| 102 ##################################### |
| 103 # Authentication Configuration # |
| 104 ##################################### |
| 105 ## LDAP / ActiveDirectory authentication setup |
| 106 #USE_LDAP_AUTH = True |
| 107 #LDAP_SERVER = "ldap.mycompany.com" |
| 108 #LDAP_PORT = 389 |
| 109 #LDAP_USE_TLS = False |
| 110 # OR |
| 111 #LDAP_URI = "ldaps://ldap.mycompany.com:636" |
| 112 #LDAP_SEARCH_BASE = "OU=users,DC=mycompany,DC=com" |
| 113 #LDAP_BASE_USER = "CN=some_readonly_account,DC=mycompany,DC=com" |
| 114 #LDAP_BASE_PASS = "readonly_account_password" |
| 115 #LDAP_USER_QUERY = "(username=%s)" #For Active Directory use "(sAMAccountName=%
s)" |
| 116 # |
| 117 # If you want to further customize the ldap connection options you should |
| 118 # directly use ldap.set_option to set the ldap module's global options. |
| 119 # For example: |
| 120 # |
| 121 #import ldap |
| 122 #ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_ALLOW) # Use ldap.O
PT_X_TLS_DEMAND to force TLS |
| 123 #ldap.set_option(ldap.OPT_REFERRALS, 0) # Enable for Active Directory |
| 124 #ldap.set_option(ldap.OPT_X_TLS_CACERTDIR, "/etc/ssl/ca") |
| 125 #ldap.set_option(ldap.OPT_X_TLS_CERTFILE, "/etc/ssl/mycert.pem") |
| 126 #ldap.set_option(ldap.OPT_X_TLS_KEYFILE, "/etc/ssl/mykey.pem") |
| 127 #ldap.set_option(ldap.OPT_DEBUG_LEVEL, 65535) # To enable verbose debugging |
| 128 # See http://www.python-ldap.org/ for further details on these options. |
| 129 |
| 130 ## REMOTE_USER authentication. See: https://docs.djangoproject.com/en/dev/howto/
auth-remote-user/ |
| 131 #USE_REMOTE_USER_AUTHENTICATION = True |
| 132 |
| 133 # Override the URL for the login link (e.g. for django_openid_auth) |
| 134 #LOGIN_URL = '/account/login' |
| 135 |
| 136 |
| 137 ############################### |
| 138 # Authorization for Dashboard # |
| 139 ############################### |
| 140 # By default, there is no security on dashboards - any user can add, change or d
elete them. |
| 141 # This section provides 3 different authorization models, of varying strictness. |
| 142 |
| 143 # If set to True, users must be logged in to save or delete dashboards. Defaults
to False |
| 144 #DASHBOARD_REQUIRE_AUTHENTICATION = True |
| 145 |
| 146 # If set to the name of a user group, dashboards can be saved and deleted by any
user in this |
| 147 # group. Groups can be set in the Django Admin app, or in LDAP. Defaults to No
ne. |
| 148 # NOTE: Ignored if DASHBOARD_REQUIRE_AUTHENTICATION is not set |
| 149 #DASHBOARD_REQUIRE_EDIT_GROUP = 'dashboard-editors-group' |
| 150 |
| 151 # If set to True, dashboards can be saved or deleted by any user having the appr
opriate |
| 152 # (change or delete) permission (as set in the Django Admin app). Defaults to F
alse |
| 153 # NOTE: Ignored if DASHBOARD_REQUIRE_AUTHENTICATION is not set |
| 154 #DASHBOARD_REQUIRE_PERMISSIONS = True |
| 155 |
| 156 |
| 157 |
| 158 ########################## |
| 159 # Database Configuration # |
| 160 ########################## |
| 161 # By default sqlite is used. If you cluster multiple webapps you will need |
| 162 # to setup an external database (such as MySQL) and configure all of the webapp |
| 163 # instances to use the same database. Note that this database is only used to st
ore |
| 164 # Django models such as saved graphs, dashboards, user preferences, etc. |
| 165 # Metric data is not stored here. |
| 166 # |
| 167 # DO NOT FORGET TO RUN 'django-admin.py syncdb' AFTER SETTING UP A NEW DATABASE |
| 168 # |
| 169 # The following built-in database engines are available: |
| 170 # django.db.backends.postgresql_psycopg2 |
| 171 # django.db.backends.mysql |
| 172 # django.db.backends.sqlite3 |
| 173 # django.db.backends.oracle |
| 174 # |
| 175 # The default is 'django.db.backends.sqlite3' with file 'graphite.db' |
| 176 # located in STORAGE_DIR |
| 177 # |
| 178 DATABASES = { |
| 179 'default': { |
| 180 'NAME': '/home/www-data/graphite/storage/graphite.db', |
| 181 'ENGINE': 'django.db.backends.sqlite3', |
| 182 'USER': '', |
| 183 'PASSWORD': '', |
| 184 'HOST': '', |
| 185 'PORT': '' |
| 186 } |
| 187 } |
| 188 # |
| 189 |
| 190 ######################### |
| 191 # Cluster Configuration # |
| 192 ######################### |
| 193 # (To avoid excessive DNS lookups you want to stick to using IP addresses only i
n this entire section) |
| 194 # |
| 195 # This should list the IP address (and optionally port) of the webapp on each |
| 196 # remote server in the cluster. These servers must each have local access to |
| 197 # metric data. Note that the first server to return a match for a query will be |
| 198 # used. |
| 199 #CLUSTER_SERVERS = ["10.0.2.2:80", "10.0.2.3:80"] |
| 200 |
| 201 ## These are timeout values (in seconds) for requests to remote webapps |
| 202 #REMOTE_FIND_TIMEOUT = 3.0 # Timeout for metric find requests |
| 203 #REMOTE_FETCH_TIMEOUT = 6.0 # Timeout to fetch series data |
| 204 #REMOTE_RETRY_DELAY = 60.0 # Time before retrying a failed remote we
bapp |
| 205 #REMOTE_READER_CACHE_SIZE_LIMIT = 1000 # Maximum number of remote URL queries to
cache |
| 206 #FIND_CACHE_DURATION = 300 # Time to cache remote metric find result
s |
| 207 # If the query doesn't fall entirely within the FIND_TOLERANCE window |
| 208 # we disregard the window. This prevents unnecessary remote fetches |
| 209 # caused when carbon's cache skews node.intervals, giving the appearance |
| 210 # remote systems have data we don't have locally, which we probably do. |
| 211 #FIND_TOLERANCE = 2 * FIND_CACHE_DURATION |
| 212 |
| 213 ## Remote rendering settings |
| 214 # Set to True to enable rendering of Graphs on a remote webapp |
| 215 #REMOTE_RENDERING = True |
| 216 # List of IP (and optionally port) of the webapp on each remote server that |
| 217 # will be used for rendering. Note that each rendering host should have local |
| 218 # access to metric data or should have CLUSTER_SERVERS configured |
| 219 #RENDERING_HOSTS = [] |
| 220 #REMOTE_RENDER_CONNECT_TIMEOUT = 1.0 |
| 221 |
| 222 # If you are running multiple carbon-caches on this machine (typically behind a
relay using |
| 223 # consistent hashing), you'll need to list the ip address, cache query port, and
instance name of each carbon-cache |
| 224 # instance on the local machine (NOT every carbon-cache in the entire cluster).
The default cache query port is 7002 |
| 225 # and a common scheme is to use 7102 for instance b, 7202 for instance c, etc. |
| 226 # |
| 227 # You *should* use 127.0.0.1 here in most cases |
| 228 #CARBONLINK_HOSTS = ["127.0.0.1:7002:a", "127.0.0.1:7102:b", "127.0.0.1:7202:c"] |
| 229 #CARBONLINK_TIMEOUT = 1.0 |
| 230 #CARBONLINK_RETRY_DELAY = 15 # Seconds to blacklist a failed remote server |
| 231 |
| 232 # A "keyfunc" is a user-defined python function that is given a metric name |
| 233 # and returns a string that should be used when hashing the metric name. |
| 234 # This is important when your hashing has to respect certain metric groupings. |
| 235 #CARBONLINK_HASHING_KEYFUNC = "/opt/graphite/bin/keyfuncs.py:my_keyfunc" |
| 236 |
| 237 # Prefix set in carbon for the carbon specific metrics. Default in carbon is 'c
arbon' |
| 238 #CARBON_METRIC_PREFIX='carbon' |
| 239 |
| 240 # The replication factor to use with consistent hashing |
| 241 # This should usually match the value configured in Carbon |
| 242 #REPLICATION_FACTOR = 1 |
| 243 |
| 244 # How often should render.datalib.fetch() retry to get remote data |
| 245 # MAX_FETCH_RETRIES = 2 |
| 246 |
| 247 ##################################### |
| 248 # Additional Django Settings # |
| 249 ##################################### |
| 250 # Uncomment the following line for direct access to Django settings such as |
| 251 # MIDDLEWARE_CLASSES or APPS |
| 252 #from graphite.app_settings import * |
| 253 |
| 254 |
OLD | NEW |