MSBA-299 · Lesson 8 of 12 · 23 min
Domain review: monitoring and optimizing usage
▶ Video coming soon A video version of this lesson is on the way.
The baseline had been unkind to Priya on this domain, and she had said so to Lena Fischer over lunch at Tidewater. Lena, who was deep in her own GH-200 preparation, offered a swap: Priya would quiz her on runner labels if Lena would quiz Priya on audit log queries. On Friday, November 20, Wren gave the domain its own session and brought Lorcan Adeyemi-Brooke from Skerry's finance team for twenty minutes. "Administrators think usage is a finance problem," Wren said. "Finance thinks it is an engineering problem. The exam thinks you should be able to read the report and say what to change."
Domain 5, Monitor and optimize GitHub usage, is new in the July 2026 outline and weighted 10 to 15 percent. Its two objective groups are monitoring enterprise usage and activity, and optimizing cost and performance. The first asks you to analyze audit logs and API usage, to differentiate administrator tasks from GitHub Support tasks and generate diagnostics, and to assess usage patterns to identify adoption, activity and unused features. The second asks you to interpret usage reports for consumption-based products and recommend licence and resource optimization strategies. MSBA-290 lessons 9 and 10 and the scorecard in MSBA-291 lesson 12 taught the material.
Analyzing audit logs
Lesson 5 covered audit logging as a control. Domain 5 asks you to use it as a source of answers. The audit log search accepts qualifiers that combine: action for the event name, actor for who did it, org and repo for where, created for when, and operation for the kind of change, such as create, modify or remove. Event names are grouped by category, so a search for a category prefix finds every event in it. The same search syntax works in the web interface and through the REST API, which returns events as JSON for scripts and dashboards.
| Question | Search |
|---|---|
| Who added members to skerry-stores in November? | action:org.add_member org:skerry-stores created:2026-11-01..2026-11-30 |
| What did one owner change last week? | actor:wcastellanos_skr created:>=2026-11-13 |
| Which repositories changed visibility? | action:repo.access |
| Every change to rulesets in one organization | action:repository_ruleset org:skerry |
| All removals of anything in a date range | operation:remove created:2026-11-01..2026-11-15 |
# Ruleset changes across the enterprise in November, as JSON lines
gh api --paginate \
"/enterprises/skerry/audit-log?phrase=action:repository_ruleset+created:2026-11-01..2026-11-30" \
--jq '.[] | [.["@timestamp"], .actor, .action, .org] | @tsv'Two limits shape these questions. Built-in retention is 180 days for most events and seven days for Git events, so questions about older activity, or about clones and pushes more than a week ago, need an audit log stream that was already running. And some events must be switched on: API request events are off until an owner opts in, after which the log records API calls with details such as the credential type used, and source IP addresses appear only if the owner has chosen to disclose them.
Analyzing API usage
API usage questions usually ask which integrations are calling the API, as whom and how often. With API request events enabled, an administrator can see whether calls come from personal access tokens, GitHub Apps, OAuth apps or the GITHUB_TOKEN, and which accounts own them. Skerry used this to find automation that still ran as people: 31 scripts still called the API with personal tokens a month after classic tokens were restricted, and each became a GitHub App or was retired. Rate limit headers, covered in lesson 6, are the integration's own view of the same usage.
Worked problem
Finding the noisy integration
Developers in the skerry organization report intermittent secondary rate limit errors every weekday at 09:00. The platform team has API request events enabled and streamed to its SIEM. How should it find the cause?
Show solution
- Filter the streamed API request events to weekdays between 08:55 and 09:10.
- Group by credential type and actor to find which app or token makes most requests in that window.
- Look at the request pattern: many concurrent calls or rapid content creation trips secondary limits even when the hourly allowance is not used up.
- Ask the owner of that integration to limit concurrency and honour retry-after, or move it to a GitHub App if it runs as a person.
Answer: The API request events identify the integration by credential and actor; the fix is to change how that integration calls the API, not to raise a limit, which administrators cannot do.
Administrator or GitHub Support, again
The second bullet repeats a theme from domain 2 from a monitoring angle: when monitoring shows a problem, is it something the administrator can investigate and fix, or something to hand to GitHub Support with evidence? Slow pages for every user in every organization, failed webhooks with GitHub-side errors, or an Enterprise Server appliance that crashes after an upgrade need Support, with a support bundle or diagnostics file for Server and request IDs and timestamps for Cloud. A spike in Actions minutes, a burst of failed sign-ins from one country, or an integration hitting rate limits are the administrator's to investigate. Lesson 4 covered the bundle commands; on the exam, remember that diagnostics and bundles are Server artefacts.
Adoption, activity and unused features
The third bullet asks you to assess usage patterns to identify adoption, activity and unused features. The sources are the licence list and the dormant users report for people; organization insights for Actions usage and performance; security overview for which repositories have which security features enabled and how alerts are handled; and Copilot usage metrics where Copilot is in use. The questions behind them are simple. Who holds a licence and has not used it? Which teams use Actions heavily and which not at all? Which paid features are enabled where nobody acts on their output?
| Signal | Source | Possible action |
|---|---|---|
| Licensed users with no recent activity | Dormant users report and licence list | Confirm with managers; remove in a personal account enterprise, or remove the identity provider assignment with managed users |
| Code Security enabled on archived or inactive repositories | Security overview and the active committer report | Detach the configuration; inactive repositories add little risk and few committers |
| Large runners used for small jobs | Actions usage metrics by runner type | Move those jobs to standard runners |
| Copilot seats with no use | Copilot usage metrics | Reassign or remove seats |
| Secret scanning alerts never triaged in some organizations | Security overview | Assign owners through custom properties and routing |
Skerry's scorecard in November showed 47 inactive licences out of 1,180. Not all were waste: some belonged to people on leave and a few to new starters provisioned before their first day. Lorcan's rule, which Priya copied into her notes, was to treat a dormant account as a question for a manager rather than an automatic removal, and to review the list monthly so it never grew large enough to matter.
Usage reports for consumption-based products
The second objective group begins with interpreting usage reports. GitHub's billing pages show usage and cost for metered products by month, and a detailed usage report can be downloaded with one line per product, item, organization, repository and day, including the quantity, the unit and the cost. Products in the report include Actions minutes by runner type and operating system, Actions and Packages storage, Packages data transfer, Codespaces compute and storage, Git LFS, Secret Protection and Code Security active committers, and Copilot. Cost centres group organizations, repositories or users so that usage can be charged back, and since July 2026 cost centres can carry per-user budgets.
Worked problem
Reading the October spike
Skerry's October usage report showed larger Linux runner minutes three times higher than in September, while standard runner minutes were flat. The report breaks usage down by repository and day. What should the platform team do?
Show solution
- Sort the larger runner lines by repository: one data pipeline repository accounted for most of the increase.
- Look at the days: the increase started on the day a nightly matrix was widened from 4 to 24 combinations, each on a 16-core runner.
- Ask whether every combination needs the larger runner and the nightly schedule; most did not.
- Agree a change with the team and set a budget alert on larger runner minutes for that cost centre.
Answer: Trace the spike to the repository and workflow, cut the matrix and move most combinations to standard runners, and add a budget alert so the next spike is seen within days, not at month end.
Optimization strategies
The last bullet asks you to recommend licence and resource optimization strategies. Licence strategies remove what is not used: dormant accounts, outside collaborators whose projects have ended, service accounts replaced by GitHub Apps, and Server users who should be synchronized with Cloud so they count once. Security product strategies enable Secret Protection and Code Security where the risk is, remembering that each active committer is counted once however many enabled repositories they touch. Resource strategies make Actions and Codespaces cheaper without making developers slower.
| Resource | Strategy |
|---|---|
| Actions minutes | Use path filters and concurrency groups that cancel superseded runs; trim matrices; set job timeouts; choose larger runners only where they save time |
| Actions storage | Shorten artifact and log retention where long retention is not needed; clean up caches |
| Codespaces | Restrict machine types by policy, shorten idle timeouts and retention, and use prebuilds only where they pay off |
| Packages | Delete old versions with a retention routine; keep large build outputs out of package storage |
| All metered products | Set budgets with alerts or limits at enterprise, organization, repository or cost centre level |
Prices change, which is why the exam asks for strategies rather than figures. GitHub cut hosted runner prices from January 1, 2026, and postponed a proposed charge for self-hosted runner minutes without a new date; an administrator recommending self-hosted runners purely to save money should check current pricing first and count the cost of running the machines.
Budgets in practice
A budget sets a spending limit for a metered product at the enterprise, organization, repository or cost centre level, with alerts as spending approaches it. Depending on the product and the setting chosen, reaching the budget either stops further paid usage or only sends alerts. A hard stop is safe for products where a pause is acceptable, such as Codespaces for a team that can wait a day; an alert-only budget suits Actions minutes on a release pipeline, where stopping builds would cost more than the overspend. Billing managers can manage budgets without any access to code, which is why Skerry gave the role to Lorcan and one colleague in finance.
| Situation | Budget choice | Reason |
|---|---|---|
| Codespaces for a pilot team | Organization budget that stops usage | A pause is acceptable; an overspend is not |
| Actions minutes for the release pipeline | Cost centre budget with alerts only | Stopping releases would cost more than the extra minutes |
| Larger runner minutes after the October spike | Repository budget with an alert at a set share of the limit | Early warning on the workflow that caused the spike |
| A contractor group with Copilot | Per-user budgets in their cost centre | Limits each person's metered use without affecting others |
Worked problem
Recommending a licence clean-up
A personal account enterprise has 1,240 consumed licences. The licence list and dormant users report show 61 dormant members, of whom managers confirm 44 can be removed; 18 outside collaborators on private repositories whose contracts ended in the summer; and 9 service accounts whose scripts can move to GitHub Apps. What saving can the administrator recommend, and what should happen first?
Show solution
- Confirmed dormant members: 44 licences.
- Ended outside collaborators: 18 licences.
- Service accounts replaced by apps: 9 licences, once the apps are in place and tested.
- Total: 44 + 18 + 9 = 71, leaving 1,169 consumed licences.
Answer: About 71 licences, roughly 6 percent. Remove the 44 and the 18 now; retire the 9 service accounts only after their automation runs as GitHub Apps, or the scripts will fail.
Lorcan's last point to Priya was about timing. Under usage-based billing, someone removed partway through a month still counts for that month and drops off the next bill. A clean-up finished on the last working day of November keeps those licences off the December bill; the same clean-up run on December 2 still pays for them in December. The exam is unlikely to ask that directly, but it is the kind of reasoning the optimization bullet is looking for.
Common mistakes
MistakeSearching the built-in audit log for clones from last month.
InsteadGit events are kept seven days; only a stream that was already running has them.
MistakeExpecting API request events to be recorded by default.
InsteadAn owner must opt in before API requests appear in the audit log.
MistakeRemoving every dormant account automatically.
InsteadConfirm with managers; some belong to people on leave or not yet started.
MistakeReading a usage report only at month end.
InsteadSet budgets and alerts so spikes are seen within days.
MistakeMoving to self-hosted runners only to save money.
InsteadCompare current hosted prices with the full cost of running machines.
Summary and key terms
- Audit log searches combine action, actor, org, repo, created and operation qualifiers, in the web interface or the REST API.
- API request events must be enabled; they show which credentials and integrations call the API.
- Dormant users, Actions insights, security overview and Copilot metrics show adoption and unused features.
- Usage reports break metered cost down by product, runner type, organization, repository and day; cost centres support chargeback and per-user budgets.
- Optimize by removing unused licences, enabling security products where risk is, and tuning runners, retention, Codespaces and budgets.
- Audit log qualifier
- A search term such as action, actor, org, repo, created or operation that narrows audit events.
- API request events
- Optional audit log events recording API calls and the credential types used.
- Dormant user
- A licensed account with no recent activity.
- Usage report
- A detailed breakdown of metered product usage and cost.
- Cost centre
- A grouping of organizations, repositories or users used to charge back usage.
- Budget
- A spending limit with alerts, or a hard stop, for a metered product at a chosen level.
Practice problems
Work each problem on paper first, then reveal the answer to check.
Which audit log qualifier finds events by the kind of change?
Show answer
operation, with values such as create, modify and remove.
Why might an investigation of clones from three weeks ago find nothing in the built-in audit log?
Show answer
Git events are kept only seven days.
Name two ways to reduce Actions minutes without slowing developers.
Show answer
Any two of: path filters, cancelling superseded runs with concurrency groups, trimming matrices, timeouts, choosing standard runners where larger ones do not save time.
Lesson quiz · 5 questions
Score 60% or more to complete this lesson.
Create a free account to save your progress, take quizzes and earn a certificate.