monitoring: add repo cnt to dashboard (#48653)

it will be nice to show repo count in the dashboard

context:
https://sourcegraph.slack.com/archives/C03LCPCT3SP/p1677875955414389

cloud would like to compare repo count across all instances

## Test plan

<!-- All pull requests REQUIRE a test plan:
https://docs.sourcegraph.com/dev/background-information/testing_principles
-->

CI
This commit is contained in:
Michael Lin 2023-03-03 13:12:13 -08:00 committed by GitHub
parent befb8359ad
commit b24c577fc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 39 additions and 0 deletions

View File

@ -4992,6 +4992,29 @@ Query: `sum by (category)(increase(src_frontend_internal_request_duration_second
<br />
#### gitserver: src_gitserver_repo_count
<p class="subtitle">Number of repositories on gitserver</p>
This metric is only for informational purposes. It indicates the total number of repositories on gitserver.
It does not indicate any problems with the instance.
This panel has no related alerts.
To see this panel, visit `/-/debug/grafana/d/gitserver/gitserver?viewPanel=100090` on your Sourcegraph instance.
<sub>*Managed by the [Sourcegraph Repo Management team](https://handbook.sourcegraph.com/departments/engineering/teams/repo-management).*</sub>
<details>
<summary>Technical details</summary>
Query: `src_gitserver_repo_count`
</details>
<br />
### Git Server: Gitserver: Gitserver API (powered by internal/observation)
#### gitserver: gitserver_api_total

View File

@ -275,6 +275,22 @@ func GitServer() *monitoring.Dashboard {
},
shared.FrontendInternalAPIErrorResponses("gitserver", monitoring.ObservableOwnerRepoManagement).Observable(),
},
{
{
Name: "src_gitserver_repo_count",
Description: "number of repositories on gitserver",
Query: "src_gitserver_repo_count",
NoAlert: true,
Panel: monitoring.Panel().LegendFormat("repo count"),
Owner: monitoring.ObservableOwnerRepoManagement,
MultiInstance: true,
Interpretation: `
This metric is only for informational purposes. It indicates the total number of repositories on gitserver.
It does not indicate any problems with the instance.
`,
},
},
},
},
shared.GitServer.NewAPIGroup(containerName),