Git Product home page Git Product logo

locust_exporter's People

Contributors

mbolek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

locust_exporter's Issues

does have url to get the response time distribution?

my focust web url is "http://192.168.181.93:30089",and the result of the url as below:
image
i can get my request statistics by visite the url "http://192.168.181.93:30089/stats/requests",and the response as below:
{"errors": [], "stats": [{"median_response_time": 22, "min_response_time": 13, "current_rps": 5.2, "name": "/portal/info", "num_failures": 0, "max_response_time": 517, "avg_content_length": 287, "avg_response_time": 25.88888888888889, "method": "GET", "num_requests": 1143}, {"median_response_time": 22, "min_response_time": 13, "current_rps": 5.2, "name": "Total", "num_failures": 0, "max_response_time": 517, "avg_content_length": 287, "avg_response_time": 25.88888888888889, "method": null, "num_requests": 1143}], "fail_ratio": 0.0, "slave_count": 2, "state": "stopped", "user_count": 0, "total_rps": 5.2}

i want to know if has a url to get the response time distribution data?just like 'http://192.168.181.93:30089/stats/respones'. but sadlly it did not work.

i want to get the response time distribution by visiting url not download the csv.

I am not able to see the metrics on the browser

Hi,
I am getting following error on terminal (where my locust_exporter is running), when trying to open the url localhost:8000

Traceback (most recent call last):
File "/Users/locust_exporter.py", line 70, in
REGISTRY.register(LocustCollector(str(sys.argv[2])))
File "/Users/.venv/lib/python3.9/site-packages/prometheus_client/registry.py", line 26, in register
names = self._get_names(collector)
File "/Users/.venv/lib/python3.9/site-packages/prometheus_client/registry.py", line 66, in _get_names
for metric in desc_func():
File "/Users/locust_exporter.py", line 35, in collect
metric.add_sample('locust_errors', value=err['occurences'], labels={'path':err['name'], 'method':err['method']})
KeyError: 'occurences'

FYI command used on terminal to run locust_exporter is [./locus_exporter 8000 localhost:8089] and also Locust is running on browser.

Please tell how to solve this issue

Code missing

Hey there,

we would love to use your code in our environments.
But sadly the code (eg. locust_exporter.py) is missing.

Could you please add it to the repository?
Otherwise it seems that this repo is not usable right now.

Thanks in advance & kind regards,
Martin

I am using the latest version of Prometheus_ When accessing the 8888 port on the client, an error was reported. What should I do

Start local_ Exporter
python3 locust_exporter.py 8888 127.0.0.1:8089
I am using the latest version of Prometheus_ When accessing the 8888 port on the client, an error was reported. What should I do
liufujia@zou python_protobuf % python3 locust_exporter.py 8888 127.0.0.1:8089 Connecting to locust on: 127.0.0.1:8089 Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/wsgiref/handlers.py", line 137, in run self.result = application(self.environ, self.start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/prometheus_client/exposition.py", line 128, in prometheus_app status, headers, output = _bake_output(registry, accept_header, accept_encoding_header, params, disable_compression) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/prometheus_client/exposition.py", line 104, in _bake_output output = encoder(registry) ^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/prometheus_client/exposition.py", line 228, in generate_latest output.append(sample_line(s)) ^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/prometheus_client/exposition.py", line 185, in sample_line ['{}="{}"'.format( File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/prometheus_client/exposition.py", line 186, in <listcomp> k, v.replace('\\', r'\\').replace('\n', r'\n').replace('"', r'\"')) ^^^^^^^^^ AttributeError: ("'NoneType' object has no attribute 'replace'", Metric(locust_requests_avg_content_length, Locust requests avg_content_length, gauge, , [Sample(name='locust_requests_avg_content_length', labels={'path': '/lb/v1/dashboard/project', 'method': 'GET'}, value=83.0, timestamp=None, exemplar=None), Sample(name='locust_requests_avg_content_length', labels={'path': 'Aggregated', 'method': None}, value=83.0, timestamp=None, exemplar=None)]))
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.