Skip to content

Allow setting the frequency with which we collect metrics #145

@naved001

Description

@naved001

The prometheus client defaults to a 15 minute interval for collecting metrics.

https://github.com/CCI-MOC/openshift-usage-scripts/blob/main/openshift_metrics/prometheus_client.py#L14

We should make this configurable and expose this option to the user.

Where this gets tricky is that, when the metrics are processed we need to know this interval to correctly calculate the duration (otherwise the duration will be off by whatever the interval is) and also to check if a pod was stopped in between.

https://github.com/CCI-MOC/openshift-usage-scripts/blob/main/openshift_metrics/metrics_processor.py#L18

The metrics processor need to know the frequency at which the metrics were collected (perhaps we could add some metadata to the metrics dump and then read it later) before it can process those.

Metadata

Metadata

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