Page MenuHomeDevCentral

Check GitHub account storage usage
ClosedPublic

Authored by dereckson on Sep 6 2024, 23:33.
Tags
None
Referenced Files
F23552806: D3432.id8912.diff
Thu, Feb 5, 09:26
F23539196: D3432.id8912.diff
Thu, Feb 5, 07:50
F23525376: D3432.id8912.diff
Thu, Feb 5, 06:10
F23506939: D3432.diff
Thu, Feb 5, 04:20
F23495129: D3432.id8856.diff
Thu, Feb 5, 03:18
F23417772: D3432.id8912.diff
Wed, Feb 4, 20:14
F23417760: D3432.id8858.diff
Wed, Feb 4, 20:14
Unknown Object (File)
Tue, Feb 3, 11:38
Subscribers
None

Details

Summary

Shared storage for packages or git-lfs is 10 GB per month.

This check queries the GitHub API, using the REST API endpoints for billing,
and raises a warning if we're using more than 8 Go (80%).

This requires authentication. GitHub Token is stored in Vault,
this check uses a new approle devised for monitoring checks.

Reference: https://docs.github.com/en/rest/billing/billing

Test Plan
  • credentials provisioned on WindRiver
  • run the check script, get 0 exit code

Event Timeline

dereckson updated this revision to Diff 8857.

black

This revision is now accepted and ready to land.Sep 11 2024, 08:24
roles/monitoring/checks/files/check-github-storage.py
32

That file should be provisioned by Salt too.

This revision was automatically updated to reflect the committed changes.