Skip to content

Image Registry Metrics Exporter provides metrics about creation and uploading time of images on OCI registry.

License

Notifications You must be signed in to change notification settings

radiofrance/image-registry-metrics-exporter

Repository files navigation

irme logo

image-registry-metrics-exporter - Monitor your OCI registry


About

Image Registry Metrics Exporter (IRME) provides metrics about creation and upload time of your OCI images on a compatible registry.

At this time, we support the following registries:

Install

Go

go install github.com/radiofrance/image-registry-metrics-exporter/cmd/image-registry-metrics-exporter@latest
image-registry-metrics-exporter ...

Docker

docker pull ghcr.io/radiofrance/image-registry-metrics-exporter
docker run --publish 8080 ghcr.io/radiofrance/image-registry-metrics-exporter

Helm

helm repo add radiofrance-irme https://radiofrance.github.io/image-registry-metrics-exporter
helm upgrade --install image-registry-metrics-exporter radiofrance-irme/image-registry-metrics-exporter \
  --namespace image-registry-metrics-exporter \
  --create-namespace \
  --wait
helm test image-registry-metrics-exporter --namespace image-registry-metrics-exporter

Usage

Configuration

A configuration file is required to run IRME. It defines when and where it should analyze your OCI images.
This configuration file can be located in /etc/irme/config.yaml, $HOME/.irme/config.yaml or in your current directory (./config.yaml).

cron: <cron>                    # cron expression used to schedule when the registries will be scanned
registries:                     # list all registries to be scanned
  - provider: <provider name>   # defines which provider to use for this registry
    domain: <domain>            # registry entrypoint
    imagesFilters:              # regular expression to use to filter which repositories or images should be scanned
      - <filter>
    tagsFilters:                # same as `imagesFilters` but for tags
      - <filter>
    rateLimitAPI: <rps_limit>   # limit the number of request per seconds on the registry
    maxConcurrentJobs: <limit>  # set the number of images processed in parallel

For exemple, if we want to scan this project every monday at 8:00:

cron: 0 8 * * 1
registries:
  - provider: github # NOTE: this provider is currently not available
    domain: ghcr.io
    imagesFilters:
      - radiofrance/image-registry-metrics-exporter
    tagsFilters:
      - .*
    rateLimitAPI: 5
    maxConcurrentJobs: 5

Google Container Registry authentication

To use IRME with the GCR provider (google), you need to create a service account with following roles:

  • roles/browser: allow IRME to list all images available on repositories.
  • roles/storage.objectViewer: allow IRME to get information about the images themselves

NOTE: If you use IRME outside Helm, the credentials should be exported through the environment variable GOOGLE_APPLICATION_CREDENTIALS or configured on your local docker configuration file.

Exported metrics

Metric name Description Labels
image_registry_exporter_tag_build_time Build timestamp of an image [image], [tag]
image_registry_exporter_tag_uploaded_time Upload timestamp of an image [image], [tag]

Support

Reach out to the maintainer at one of the following places:

Contributing

First off, thanks for taking the time to contribute! Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make will benefit everybody else and are greatly appreciated.

Please read our contribution guidelines, and thank you for being involved!

Security

image-registry-metrics-exporter follows good practices of security, but 100% security cannot be assured. image-registry-metrics-exporter is provided "as is" without any warranty. Use at your own risk.

For more information and to report security issues, please refer to our security documentation.

License

This project is licensed under the CeCILL License 2.1.

See LICENSE for more information.

Acknowledgements

Thanks for these awesome resources and projects that were used during development:

About

Image Registry Metrics Exporter provides metrics about creation and uploading time of images on OCI registry.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages