Commit Graph

21 Commits

Author SHA1 Message Date
Jack Baldry
c1c48dd610
Use relative aliases for all non-current Grafana aliases (#60062)
* Use relative aliases for all non-current Grafana aliases

Prevents non-latest documentation "stealing" the page away from latest
and through permanent redirects for latest pages that no longer exist.

The redirected pages are indexed by search engines but our robots.txt
forbids them crawling the non-latest page.

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Remove aliases from shared pages

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Rewrite all current latest aliases to be next

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Fix typo in latest alias

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Remove all current page aliases

find docs/sources -type f -name '*.md' -exec sed -z -i 's#\n *- /docs/grafana/next/[^\n]*\n#\n#' {} \;
find docs/sources -type f -name '*.md' -exec sed -Ez -i 's#\n((aliases:\n *-)|aliases:\n)#\n\2#' {} \;

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Prettier

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2022-12-09 12:36:04 -04:00
George Robinson
4073d044c1
Docs: Consolidate Templating labels and annotations docs into a single page (#59685) 2022-12-02 09:40:48 +00:00
George Robinson
c8c1499cd0
Docs: Add docs for labels with dots (#59352) 2022-11-29 13:15:48 +00:00
George Robinson
e7316ff13f
Docs: Improve Labels and annotations docs (#59325)
This commit makes a number of changes to the docs for Labels and
annotations.

 1. It changes the order in which Labels and annotations are mentioned
    from Annotations and labels to Labels and annotations as this is
    the order shown in the UI when creating and editing alert rules.
    It is also the order in the Prometheus documentation.

 2. It changes most of the documentation explaining what labels and
    annotations are and the differences between them. It also adds
    some paragraphs on Custom Labels.
2022-11-28 14:09:02 +00:00
brendamuir
596b4fecb0
Docs: Refactors notifications in alerting (#57653)
* Refactors notifications in alerting

* Fixes broken links

* adds headings

* fixes broken links

* Adds line space and intro sentences
2022-10-26 19:07:49 +01:00
Vladimir
efef672d19
Documentation: clarify label matching (#55650)
* Documentation: clarify label matching

Behaviour in case of multiple matchers is not documented, but my experiments show they are reduced using logical AND. Please validate the updated description.

* Accept wording suggestion

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>

* Accept suggestion for docs/sources/alerting/fundamentals/annotation-label/labels-and-label-matchers.md

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>

* Improve wording according to review suggestions

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-09-28 09:06:04 +01:00
Martin Lehmann
85c26ea908
Alerting: Fix a typo in alerting rule annotation docs (#55730) 2022-09-27 10:56:22 +01:00
Matthew Jacobson
940d18ad57
Alerting: Sanitize invalid label/annotation names for external alertmanagers (#54537)
* Alerting: Sanitize invalid label/annotation names for external alertmanagers

Grafana's built-in Alertmanager supports both Unicode label keys and values; however, if using an external
Prometheus Alertmanager label keys must be compatible with their data model.
This means label keys must only contain ASCII letters, numbers, as well as underscores and match the regex
`[a-zA-Z_][a-zA-Z0-9_]*`.

Any invalid characters will now be removed or replaced by the Grafana alerting engine before being sent to
the external Alertmanager according to the following rules:

- `Whitespace` will be removed.
- `ASCII characters` will be replaced with `_`.
- `All other characters` will be replaced with their lower-case hex representation.

* Prefix hex replacements with `0x`

* Refactor for clarity

* Apply suggestions from code review

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-09-07 11:39:39 -04:00
ceh
ad501e770f
Docs: Fix minor typo (#53590) 2022-08-22 18:26:52 +02:00
Matthew Jacobson
28dd413c1d
Alerting: Add config disabled_labels to disable reserved labels (#51832)
* Alerting: Add config disabled_labels to disable reserved labels

[unified_alerting.reserved_labels]
disabled_labels

* Replace IsGrafanaFolderDisabled with more generic IsReservedLabelDisabled

* Simplify SchedulerCfg by including UnifiedAlertingSettings
2022-07-11 12:41:40 -04:00
Santiago
93e2a0eddc
fix broken links (#51821) 2022-07-06 12:16:05 -03:00
Santiago
9797744c10
template functions reference and examples moved to corresponding section, description and links fixed (#51654) 2022-07-04 10:38:22 -03:00
George Robinson
5736a3c59e
Alerting: Docs on how to template annotations and labels (#51024) 2022-06-17 18:30:33 +01:00
Matthew Jacobson
5dee2ed24c
Alerting: Add first Grafana reserved label grafana_folder (#50262)
* Alerting: Add first Grafana reserved label g_label

g_label holds the title of the folder container the alert. The intention of this label
is to use it as part of the new default notification policy groupBy.

* Add nil check on updateRule labels map

* Disable gocyclo lint on schedule.ruleRoutine

will remove later in a separate refactoring PR to reduce complexity.

* Address doc suggestions

* Update g_folder for rules in folder when folder title changes

* Remove global bus in FolderService

* Modify tests to fit new common g_folder label

* Add changelog entry

* Fix merge conflicts

* Switch GrafanaReservedLabelPrefix from `g_` to `grafana_`
2022-06-17 13:10:49 -04:00
George Robinson
8c01f28285
Docs: How to template annotations and labels (#50972) 2022-06-17 10:37:43 +01:00
brendamuir
e0e76f0252
Fixes term Grafana Alerting (#50404) 2022-06-08 13:35:37 +02:00
George Robinson
6e3d58d779
Improve docs for values in custom annotations and labels (#50346) 2022-06-08 10:39:21 +01:00
Christopher Moyer
a568d421f8
Docs: Setup refactor (#49739)
* builds out refactored setup topics

* Automatically fix some relrefs with mv-manager

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Use refs for tutorials content which is outside of this repository

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Manually fix complicated relrefs

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* consolidates team sync and db encryption topics

* Fix relrefs

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* updates setup index file

* Convert TOML to YAML

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Add current alias for new alerting content

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Add current aliases to new setup-grafana and configure-security pages

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Update docs/sources/setup-grafana/configure-grafana/_index.md

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>

* moves saml docs, updates order in TOC

* Manually fix relrefs

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* added usage insights topics, adjusted weights

* corrected relrefs

* Fix relrefs broken in rebase

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-06-02 11:57:22 -05:00
Christopher Moyer
8c84d62e3d
Docs: combines all SAML topics into one topic (#49443)
* combines all SAML topics

* resolves merge conflicts

* makes prettier
2022-05-27 07:42:51 -05:00
Jack Baldry
b84294dd27
Convert TOML front matter to YAML (#49690)
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2022-05-26 11:06:25 -04:00
JitaC
6397b34f8b
Docs: Move labels and annotations topic to alerting fundamentals section (#49283)
* Moved annotation and labels topic to fundamentals and added label matching to the same section

* Cosmetic updates to "How label matching works topic"

* Few more changes to annotations and label section. Also added stem sentence to silences topics.

* Fixed one more broken relref.

* Update docs/sources/alerting/fundamentals/_index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-05-19 19:17:57 -04:00