locust_exporter
locust_exporter copied to clipboard
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)]))