Github Exporter

The github_exporter_config block configures the github_exporter integration, which is an embedded version of github_exporter. This allows for the collection of metrics from the github api.

We strongly recommend that you configure a separate authentication token for the Agent, and give it only the strictly mandatory security privileges necessary for monitoring your repositories, as per the official documentation. We also recommend that you use api_token_file parameter, to avoid setting the authentication token directly on the Agent config file.

Full reference of options:

  1. # Enables the github_exporter integration, allowing the Agent to automatically
  2. # collect metrics for the specified github objects.
  3. [enabled: <boolean> | default = false]
  4. # Sets an explicit value for the instance label when the integration is
  5. # self-scraped. Overrides inferred values.
  6. #
  7. # The default value for this integration is inferred from the hostname portion
  8. # of api_url.
  9. [instance: <string>]
  10. # Automatically collect metrics from this integration. If disabled,
  11. # the github_exporter integration will be run but not scraped and thus not
  12. # remote-written. Metrics for the integration will be exposed at
  13. # /integrations/github_exporter/metrics and can be scraped by an external
  14. # process.
  15. [scrape_integration: <boolean> | default = <integrations_config.scrape_integrations>]
  16. # How often should the metrics be collected? Defaults to
  17. # prometheus.global.scrape_interval.
  18. [scrape_interval: <duration> | default = <global_config.scrape_interval>]
  19. # The timeout before considering the scrape a failure. Defaults to
  20. # prometheus.global.scrape_timeout.
  21. [scrape_timeout: <duration> | default = <global_config.scrape_timeout>]
  22. # Allows for relabeling labels on the target.
  23. relabel_configs:
  24. [- <relabel_config> ... ]
  25. # Relabel metrics coming from the integration, allowing to drop series
  26. # from the integration that you don't care about.
  27. metric_relabel_configs:
  28. [ - <relabel_config> ... ]
  29. # How frequent to truncate the WAL for this integration.
  30. [wal_truncate_frequency: <duration> | default = "60m"]
  31. #
  32. # Exporter-specific configuration options
  33. #
  34. # The full URI of the github API.
  35. [api_url: <string> | default = "https://api.github.com"]
  36. # A list of github repositories for which to collect metrics.
  37. repositories:
  38. [ - <string> ]
  39. # A list of github organizations for which to collect metrics.
  40. organizations:
  41. [ - <string> ]
  42. # A list of github users for which to collect metrics.
  43. users:
  44. [ - <string> ]
  45. # A github authentication token that allows the API to be queried more often.
  46. # Optional, but recommended.
  47. [api_token: <string>]
  48. # A path to a file containing a github authentication token that allows the
  49. # API to be queried more often. If supplied, this supercedes `api_token`
  50. # Optional, but recommended.
  51. [api_token_file: <string>]