forked from sourcegraph/sourcegraph-public-snapshot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprecise_code_intel_api_server.go
43 lines (42 loc) · 1.7 KB
/
precise_code_intel_api_server.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package main
func PreciseCodeIntelAPIServer() *Container {
return &Container{
Name: "precise-code-intel-api-server",
Title: "Precise Code Intel API Server",
Description: "Serves precise code intelligence requests.",
Groups: []Group{
{
Title: "Container monitoring (not available on k8s or server)",
Hidden: true,
Rows: []Row{
{
{
Name: "container_restarts",
Description: "container restarts every 5m by instance (not available on k8s or server)",
Query: `increase(cadvisor_container_restart_count{name=~".*precise-code-intel-api-server.*"}[5m])`,
DataMayNotExist: true,
Warning: Alert{GreaterOrEqual: 1},
PanelOptions: PanelOptions().LegendFormat("{{name}}"),
},
{
Name: "container_memory_usage",
Description: "container memory usage by instance (not available on k8s or server)",
Query: `cadvisor_container_memory_usage_percentage_total{name=~".*precise-code-intel-api-server.*"}`,
DataMayNotExist: true,
Warning: Alert{GreaterOrEqual: 90},
PanelOptions: PanelOptions().LegendFormat("{{name}}").Unit(Percentage),
},
{
Name: "container_cpu_usage",
Description: "container cpu usage total (5m average) across all cores by instance (not available on k8s or server)",
Query: `cadvisor_container_cpu_usage_percentage_total{name=~".*precise-code-intel-api-server.*"}`,
DataMayNotExist: true,
Warning: Alert{GreaterOrEqual: 90},
PanelOptions: PanelOptions().LegendFormat("{{name}}").Unit(Percentage),
},
},
},
},
},
}
}