mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 17:51:57 +00:00
monitoring: improve solutions formatting, add team information (#14878)
This commit is contained in:
parent
3818d5806d
commit
0b47ecd167
File diff suppressed because it is too large
Load Diff
@ -23,6 +23,12 @@ This structure is inspired by the [Divio documentation system](https://documenta
|
||||
|
||||
You can preview the documentation site at http://localhost:5080 when running Sourcegraph in [local development](../getting-started/index.md) (using `dev/start.sh` or `enterprise/dev/start.sh`). It uses content, templates, and assets from the local disk. There is no caching or background build process, so you'll see all changes reflected immediately after you reload the page in your browser.
|
||||
|
||||
You can also run the docsite on its own with the following command:
|
||||
|
||||
```sh
|
||||
./dev/docsite.sh -config doc/docsite.json serve -http=localhost:5080
|
||||
```
|
||||
|
||||
## Linking to documentation in-product
|
||||
|
||||
In-product documentation links should point to `/help/PATH` instead of using an absolute URL of the form https://docs.sourcegraph.com/PATH. This ensures they link to the documentation for the current product version. There is a redirect (when using either `<a>` or react-router `<Link>`) from `/help/PATH` to the versioned docs.sourcegraph.com URL (https://docs.sourcegraph.com/@VERSION/PATH).
|
||||
|
||||
@ -838,8 +838,10 @@ To learn more about Sourcegraph's alerting, see [our alerting documentation](htt
|
||||
for _, r := range g.Rows {
|
||||
for _, o := range r {
|
||||
fmt.Fprintf(&b, "## %s: %s\n\n", c.Name, o.Name)
|
||||
fmt.Fprintf(&b, `<p class="subtitle">%s: %s</p>`, o.Owner, o.Description)
|
||||
|
||||
fmt.Fprintf(&b, "**Descriptions:**\n")
|
||||
// Render descriptions of various levels of this alert
|
||||
fmt.Fprintf(&b, "**Descriptions:**\n\n")
|
||||
var prometheusAlertNames []string
|
||||
for _, alert := range []struct {
|
||||
level string
|
||||
@ -851,12 +853,13 @@ To learn more about Sourcegraph's alerting, see [our alerting documentation](htt
|
||||
if alert.threshold.isEmpty() {
|
||||
continue
|
||||
}
|
||||
fmt.Fprintf(&b, "\n- _%s_\n", c.alertDescription(o, alert.threshold))
|
||||
fmt.Fprintf(&b, "- _%s_\n", c.alertDescription(o, alert.threshold))
|
||||
prometheusAlertNames = append(prometheusAlertNames,
|
||||
fmt.Sprintf(" \"%s\"", prometheusAlertName(alert.level, c.Name, o.Name)))
|
||||
}
|
||||
fmt.Fprint(&b, "\n")
|
||||
|
||||
// Render solutions for dealing with this alert
|
||||
fmt.Fprintf(&b, "**Possible solutions:**\n\n")
|
||||
if o.PossibleSolutions != "none" {
|
||||
possibleSolutions, _ := goMarkdown(o.PossibleSolutions)
|
||||
@ -867,6 +870,9 @@ To learn more about Sourcegraph's alerting, see [our alerting documentation](htt
|
||||
fmt.Fprintf(&b, "```json\n%s\n```\n\n", fmt.Sprintf(`"observability.silenceAlerts": [
|
||||
%s
|
||||
]`, strings.Join(prometheusAlertNames, ",\n")))
|
||||
|
||||
// Render break for readability
|
||||
fmt.Fprint(&b, "<br />\n")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user