sourcegraph/monitoring/definitions/github_proxy.go
Thorsten Ball e6323ee6e4
Update o11y ownership from IAM/repo-mgmt to Source (#54368)
Does what it says in the title.

## Test plan

- Ran `sg generate`
2023-06-28 14:49:16 +01:00

44 lines
1.4 KiB
Go

package definitions
import (
"time"
"github.com/sourcegraph/sourcegraph/monitoring/definitions/shared"
"github.com/sourcegraph/sourcegraph/monitoring/monitoring"
)
func GitHubProxy() *monitoring.Dashboard {
const containerName = "github-proxy"
return &monitoring.Dashboard{
Name: "github-proxy",
Title: "GitHub Proxy",
Description: "Proxies all requests to github.com, keeping track of and managing rate limits.",
Groups: []monitoring.Group{
{
Title: "GitHub API monitoring",
Rows: []monitoring.Row{
{
{
Name: "github_proxy_waiting_requests",
Description: "number of requests waiting on the global mutex",
Query: `max(github_proxy_waiting_requests)`,
Warning: monitoring.Alert().GreaterOrEqual(100).For(5 * time.Minute),
Panel: monitoring.Panel().LegendFormat("requests waiting"),
Owner: monitoring.ObservableOwnerSource,
NextSteps: `
- **Check github-proxy logs for network connection issues.
- **Check github status.`,
},
},
},
},
shared.NewContainerMonitoringGroup(containerName, monitoring.ObservableOwnerDevOps, nil),
shared.NewProvisioningIndicatorsGroup(containerName, monitoring.ObservableOwnerDevOps, nil),
shared.NewGolangMonitoringGroup(containerName, monitoring.ObservableOwnerDevOps, nil),
shared.NewKubernetesMonitoringGroup(containerName, monitoring.ObservableOwnerDevOps, nil),
},
}
}