summaryrefslogtreecommitdiff
path: root/devstack
diff options
context:
space:
mode:
Diffstat (limited to 'devstack')
-rw-r--r--devstack/README.rst2
-rw-r--r--devstack/lib/osprofiler6
2 files changed, 8 insertions, 0 deletions
diff --git a/devstack/README.rst b/devstack/README.rst
index da83baf..7469f79 100644
--- a/devstack/README.rst
+++ b/devstack/README.rst
@@ -17,6 +17,7 @@ that control this:
* ``<empty>`` - default messaging driver is used
* ``redis`` - Redis is installed
* ``jaeger`` - Jaeger is installed
+ * ``sqlalchemy`` - SQLAlchemy driver is installed
The default value of ``OSPROFILER_CONNECTION_STRING`` is set automatically
depending on ``OSPROFILER_COLLECTOR`` value.
@@ -31,6 +32,7 @@ that control this:
* ``mongodb://host:port`` - use MongoDB as trace storage
* ``loginsight://username:password@host`` - use LogInsight as trace collector/storage
* ``jaeger://host:port`` - use Jaeger as trace collector
+ * ``mysql+pymysql://username:password@host/profiler?charset=utf8`` - use SQLAlchemy driver with MySQL database
To configure DevStack and enable OSProfiler edit ``${DEVSTACK_DIR}/local.conf``
diff --git a/devstack/lib/osprofiler b/devstack/lib/osprofiler
index 8a7351b..aaa67f3 100644
--- a/devstack/lib/osprofiler
+++ b/devstack/lib/osprofiler
@@ -112,9 +112,15 @@ function install_osprofiler_collector() {
elif [ "$OSPROFILER_COLLECTOR" == "mongodb" ]; then
install_mongodb
OSPROFILER_CONNECTION_STRING=${OSPROFILER_CONNECTION_STRING:-"mongodb://localhost:27017"}
+ elif [ "$OSPROFILER_COLLECTOR" == "sqlalchemy" ]; then
+ local db=`database_connection_url osprofiler`
+ OSPROFILER_CONNECTION_STRING=${OSPROFILER_CONNECTION_STRING:-${db}}
+ recreate_database osprofiler
else
die $LINENO "OSProfiler collector $OSPROFILER_COLLECTOR is not supported"
fi
+
+ echo ${OSPROFILER_CONNECTION_STRING} > $HOME/.osprofiler_connection_string
}
function configure_osprofiler() {