Skip to content

Commit

Permalink
Merge pull request #3968 from erasche/stats-docs
Browse files Browse the repository at this point in the history
Stats docs
  • Loading branch information
martenson authored Apr 25, 2017
2 parents b9effa4 + 388bb42 commit 45e40a1
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 1 deletion.
Binary file added doc/source/admin/special_topics/grafana.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion doc/source/admin/special_topics/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ Special Topics
mulled_containers
grt
chat
webhooks
webhooks
performance_tracking
52 changes: 52 additions & 0 deletions doc/source/admin/special_topics/performance_tracking.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
Galaxy Performance Tracking
===========================

Tracking performance over time and identifying slow queries in your Galaxy can be an extremely important thing to do, especially for larger Galaxies.

Most performance tracking requires sending metrics to a metrics collection server such as `Graphite <http://graphiteapp.org/>`__ or `StatsD <https://github.com/etsy/statsd/>`__. This document assumes you have already deployed a metrics server.

uWSGI
-----

As you have certainly switched to uWSGI from the default paste server, there is some built-in uWSGI support for performance logging. You can send uWSGI's internal metrics to a carbon (Graphite) server by setting the carbon option in your galaxy.ini:

.. code-block:: ini
[uwsgi]
socket = ...
carbon = 127.0.0.1:2003
Or a StatsD server via:

.. code-block:: ini
[uwsgi]
socket = ...
statsd-push = 127.0.0.1:8125
The `official documentation <http://uwsgi-docs.readthedocs.io/en/latest/Metrics.html#stats-pushers>`__ contains further information on uWSGI and stats servers. In the `uWSGI Stats Server <http://uwsgi-docs.readthedocs.io/en/latest/StatsServer.html>` documentation, you can see an example of the sort of information that you will be able to collect.

API / Route Timing Statistics
-----------------------------

Galaxy provides middleware to automatically log the amount of time controllers take to execute and to send that data to a stats server. Using the stats server of your choice, you can calculate the relevant statistics to ensure that your Galaxy server is performing as expected.

The statsD configuration requires setting the following:

.. code-block:: ini
statsd_host=127.0.0.1
statsd_port=8125
statsd_prefix=galaxy
And the graphite configuration is very similar:

.. code-block:: ini
graphite_host=127.0.0.1
graphite_port=2003
graphite_prefix=galaxy
Most people visualize the statistics using something like `Grafana <https://grafana.com/>`__:

.. image:: grafana.png

0 comments on commit 45e40a1

Please sign in to comment.