Page MenuHomeDevCentral

Check GitHub account storage usage
ClosedPublic

Authored by dereckson on Sep 6 2024, 23:33.
Tags
None
Referenced Files
F9572412: D3432.diff
Sun, Jun 8, 07:05
Unknown Object (File)
Sat, Jun 7, 06:25
Unknown Object (File)
Wed, Jun 4, 17:03
Unknown Object (File)
Sun, Jun 1, 21:32
Unknown Object (File)
Mon, May 26, 02:57
Unknown Object (File)
Sun, May 25, 22:03
Unknown Object (File)
Fri, May 23, 06:08
Unknown Object (File)
Tue, May 20, 12:49
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

Diff Detail

Repository
rOPS Nasqueron Operations
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.