This is the python client for metrics accumulator
Project description

Metrics Accumulator
metrics-accumulator-client
This is the official Python client for metric accumulator.
Get Started
Start an instance of metric-accumulator
docker run \
-p 8080:8080 \
bpoole6/metrics-accumulator
It is highly advised that you disable the created metrics. The Metrics accumulator doesn't handle the created metrics at this time.
from prometheus_client import metrics
metrics.disable_created_metrics()
Create main.js file
from Client import Client, strip_forward_slash
from prometheus_client import exposition, Counter,Gauge, CollectorRegistry, metrics
metrics.disable_created_metrics()
registry = CollectorRegistry()
c = Counter("hello_total", "dock", labelnames=['application'], registry=registry)
c.labels(["app"]).inc()
g = Gauge("man", "dock", labelnames=['application'], registry=registry)
g.labels(["app"]).inc()
client = Client("http://localhost:8080", "0d98f65f-074b-4d56-b834-576e15a3bfa5")
client.update_metrics("default", registry)
print(client.get_metric_group("default").content.decode())
print(client.reload_configurations().status_code)
print(client.reset_metric_group("default").status_code)
print(client.service_discovery().status_code)
print(client.current_configurations().status_code)
Please see metric accumulator for official documentation.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file metrics_accumulator_client-1.1.5.tar.gz.
File metadata
- Download URL: metrics_accumulator_client-1.1.5.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52ce03217e4132384b51d568516c7b9ae2414e1e81531d14fbc828a73ef8e157
|
|
| MD5 |
190e729141e3e8b343007d2a530c45a4
|
|
| BLAKE2b-256 |
406e0252ff474d1b2a7d7772bbb1baee7042537c565fc6184ef51dddb300acd0
|
File details
Details for the file metrics_accumulator_client-1.1.5-py3-none-any.whl.
File metadata
- Download URL: metrics_accumulator_client-1.1.5-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3a3550b550b8295f96178e3275840bff6a14c62eab05113f51585950f6c3582
|
|
| MD5 |
1ce8242053d67dd0f5d1a1f45891749e
|
|
| BLAKE2b-256 |
8ac946215af6a4cf05fc602524791151e046a8bb3cee5745b933fe71e15709f3
|