appuio / appuio-cloud-reporting

Reporting for APPUiO Cloud
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

Add `tenantmapping` subcommand to map tenants (source,target) from a prometheus metric #121

Closed bastjan closed 1 year ago

bastjan commented 1 year ago

The new command should be able to map a time range (tenantmapping --begin="2023-02-24T05:20:26+01:00" --repeat-until="2023-02-24T08:20:26+01:00") from Prometheus control_api_organization_billing_entity_ref into the tenants database.

It tries to handle updated to the timerange gracefully be ending the 'last' range and appending a new one on change.

The new one has an upper bound to infinity or the next higher timerange with the same combination of source and target.

Checklist