Skip to main content

Locust.io 1.X influxdb listener

Project description

locust-influxdb-listener

Package that uses locust 'event' hooks to push locust related events to an influxDB database.

Installation

Install using your favourite package installer:

pip install locust-influxdb-listener
# or
easy_install locust-influxdb-listener

Usage

Import the library and use the event.init hook to register the listener.

...
from locust_influxdb_listener import InfluxDBListener, InfluxDBSettings

@events.init.add_listener
def on_locust_init(environment, **_kwargs):
    """
    Hook event that enables starting an influxdb connection
    """
    # this settings matches the given docker-compose file
    influxDBSettings = InfluxDBSettings(
        influx_host = 'localhost',
        influx_port = '8086',
        user = 'admin',
        pwd = 'pass',
        database = 'test-project'
    )
    # start listerner with the given configuration
    InfluxDBListener(env=environment, influxDbSettings=influxDBSettings)
...

Example

You can find a working example under the examples folder

InfluxDB with Grafana

We have included a working example docker-compose.yml file that can be used to spin a reporting setup in case you don't have one.

(Make sure you have docker and docker-compose installed and just run:

docker-compose up

Configuration

Once grafana is running (by default on port: 3000) https://localhost:3000 , you need to:

  • Connect to influxdb as the datasource:

  • Import a new dashboard. We have provided a custom dashboard for you locust-grafana-dashboard.json that just works out of the box with the locust-events that the listener will emmit.

Granfa Example

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

locust_influxdb_listener-0.0.3.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

locust_influxdb_listener-0.0.3-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file locust_influxdb_listener-0.0.3.tar.gz.

File metadata

  • Download URL: locust_influxdb_listener-0.0.3.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.8.5

File hashes

Hashes for locust_influxdb_listener-0.0.3.tar.gz
Algorithm Hash digest
SHA256 248569d9bbac6358d7d6c3c0184d32909cf5b11d59cfe6988b6707278ee9d134
MD5 5a8067709c3a0ada2d1fc4bd4ca3880b
BLAKE2b-256 4c832935b1b6bc2bab7d113c41a645c839016a25d4cc53178d6c9b85667f97b9

See more details on using hashes here.

File details

Details for the file locust_influxdb_listener-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: locust_influxdb_listener-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.8.5

File hashes

Hashes for locust_influxdb_listener-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 abe3fe7013a0c6b5859e06aa49e9c5b8f87cdccb5e5bfbb51ecb28f5bc54e5cf
MD5 57814ff24930e5fb01a0330d064991db
BLAKE2b-256 f7307bf0b87360c97145ed6b6cd1a9a710213f34179554149f3c410557db38ac

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page