Created
May 10, 2012 16:18
-
-
Save mleinart/2654230 to your computer and use it in GitHub Desktop.
Additional settings to change paths around in Graphite 0.9.9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Filesystem layout (all directores should end in a /) | |
WEB_DIR = dirname( abspath(__file__) ) + '/' | |
WEBAPP_DIR = dirname( dirname(WEB_DIR) ) + '/' | |
GRAPHITE_ROOT = dirname( dirname(WEBAPP_DIR) ) + '/' | |
CONTENT_DIR = WEBAPP_DIR + 'content/' | |
CSS_DIR = CONTENT_DIR + 'css/' | |
THIRDPARTY_DIR = WEB_DIR + 'thirdparty/' | |
CONF_DIR = os.environ.get('GRAPHITE_CONF_DIR', GRAPHITE_ROOT + 'conf/') | |
STORAGE_DIR = os.environ.get('GRAPHITE_STORAGE_DIR', GRAPHITE_ROOT + 'storage/') | |
LISTS_DIR = STORAGE_DIR + 'lists/' | |
INDEX_FILE = STORAGE_DIR + 'index' | |
WHITELIST_FILE = LISTS_DIR + 'whitelist' | |
LOG_DIR = STORAGE_DIR + 'log/webapp/' | |
sys.path.insert(0, THIRDPARTY_DIR) | |
sys.path.insert(0, WEBAPP_DIR) | |
# Do not override WHISPER_DIR, RRD_DIR, etc directly in | |
# local_settings.py, instead you should override DATA_DIRS | |
# to list all directories that should be searched for files | |
# of a supported format. | |
WHISPER_DIR = STORAGE_DIR + 'whisper/' | |
RRD_DIR = STORAGE_DIR + 'rrd/' | |
try: | |
import rrdtool | |
DATA_DIRS = [WHISPER_DIR, RRD_DIR] | |
except: | |
DATA_DIRS = [WHISPER_DIR] | |
TEMPLATE_DIRS = ( | |
join(WEB_DIR, 'templates'), | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment