Metadata-Version: 2.1
Name: resoto-plugin-dockerhub
Version: 3.3.0
Summary: Resoto Docker Hub Collector Plugin
Home-page: https://github.com/someengineering/resoto/tree/main/plugins/dockerhub
License: Apache 2.0
Keywords: cloud security
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: System Administrators
Classifier: Intended Audience :: Information Technology
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3.9
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: Unix
Classifier: Environment :: Console
Classifier: Natural Language :: English
Classifier: Topic :: Security
Classifier: Topic :: Utilities
Description-Content-Type: text/markdown

# resoto-plugin-dockerhub
Docker Hub Collector Plugin for Resoto

This collector plugin is used to collect data from Docker Hub. It is used internally at Some Engineering to create metrics about image downloads.

To export the number of image pulls add the following config to `resoto.metrics`
```
resotometrics:
  [...]
  metrics:
    dockerhub_downloads_total:
      # Metric help text
      help: 'Docker Hub downloads'
      # Aggregation search to run
      search: 'aggregate(/ancestors.cloud.reported.name as cloud, /ancestors.account.reported.name as namespace, id as repository: sum(pull_count) as dockerhub_downloads_total): is(dockerhub_repository)'
      # Type of metric (gauge or counter)
      type: 'counter'
```
