Closed busma13 closed 2 months ago
Uh, I completely forgot about this ...
https://github.com/terascope/teraslice/commit/49d356cf7dc6583c518f98a4500355c53e173e9f
curl -H "Accept: application/openmetrics-text;" -sS http://localhost:5678/cluster/stats
# TYPE teraslice_slices_processed counter
teraslice_slices_processed{cluster="teraslice-dev1"} 2
# TYPE teraslice_slices_failed counter
teraslice_slices_failed{cluster="teraslice-dev1"} 0
# TYPE teraslice_slices_queued counter
teraslice_slices_queued{cluster="teraslice-dev1"} 0
# TYPE teraslice_workers_joined counter
teraslice_workers_joined{cluster="teraslice-dev1"} 1
# TYPE teraslice_workers_disconnected counter
teraslice_workers_disconnected{cluster="teraslice-dev1"} 0
# TYPE teraslice_workers_reconnected counter
teraslice_workers_reconnected{cluster="teraslice-dev1"} 0
compared to:
curl -sS http://localhost:5678/cluster/stats
{
"controllers": {
"processed": 2,
"failed": 0,
"queued": 0,
"job_duration": 3,
"workers_joined": 1,
"workers_disconnected": 0,
"workers_reconnected": 0
},
"slicer": {
"processed": 2,
"failed": 0,
"queued": 0,
"job_duration": 3,
"workers_joined": 1,
"workers_disconnected": 0,
"workers_reconnected": 0
}
}
We should document the existence of this capability and we should really consider expanding the labels coming out of it or consolidating these metrics in with the new main built in exporter.
teraslice_slices_processed{cluster="teraslice-dev1"} 2
curl localhost:5678
{
"arch": "arm64",
"clustering_type": "kubernetes",
"name": "ts-dev1",
"node_version": "v18.20.4",
"platform": "linux",
"teraslice_version": "v2.3.0"
}
cluster === teraslice.name from the terafoundation, correct? Which is what is returned in the request above.
cluster === teraslice.name from the terafoundation, correct? Which is what is returned in the request above.
Correct
We should document the existence of this capability
I added an example in the endpoints-json.md file
This PR makes the following changes:
PromMetrics
class needs to reset it's list of metrics on each scrape. If it doesn't do this, then all the executions are listed, not just the active ones.resetMetrics()
functions were added toPromMetrics
andExporter
to reset theprom-client
register.prom_metrics_display_url
field to terafoundation. This value will be used as theurl
default label added to all prom metrics. Defaults to an empty string, making it more obvious that this field is missing from the config.ref: #3743