diff --git a/docs/source/settings.rst b/docs/source/settings.rst index 351dcdf5..9d9cb16a 100644 --- a/docs/source/settings.rst +++ b/docs/source/settings.rst @@ -590,6 +590,27 @@ Enable inheritance for stdio file descriptors in daemon mode. Note: To disable the python stdout buffering, you can to set the user environment variable ``PYTHONUNBUFFERED`` . +statsd_host +~~~~~~~~~~~ + +* ``--statsd-host STATSD_ADDR`` +* ``None`` + +``host:port`` of the statsd server to log to. + +.. versionadded:: 19.1 + +statsd_prefix +~~~~~~~~~~~~~ + +* ``--statsd-prefix STATSD_PREFIX`` +* ```` + +Prefix to use when emitting statsd metrics (a trailing ``.`` is added, +if not provided). + +.. versionadded:: 19.2 + Process Naming -------------- @@ -947,27 +968,3 @@ ciphers Ciphers to use (see stdlib ssl module's) -Logging -------- - -statsd_host -~~~~~~~~~~~ - -* ``--statsd-host STATSD_ADDR`` -* ``None`` - -``host:port`` of the statsd server to log to. - -.. versionadded:: 19.1 - -statsd_prefix -~~~~~~~~~~~~~ - -* ``--statsd-prefix STATSD_PREFIX`` -* ```` - -Prefix to use when emitting statsd metrics (a trailing ``.`` is added, -if not provided). - -.. versionadded:: 19.2 - diff --git a/gunicorn/config.py b/gunicorn/config.py index e39ee451..bed4f759 100644 --- a/gunicorn/config.py +++ b/gunicorn/config.py @@ -1215,6 +1215,35 @@ class EnableStdioInheritance(Setting): """ +# statsD monitoring +class StatsdHost(Setting): + name = "statsd_host" + section = "Logging" + cli = ["--statsd-host"] + meta = "STATSD_ADDR" + default = None + validator = validate_hostport + desc = """\ + ``host:port`` of the statsd server to log to. + + .. versionadded:: 19.1 + """ + +class StatsdPrefix(Setting): + name = "statsd_prefix" + section = "Logging" + cli = ["--statsd-prefix"] + meta = "STATSD_PREFIX" + default = "" + validator = validate_string + desc = """\ + Prefix to use when emitting statsd metrics (a trailing ``.`` is added, + if not provided). + + .. versionadded:: 19.2 + """ + + class Procname(Setting): name = "proc_name" section = "Process Naming" @@ -1659,31 +1688,3 @@ if sys.version_info >= (2, 7): desc = """\ Ciphers to use (see stdlib ssl module's) """ - -# statsD monitoring -class StatsdHost(Setting): - name = "statsd_host" - section = "Logging" - cli = ["--statsd-host"] - meta = "STATSD_ADDR" - default = None - validator = validate_hostport - desc = """\ - ``host:port`` of the statsd server to log to. - - .. versionadded:: 19.1 - """ - -class StatsdPrefix(Setting): - name = "statsd_prefix" - section = "Logging" - cli = ["--statsd-prefix"] - meta = "STATSD_PREFIX" - default = "" - validator = validate_string - desc = """\ - Prefix to use when emitting statsd metrics (a trailing ``.`` is added, - if not provided). - - .. versionadded:: 19.2 - """