diff --git a/config/galaxy.yml.sample b/config/galaxy.yml.sample index 785eaccf576..1d2a9c3080a 100644 --- a/config/galaxy.yml.sample +++ b/config/galaxy.yml.sample @@ -52,8 +52,7 @@ uwsgi: # --daemon and/or production deployments. master: false - # Path to the application's Python virtual environment. If using Conda for - # Galaxy's framework dependencies (not tools!), do not set this. + # Path to the application's Python virtual environment. virtualenv: .venv # Path to the application's Python library. @@ -1053,30 +1052,6 @@ galaxy: # prefix with a tag path set to the page url #statsd_influxdb: false - # Log to graphite Graphite is an external statistics aggregator - # (https://github.com/graphite-project/carbon) Enabling the following - # options will cause galaxy to log request timing and other statistics - # to the configured graphite instance. The graphite_prefix is useful - # if you are running multiple Galaxy instances and want to segment - # statistics between them within the same aggregator. - #graphite_host: null - - # Log to graphite Graphite is an external statistics aggregator - # (https://github.com/graphite-project/carbon) Enabling the following - # options will cause galaxy to log request timing and other statistics - # to the configured graphite instance. The graphite_prefix is useful - # if you are running multiple Galaxy instances and want to segment - # statistics between them within the same aggregator. - #graphite_port: 2003 - - # Log to graphite Graphite is an external statistics aggregator - # (https://github.com/graphite-project/carbon) Enabling the following - # options will cause galaxy to log request timing and other statistics - # to the configured graphite instance. The graphite_prefix is useful - # if you are running multiple Galaxy instances and want to segment - # statistics between them within the same aggregator. - #graphite_prefix: galaxy - # Add an option to the library upload form which allows administrators # to upload a directory of files. #library_import_dir: null diff --git a/doc/source/admin/galaxy_options.rst b/doc/source/admin/galaxy_options.rst index eaa7166d73a..6e6fe5c6a95 100644 --- a/doc/source/admin/galaxy_options.rst +++ b/doc/source/admin/galaxy_options.rst @@ -2170,54 +2170,6 @@ :Type: bool -~~~~~~~~~~~~~~~~~ -``graphite_host`` -~~~~~~~~~~~~~~~~~ - -:Description: - Log to graphite Graphite is an external statistics aggregator - (https://github.com/graphite-project/carbon) Enabling the - following options will cause galaxy to log request timing and - other statistics to the configured graphite instance. The - graphite_prefix is useful if you are running multiple Galaxy - instances and want to segment statistics between them within the - same aggregator. -:Default: ``None`` -:Type: str - - -~~~~~~~~~~~~~~~~~ -``graphite_port`` -~~~~~~~~~~~~~~~~~ - -:Description: - Log to graphite Graphite is an external statistics aggregator - (https://github.com/graphite-project/carbon) Enabling the - following options will cause galaxy to log request timing and - other statistics to the configured graphite instance. The - graphite_prefix is useful if you are running multiple Galaxy - instances and want to segment statistics between them within the - same aggregator. -:Default: ``2003`` -:Type: int - - -~~~~~~~~~~~~~~~~~~~ -``graphite_prefix`` -~~~~~~~~~~~~~~~~~~~ - -:Description: - Log to graphite Graphite is an external statistics aggregator - (https://github.com/graphite-project/carbon) Enabling the - following options will cause galaxy to log request timing and - other statistics to the configured graphite instance. The - graphite_prefix is useful if you are running multiple Galaxy - instances and want to segment statistics between them within the - same aggregator. -:Default: ``galaxy`` -:Type: str - - ~~~~~~~~~~~~~~~~~~~~~~ ``library_import_dir`` ~~~~~~~~~~~~~~~~~~~~~~ diff --git a/doc/source/admin/special_topics/performance_tracking.rst b/doc/source/admin/special_topics/performance_tracking.rst index e39759e0468..1da09e8a1c3 100644 --- a/doc/source/admin/special_topics/performance_tracking.rst +++ b/doc/source/admin/special_topics/performance_tracking.rst @@ -41,16 +41,6 @@ The statsD configuration requires setting the following options in the ``galaxy` statsd_port: 8125 statsd_prefix: galaxy -And the graphite configuration is very similar: - -.. code-block:: yaml - - galaxy: - # ... - graphite_host: 127.0.0.1 - graphite_port: 2003 - graphite_prefix: galaxy - Most people visualize the statistics using something like `Grafana `__: .. image:: grafana.png diff --git a/doc/source/lib/galaxy.web.framework.middleware.rst b/doc/source/lib/galaxy.web.framework.middleware.rst index 202b6d5c4f0..71d51f91964 100644 --- a/doc/source/lib/galaxy.web.framework.middleware.rst +++ b/doc/source/lib/galaxy.web.framework.middleware.rst @@ -25,14 +25,6 @@ galaxy\.web\.framework\.middleware\.error module :undoc-members: :show-inheritance: -galaxy\.web\.framework\.middleware\.graphite module ---------------------------------------------------- - -.. automodule:: galaxy.web.framework.middleware.graphite - :members: - :undoc-members: - :show-inheritance: - galaxy\.web\.framework\.middleware\.profile module -------------------------------------------------- diff --git a/lib/galaxy/config.py b/lib/galaxy/config.py index f258f660340..7358de89aaa 100644 --- a/lib/galaxy/config.py +++ b/lib/galaxy/config.py @@ -643,10 +643,6 @@ class Configuration(object): self.statsd_port = int(kwargs.get('statsd_port', 8125)) self.statsd_prefix = kwargs.get('statsd_prefix', 'galaxy') self.statsd_influxdb = string_as_bool(kwargs.get('statsd_influxdb', False)) - # Statistics and profiling with graphite - self.graphite_host = kwargs.get('graphite_host', '') - self.graphite_port = int(kwargs.get('graphite_port', 2003)) - self.graphite_prefix = kwargs.get('graphite_prefix', 'galaxy') # Logging with fluentd self.fluent_log = string_as_bool(kwargs.get('fluent_log', False)) self.fluent_host = kwargs.get('fluent_host', 'localhost') diff --git a/lib/galaxy/dependencies/__init__.py b/lib/galaxy/dependencies/__init__.py index 22c4f8c489b..5850541dce7 100644 --- a/lib/galaxy/dependencies/__init__.py +++ b/lib/galaxy/dependencies/__init__.py @@ -103,9 +103,6 @@ class ConditionalDependencies(object): def check_statsd(self): return self.config.get("statsd_host", None) is not None - def check_graphite(self): - return self.config.get("graphite_host", None) is not None - def check_weberror(self): return (asbool(self.config["debug"]) and asbool(self.config["use_interactive"])) diff --git a/lib/galaxy/dependencies/conditional-requirements.txt b/lib/galaxy/dependencies/conditional-requirements.txt index ca68f61de85..4a9b0f432b9 100644 --- a/lib/galaxy/dependencies/conditional-requirements.txt +++ b/lib/galaxy/dependencies/conditional-requirements.txt @@ -9,7 +9,6 @@ raven pbs_python drmaa statsd -graphitesend docker azure-storage==0.32.0 # PyRods not in PyPI diff --git a/lib/galaxy/web/framework/middleware/graphite.py b/lib/galaxy/web/framework/middleware/graphite.py deleted file mode 100644 index 405aed7d370..00000000000 --- a/lib/galaxy/web/framework/middleware/graphite.py +++ /dev/null @@ -1,52 +0,0 @@ -""" -Middleware for sending request statistics to graphite -""" -from __future__ import absolute_import - -import logging -import time - -log = logging.getLogger(__name__) - -try: - import graphitesend -except ImportError: - # This middleware will never be used without graphite. This block allows - # unit tests pass on systems without it. - graphitesend = None - - -class GraphiteMiddleware(object): - """ - This middleware will log request durations to the configured graphite - instance. - """ - - def __init__(self, - application, - graphite_host, - graphite_port, - graphite_prefix): - if not graphitesend: - raise ImportError("graphite middleware configured, but no graphite python module found. " - "Please install the python graphitesend module to use this functionality.") - self.application = application - try: - self.graphite_client = graphitesend.init(graphite_server=graphite_host, graphite_port=int(graphite_port), prefix=graphite_prefix.rstrip('.')) - except graphitesend.graphitesend.GraphiteSendException: - self.graphite_client = None - log.exception("Could not instantiate graphite metrics logger. It will be disabled until Galaxy restart") - - def __call__(self, environ, start_response): - start_time = time.time() - req = self.application(environ, start_response) - # If graphite is disabled, exit early. - if not self.graphite_client: - return req - - dt = int((time.time() - start_time) * 1000) - try: - self.graphite_client.send(environ.get('controller_action_key', None) or environ.get('PATH_INFO', "NOPATH").strip('/').replace('/', '.'), dt) - except graphitesend.GraphiteSendException: - log.exception("Graphite Error") - return req diff --git a/lib/galaxy/webapps/galaxy/buildapp.py b/lib/galaxy/webapps/galaxy/buildapp.py index 766e1c64aa4..3f3783c8b99 100644 --- a/lib/galaxy/webapps/galaxy/buildapp.py +++ b/lib/galaxy/webapps/galaxy/buildapp.py @@ -979,15 +979,6 @@ def wrap_in_middleware(app, global_conf, application_stack, **local_conf): conf.get('statsd_prefix', 'galaxy'), conf.get('statsd_influxdb', False))) log.debug("Enabling 'statsd' middleware") - # graphite request timing and profiling - graphite_host = conf.get('graphite_host', None) - if graphite_host: - from galaxy.web.framework.middleware.graphite import GraphiteMiddleware - app = wrap_if_allowed(app, stack, GraphiteMiddleware, - args=(graphite_host, - conf.get('graphite_port', 2003), - conf.get('graphite_prefix', 'galaxy'))) - log.debug("Enabling 'graphite' middleware") # If we're using remote_user authentication, add middleware that # protects Galaxy from improperly configured authentication in the # upstream server diff --git a/lib/galaxy/webapps/galaxy/config_schema.yml b/lib/galaxy/webapps/galaxy/config_schema.yml index 5e9b992a07e..710c7b67fcf 100644 --- a/lib/galaxy/webapps/galaxy/config_schema.yml +++ b/lib/galaxy/webapps/galaxy/config_schema.yml @@ -1620,41 +1620,6 @@ mapping: Instead of sending prefix + dot-separated-path, Galaxy will send prefix with a tag path set to the page url - graphite_host: - type: str - required: false - desc: | - Log to graphite - Graphite is an external statistics aggregator (https://github.com/graphite-project/carbon) - Enabling the following options will cause galaxy to log request timing and - other statistics to the configured graphite instance. The graphite_prefix is - useful if you are running multiple Galaxy instances and want to segment - statistics between them within the same aggregator. - - graphite_port: - type: int - default: 2003 - required: false - desc: | - Log to graphite - Graphite is an external statistics aggregator (https://github.com/graphite-project/carbon) - Enabling the following options will cause galaxy to log request timing and - other statistics to the configured graphite instance. The graphite_prefix is - useful if you are running multiple Galaxy instances and want to segment - statistics between them within the same aggregator. - - graphite_prefix: - type: str - default: galaxy - required: false - desc: | - Log to graphite - Graphite is an external statistics aggregator (https://github.com/graphite-project/carbon) - Enabling the following options will cause galaxy to log request timing and - other statistics to the configured graphite instance. The graphite_prefix is - useful if you are running multiple Galaxy instances and want to segment - statistics between them within the same aggregator. - library_import_dir: type: str default: null