Skip to content

Commit 1fc4bc7

Browse files
Zadjad RezaiZadjad Rezaisimonpasquier
authored
Fix broken relative links for non-github pages like prometheus-operator.dev (#1821)
* Fix broken relative links for non-github pages like prometheus-operator.dev * Update docs/customizations/developing-prometheus-rules-and-grafana-dashboards.md Co-authored-by: Simon Pasquier <[email protected]> Co-authored-by: Zadjad Rezai <[email protected]> Co-authored-by: Simon Pasquier <[email protected]>
1 parent fb74e6b commit 1fc4bc7

5 files changed

+10
-10
lines changed

docs/customizations/developing-prometheus-rules-and-grafana-dashboards.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Prometheus rules and Grafana dashboards in specific follow the
1919

2020
For both the Prometheus rules and the Grafana dashboards Kubernetes `ConfigMap`s are generated within kube-prometheus. In order to add additional rules and dashboards simply merge them onto the existing json objects. This document illustrates examples for rules as well as dashboards.
2121

22-
As a basis, all examples in this guide are based on the base example of the kube-prometheus [readme](../../README.md):
22+
As a basis, all examples in this guide are based on the base example of the kube-prometheus [readme](https://github.com/prometheus-operator/kube-prometheus/blob/main/README.md):
2323

2424
```jsonnet mdox-exec="cat example.jsonnet"
2525
local kp =
@@ -225,9 +225,9 @@ local kp = (import 'kube-prometheus/main.libsonnet') + {
225225
### Changing default rules
226226

227227
Along with adding additional rules, we give the user the option to filter or adjust the existing rules imported by `kube-prometheus/main.libsonnet`.
228-
The recording rules can be found in [kube-prometheus/components/mixin/rules](../../jsonnet/kube-prometheus/components/mixin/rules)
228+
The recording rules can be found in [kube-prometheus/components/mixin/rules](https://github.com/prometheus-operator/kube-prometheus/tree/main/jsonnet/kube-prometheus/components/mixin/rules)
229229
and [kubernetes-mixin/rules](https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/rules).
230-
The alerting rules can be found in [kube-prometheus/components/mixin/alerts](../../jsonnet/kube-prometheus/components/mixin/alerts)
230+
The alerting rules can be found in [kube-prometheus/components/mixin/alerts](https://github.com/prometheus-operator/kube-prometheus/tree/main/jsonnet/kube-prometheus/components/mixin/alerts)
231231
and [kubernetes-mixin/alerts](https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/alerts).
232232

233233
Knowing which rules to change, the user can now use functions from the [Jsonnet standard library](https://jsonnet.org/ref/stdlib.html) to make these changes.
@@ -417,7 +417,7 @@ local kp = (import 'kube-prometheus/main.libsonnet') + {
417417
### Pre-rendered Grafana dashboards
418418

419419
As jsonnet is a superset of json, the jsonnet `import` function can be used to include Grafana dashboard json blobs.
420-
In this example we are importing a [provided example dashboard](../../examples/example-grafana-dashboard.json).
420+
In this example we are importing a [provided example dashboard](https://github.com/prometheus-operator/kube-prometheus/tree/main/examples/example-grafana-dashboard.json).
421421

422422
```jsonnet mdox-exec="cat examples/grafana-additional-rendered-dashboard-example.jsonnet"
423423
local kp = (import 'kube-prometheus/main.libsonnet') + {

docs/customizations/exposing-prometheus-alertmanager-grafana-ingress.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ k.core.v1.list.new([
101101
])
102102
```
103103

104-
In order to expose Alertmanager and Grafana, simply create additional fields containing an ingress object, but simply pointing at the `alertmanager` or `grafana` instead of the `prometheus-k8s` Service. Make sure to also use the correct port respectively, for Alertmanager it is also `web`, for Grafana it is `http`. Be sure to also specify the appropriate external URL. Note that the external URL for grafana is set in a different way than the external URL for Prometheus or Alertmanager. See [ingress.jsonnet](../../examples/ingress.jsonnet) for how to set the Grafana external URL.
104+
In order to expose Alertmanager and Grafana, simply create additional fields containing an ingress object, but simply pointing at the `alertmanager` or `grafana` instead of the `prometheus-k8s` Service. Make sure to also use the correct port respectively, for Alertmanager it is also `web`, for Grafana it is `http`. Be sure to also specify the appropriate external URL. Note that the external URL for grafana is set in a different way than the external URL for Prometheus or Alertmanager. See [ingress.jsonnet](https://github.com/prometheus-operator/kube-prometheus/tree/main/examples/ingress.jsonnet) for how to set the Grafana external URL.
105105

106-
In order to render the ingress objects similar to the other objects use as demonstrated in the [main readme](../../README.md):
106+
In order to render the ingress objects similar to the other objects use as demonstrated in the [main readme](https://github.com/prometheus-operator/kube-prometheus/tree/main/README.md):
107107

108108
```
109109
{ ['00namespace-' + name]: kp.kubePrometheus[name] for name in std.objectFields(kp.kubePrometheus) } +
@@ -118,4 +118,4 @@ In order to render the ingress objects similar to the other objects use as demon
118118

119119
Note, that in comparison only the last line was added, the rest is identical to the original.
120120

121-
See [ingress.jsonnet](../../examples/ingress.jsonnet) for an example implementation.
121+
See [ingress.jsonnet](https://github.com/prometheus-operator/kube-prometheus/tree/main/examples/ingress.jsonnet) for an example implementation.

docs/customizations/pod-anti-affinity.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
### Pod Anti-Affinity
22

33
To prevent `Prometheus` and `Alertmanager` instances from being deployed onto the same node when
4-
possible, one can include the [kube-prometheus-anti-affinity.libsonnet](../../jsonnet/kube-prometheus/addons/anti-affinity.libsonnet) mixin:
4+
possible, one can include the [kube-prometheus-anti-affinity.libsonnet](https://github.com/prometheus-operator/kube-prometheus/tree/main/jsonnet/kube-prometheus/addons/anti-affinity.libsonnet) mixin:
55

66
```jsonnet mdox-exec="cat examples/anti-affinity.jsonnet"
77
local kp = (import 'kube-prometheus/main.libsonnet') +

docs/customizations/static-etcd-configuration.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
### Static etcd configuration
22

3-
In order to configure a static etcd cluster to scrape there is a simple [static-etcd.libsonnet](../../jsonnet/kube-prometheus/addons/static-etcd.libsonnet) mixin prepared.
3+
In order to configure a static etcd cluster to scrape there is a simple [static-etcd.libsonnet](https://github.com/prometheus-operator/kube-prometheus/tree/main/jsonnet/kube-prometheus/addons/static-etcd.libsonnet) mixin prepared.
44

55
An example of how to use it can be seen below:
66

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Adding a new platform specific configuration
22

3-
Adding a new platform specific configuration requires to update the [customization example](../../../docs/customizations/platform-specific.md#running-kube-prometheus-on-specific-platforms) and the [platforms.libsonnet](platforms.libsonnet) file by adding the platform to the list of existing ones. This allow the new platform to be discoverable and easily configurable by the users.
3+
Adding a new platform specific configuration requires to update the [customization example](https://github.com/prometheus-operator/kube-prometheus/tree/main/../docs/customizations/platform-specific.md#running-kube-prometheus-on-specific-platforms) and the [platforms.libsonnet](platforms.libsonnet) file by adding the platform to the list of existing ones. This allow the new platform to be discoverable and easily configurable by the users.

0 commit comments

Comments
 (0)