Skip to content

Commit

Permalink
Fix aggregation rules counting docker.io images (#964)
Browse files Browse the repository at this point in the history
* Fix aggregation rules counting docker.io images

* Update CHANGELOG.md
  • Loading branch information
marians authored Nov 20, 2023
1 parent b1ace15 commit a0008e3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- Fix counting of docker.io images by using the `image_spec` label instead of `image`:
- `aggregation:docker:containers_using_dockerhub_image`
- `aggregation:docker:containers_using_dockerhub_image_relative`

## [2.142.1] - 2023-11-20

### Changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ spec:
rules:
- expr: sum(engine_daemon_image_actions_seconds_count) by (cluster_id, cluster_type, action)
record: aggregation:docker:action_count
- expr: sum(kube_pod_container_info{image=~"docker\\.io/.*"} or kube_pod_init_container_info{image=~"docker\\.io/.*"})
- expr: sum(kube_pod_container_info{image_spec=~"docker\\.io/.*"} or kube_pod_init_container_info{image_spec=~"docker\\.io/.*"})
record: aggregation:docker:containers_using_dockerhub_image
- expr: sum(kube_pod_container_info{image=~"docker\\.io/.*"} or kube_pod_init_container_info{image=~"docker\\.io/.*"}) / sum(kube_pod_container_info{} or kube_pod_init_container_info{})
- expr: sum(kube_pod_container_info{image_spec=~"docker\\.io/.*"} or kube_pod_init_container_info{image_spec=~"docker\\.io/.*"}) / sum(kube_pod_container_info{} or kube_pod_init_container_info{})
record: aggregation:docker:containers_using_dockerhub_image_relative
- name: certificates.grafana-cloud.recording
rules:
Expand Down

0 comments on commit a0008e3

Please sign in to comment.