mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 17:51:57 +00:00
Update postgres monitoring with solutions (#17189)
Co-authored-by: Robert Lin <robert@bobheadxi.dev>
This commit is contained in:
parent
34c4095f5f
commit
57098f2cb3
@ -1975,6 +1975,7 @@ To learn more about Sourcegraph's alerting and how to set up alerts, see [our al
|
||||
|
||||
**Possible solutions:**
|
||||
|
||||
- Ensure the Postgres exporter can access the Postgres database. Also, check the Postgres exporter logs for errors.
|
||||
- **Refer to the [dashboards reference](./dashboards.md#postgres-pg-exporter-err)** for more help interpreting this alert and metric.
|
||||
- **Silence this alert:** If you are aware of this alert and want to silence notifications for it, add the following to your site configuration and set a reminder to re-evaluate the alert:
|
||||
|
||||
|
||||
@ -59,14 +59,16 @@ func Postgres() *monitoring.Container {
|
||||
Interpretation: "A non-zero value indicates the database is online.",
|
||||
},
|
||||
monitoring.Observable{
|
||||
Name: "pg_exporter_err",
|
||||
Description: "errors scraping postgres exporter",
|
||||
Owner: monitoring.ObservableOwnerCloud,
|
||||
Query: "pg_exporter_last_scrape_error",
|
||||
Panel: monitoring.Panel().LegendFormat("{{app}}"),
|
||||
Warning: monitoring.Alert().GreaterOrEqual(1).For(5 * time.Minute),
|
||||
PossibleSolutions: "none", // TODO(@daxmc99): how to debug this?
|
||||
Interpretation: "This value indicates issues retrieving metrics from postgres_exporter.",
|
||||
Name: "pg_exporter_err",
|
||||
Description: "errors scraping postgres exporter",
|
||||
Owner: monitoring.ObservableOwnerCloud,
|
||||
Query: "pg_exporter_last_scrape_error",
|
||||
Panel: monitoring.Panel().LegendFormat("{{app}}"),
|
||||
Warning: monitoring.Alert().GreaterOrEqual(1).For(5 * time.Minute),
|
||||
PossibleSolutions: `
|
||||
- Ensure the Postgres exporter can access the Postgres database. Also, check the Postgres exporter logs for errors.
|
||||
`,
|
||||
Interpretation: "This value indicates issues retrieving metrics from postgres_exporter.",
|
||||
},
|
||||
monitoring.Observable{
|
||||
Name: "migration_in_progress",
|
||||
|
||||
@ -7,6 +7,6 @@ To learn more about the generator, see the top-level program: https://github.com
|
||||
*/
|
||||
package monitoring
|
||||
|
||||
//go:generate go run github.com/princjef/gomarkdoc/cmd/gomarkdoc . -o README.md
|
||||
//go:generate go run github.com/princjef/gomarkdoc/cmd/gomarkdoc --repository.url "https://github.com/sourcegraph/sourcegraph" --repository.default-branch main -o README.md .
|
||||
|
||||
import _ "github.com/princjef/gomarkdoc" // Pin version of godoc-to-markdown generator
|
||||
|
||||
Loading…
Reference in New Issue
Block a user