Page MenuHomeDevCentral

Check GitHub account storage usage
ClosedPublic

Authored by dereckson on Sep 6 2024, 23:33.
Tags
None
Referenced Files
F12487928: D3432.id8858.diff
Sat, Nov 8, 03:20
F12487762: D3432.id8912.diff
Sat, Nov 8, 03:00
F12484967: D3432.id8857.diff
Sat, Nov 8, 00:24
F12465491: D3432.id8856.diff
Fri, Nov 7, 09:18
Unknown Object (File)
Thu, Nov 6, 23:11
Unknown Object (File)
Thu, Nov 6, 23:08
Unknown Object (File)
Thu, Nov 6, 20:32
Unknown Object (File)
Thu, Nov 6, 17:21
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 Passed
Unit
No Test Coverage
Branch
monitoring-github
Build Status
Buildable 5469
Build 5750: arc lint + arc unit

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
31

That file should be provisioned by Salt too.

This revision was automatically updated to reflect the committed changes.