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 favorite 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.

Grafa 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.7.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

locust_influxdb_listener-0.0.7-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for locust_influxdb_listener-0.0.7.tar.gz
Algorithm Hash digest
SHA256 8bb64c38a3e4665e2e84cd139f24e48f0769414e956432ad3ed802ffc2d26161
MD5 9e8b5bc545522535b52c891f2b1c0b47
BLAKE2b-256 2ac8b4ae48c226f39765bde20d1998aa9405dd099813ecbe0319bf38284ff21a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for locust_influxdb_listener-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 47a43f1dcbeee9eacc21350e8b15c3c11dfcb60cb15cf9ba8fc0d79854bc87a4
MD5 cd2268b9778dca425cf19b84df07303c
BLAKE2b-256 5df78e83b5462a1fa4ba28e54f079b91faea84d6adef859ac4604b9c00025e70

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