add config file option to disable monitor
diff --git a/planetstack/monitor/__init__.py b/planetstack/monitor/__init__.py
index 1dd5074..d29d017 100644
--- a/planetstack/monitor/__init__.py
+++ b/planetstack/monitor/__init__.py
@@ -1,3 +1,11 @@
-from observer import ceilometer
+from planetstack.settings import STATISTICS_DRIVER
-driver = ceilometer.CeilometerDriver()
+if (STATISTICS_DRIVER=="ceilometer"):
+ from observer import ceilometer
+ driver = ceilometer.CeilometerDriver()
+elif (not STATISTICS_DRIVER) or (STATISTICS_DRIVER.lower() == "none"):
+ # disabled
+ driver = None
+else:
+ driver = None
+ print "WARNING: Unknown statistics driver %s" % STATISTICS_DRIVER
diff --git a/planetstack/planetstack/settings.py b/planetstack/planetstack/settings.py
index 8571987..f7f151b 100644
--- a/planetstack/planetstack/settings.py
+++ b/planetstack/planetstack/settings.py
@@ -150,6 +150,8 @@
'cassandra',
'kairos',
'nagios',
+# 'urlfilter',
+ 'servcomp',
'syndicate_storage',
'geoposition',
)
@@ -217,6 +219,8 @@
# {'label': 'Cassandra', 'icon':'icon-cog', 'app': 'cassandra'},
# {'label': 'KairosDB', 'icon':'icon-cog', 'app': 'kairos'},
# {'label': 'Nagios', 'icon':'icon-cog', 'app': 'nagios'},
+# {'label': 'URL Filter', 'icon': 'icon-cog', 'app': 'urlfilter'},
+ {'label': 'Service Comp', 'icon': 'icon-cog', 'app': 'servcomp'},
#{'label': 'Configured Services', 'icon':'icon-cog', 'models': [{'label': 'Content Delivery Network', 'app':'hpc'}]},
# 'sites',
@@ -265,5 +269,7 @@
ENCRYPTED_FIELDS_KEYDIR = '/opt/planetstack/private_keys'
ENCRYPTED_FIELD_MODE = 'ENCRYPT'
+STATISTICS_DRIVER = getattr(config, "statistics_driver", "ceilometer")
+
# prevents warnings on django 1.7
TEST_RUNNER = 'django.test.runner.DiscoverRunner'