mirror of
https://github.com/sprockets/sprockets.mixins.metrics.git
synced 2024-11-22 03:00:25 +00:00
Add INFLUX_SCHEME to the default URL
This commit is contained in:
parent
2204e08bf0
commit
761b4b92f3
4 changed files with 16 additions and 4 deletions
|
@ -101,6 +101,10 @@ that any buffered metrics in the InfluxDB collector are written prior to
|
|||
shutting down. The method returns a :cls:`~tornado.concurrent.TracebackFuture`
|
||||
that should be waited on prior to shutting down.
|
||||
|
||||
For environment variable based configuration, use the ``INFLUX_SCHEME``,
|
||||
``INFLUX_HOST``, and ``INFLUX_PORT`` environment variables. The defaults are
|
||||
``https``, ``localhost``, and ``8086`` respectively.
|
||||
|
||||
To use authentication with InfluxDB, set the ``INFLUX_USER`` and the
|
||||
``INFLUX_PASSWORD`` environment variables. Once installed, the
|
||||
``INFLUX_PASSWORD`` value will be masked in the Python process.
|
||||
|
@ -118,6 +122,8 @@ Settings
|
|||
``hostname`` is added by default along with ``environment`` and ``service``
|
||||
if the corresponding ``ENVIRONMENT`` or ``SERVICE`` environment variables
|
||||
are set.
|
||||
:auth_username: A username to use for InfluxDB authentication, if desired.
|
||||
:auth_password: A password to use for InfluxDB authentication, if desired.
|
||||
|
||||
Development Quickstart
|
||||
----------------------
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
Release History
|
||||
===============
|
||||
|
||||
`2.1.1`_ (9-Aug-2016)
|
||||
---------------------
|
||||
- Fix InfluxDB URL creation from environment variables
|
||||
|
||||
`2.1.0`_ (9-Aug-2016)
|
||||
---------------------
|
||||
- Add authentication environment variables for InfluxDB
|
||||
|
@ -44,7 +48,8 @@ Release History
|
|||
- Add :class:`sprockets.mixins.metrics.InfluxDBMixin`
|
||||
- Add :class:`sprockets.mixins.metrics.influxdb.InfluxDBConnection`
|
||||
|
||||
.. _Next Release: https://github.com/sprockets/sprockets.mixins.metrics/compare/2.1.0...master
|
||||
.. _Next Release: https://github.com/sprockets/sprockets.mixins.metrics/compare/2.1.1...master
|
||||
.. _2.1.0: https://github.com/sprockets/sprockets.mixins.metrics/compare/2.1.0...2.1.1
|
||||
.. _2.1.0: https://github.com/sprockets/sprockets.mixins.metrics/compare/2.0.1...2.1.0
|
||||
.. _2.0.1: https://github.com/sprockets/sprockets.mixins.metrics/compare/2.0.0...2.0.1
|
||||
.. _2.0.0: https://github.com/sprockets/sprockets.mixins.metrics/compare/1.1.1...2.0.0
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
version_info = (2, 1, 0)
|
||||
version_info = (2, 1, 1)
|
||||
__version__ = '.'.join(str(v) for v in version_info)
|
||||
__all__ = ['__version__', 'version_info']
|
||||
|
|
|
@ -319,8 +319,9 @@ def install(application, **kwargs):
|
|||
return False
|
||||
|
||||
# Get config values
|
||||
url = 'http://{}:{}/write'.format(os.environ.get('INFLUX_HOST'),
|
||||
os.environ.get('INFLUX_PORT'))
|
||||
url = '{}://{}:{}/write'.format(os.environ.get('INFLUX_SCHEME', 'http'),
|
||||
os.environ.get('INFLUX_HOST', 'localhost'),
|
||||
os.environ.get('INFLUX_PORT', 8086))
|
||||
kwargs.setdefault('url', url)
|
||||
|
||||
# Build the full tag dict and replace what was passed in
|
||||
|
|
Loading…
Reference in a new issue