Update postgres monitoring with solutions (#17189)

Co-authored-by: Robert Lin <robert@bobheadxi.dev>
This commit is contained in:
Dax McDonald 2021-01-14 18:50:05 -07:00 committed by GitHub
parent 34c4095f5f
commit 57098f2cb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 9 deletions

View File

@ -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:

View File

@ -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",

View File

@ -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