Page MenuHomeDevCentral

Check GitHub account storage usage
AcceptedPublic

Authored by dereckson on Fri, Sep 6, 23:33.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Sep 17, 04:26
Unknown Object (File)
Sun, Sep 15, 19:00
Unknown Object (File)
Sat, Sep 14, 19:42
Unknown Object (File)
Sat, Sep 14, 19:38
Unknown Object (File)
Sat, Sep 14, 19:15
Unknown Object (File)
Sat, Sep 14, 18:01
Unknown Object (File)
Sat, Sep 14, 09:33
Unknown Object (File)
Sat, Sep 14, 06:47
Subscribers
None

Details

Reviewers
DorianWinty
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.Wed, Sep 11, 08:24
roles/monitoring/checks/files/check-github-storage.py
31

That file should be provisioned by Salt too.