Skip to content

move url cluster to name mapping to a config file. #182

@naved001

Description

@naved001

URL_CLUSTER_NAME_MAPPING = {
"https://thanos-querier-openshift-monitoring.apps.shift.nerc.mghpcc.org": "ocp-prod",
"https://thanos-querier-openshift-monitoring.apps.ocp-test.nerc.mghpcc.org": "ocp-test",
"https://thanos-querier-openshift-monitoring.apps.edu.nerc.mghpcc.org": "academic",
"https://thanos-querier-openshift-monitoring.apps.barcelona.nerc.mghpcc.org": "barcelona",
}

Right now we use the URL we query the metrics from to map to a cluster name. A better solution would be to use cluster ID which is part of the metrics we contain. This means that the URL could be either thanos or prometheus and we would still get the same cluster. We could even query from observeablity and have no problems mapping to a known name.

This should also be read from a config file instead of being hardcoded.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions