Recurring error in logs "error gathering metrics....was collected before with the same name and label values"
firecat53 opened this issue · comments
Describe the bug
Every 30 seconds in the logs I get the following error:
Aug 21 08:21:50 lvps podman-exporter_run[51905]: ts=2022-08-21T15:21:50.073Z caller=stdlib.go:105 level=error msg="error gathering metrics: 2 error(s) occurred:\n* [from Gatherer #2] collected metric \"podman_image_size\" { label:<name:\"id\" value:\"9c6f07244728\" > gauge:<value:5.830724e+06 > } was collected before with the same name and label values\n* [from Gatherer #2] collected metric \"podman_image_created_seconds\" { label:<name:\"id\" value:\"9c6f07244728\" > gauge:<value:1.660065593e+09 > } was collected before with the same name and label values"
Aug 21 08:21:50 lvps podman[51871]: ts=2022-08-21T15:21:50.073Z caller=stdlib.go:105 level=error msg="error gathering metrics: 2 error(s) occurred:\n* [from Gatherer #2] collected metric \"podman_image_size\" { label:<name:\"id\" value:\"9c6f07244728\" > gauge:<value:5.830724e+06 > } was collected before with the same name and label values\n* [from Gatherer #2] collected metric \"podman_image_created_seconds\" { label:<name:\"id\" value:\"9c6f07244728\" > gauge:<value:1.660065593e+09 > } was collected before with the same name and label values"
To Reproduce
Run prometheus-podman-exporter with --collector.enable-all
. Have two identical images with different tags:
[ansible@lvps ~]$ podman images | grep 9c6f072
docker.io/library/alpine 3.16 9c6f07244728 11 days ago 5.83 MB
docker.io/library/alpine latest 9c6f07244728 11 days ago 5.83 MB
Removing one of the images makes the error go away.
Expected behavior
I wouldn't expect error messages every 30 seconds in the logs for the above duplicate images. I believe it's not abnormal to have a latest
tag that matches a numbered tag for a given image.
Desktop (please complete the following information):
- OS CentOS Stream 9
- Podman Version 4.1.1
Thanks!
Hi @firecat53
Thanks for reaching, #27 will fix the issue.
Regards