Skip to content

Commit

Permalink
documentation updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Edmundsson committed Oct 4, 2023
1 parent ec73a3f commit b49fc57
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 44 deletions.
4 changes: 2 additions & 2 deletions keycloak-observability/docs/README-Prometheus.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Prometheus configuration

RabbitMQ alerting rules depend on [kube-state-metrics](https://github.com/kubernetes/kube-state-metrics). Refer to the kube-state-metrics documentation to deploy and scrape kube-state-metrics.
Keycloak alerting rules depend on [kube-state-metrics](https://github.com/kubernetes/kube-state-metrics). Refer to the kube-state-metrics documentation to deploy and scrape kube-state-metrics.

## With Prometheus Operator
If Prometheus and Alertmanager are installed by [Prometheus Operator](https://github.com/prometheus-operator/prometheus-operator), apply the YAML files in [alertmanager](./alertmanager), [monitors](./monitors), and [rules](./rules) directories. They contain K8s objects watched by Prometheus Operator configuring Prometheus.

## Without Prometheus Operator
If Prometheus and Alertmanager are not installed by Prometheus Operator, use [config-file.yml](./config-file.yml) and [rule-file.yml](./rule-file.yml) as a starting point for RabbitMQ monitoring and alerting.
If Prometheus and Alertmanager are not installed by Prometheus Operator, use [config-file.yml](./config-file.yml) and [rule-file.yml](./rule-file.yml) as a starting point for Keycloak monitoring and alerting.
`rule-file.yml` is an auto-generated file containing the same rules as the [rules](./rules/) directory.

For the [Alertmanager configuration file](https://prometheus.io/docs/alerting/latest/configuration/#configuration-file), use the same `alertmanager.yaml` as provided in [alertmanager/slack.yml](alertmanager/slack.yml).
12 changes: 0 additions & 12 deletions keycloak-observability/docs/README-alertmanager.md

This file was deleted.

13 changes: 6 additions & 7 deletions keycloak-observability/docs/README-monitors.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,25 @@ metadata:
Given the `matchLabels` fields from the Prometheus spec above, you would need to add the label `release: my-prometheus` to the `PodMonitor` and `ServiceMonitor` objects.

File [rabbitmq-servicemonitor.yml](./rabbitmq-servicemonitor.yml) contains scrape targets for RabbitMQ. TLS verify will be skipped by default. To enable TLS verification for scraping, set `spec.endpoints[port=prometheus-tls].tlsConfig.insecureSkipVerify` to false and provide a Kubernetes Secret containing CA cert used for Prometheus.
Metrics listed in [RabbitMQ metrics](https://github.com/rabbitmq/rabbitmq-server/blob/master/deps/rabbitmq_prometheus/metrics.md) will be scraped from all RabbitMQ nodes.
Note that the ServiceMonitor object works only for RabbitMQ clusters deployed by [cluster-operator](https://github.com/rabbitmq/cluster-operator) `>v1.6.0`. If you run cluster-operator `<=v1.6.0` use a PodMonitor instead:
File [keycloak-servicemonitor.yml](./keycloak-servicemonitor.yml) contains scrape targets for keycloak. TLS verify will be skipped by default. To enable TLS verification for scraping, set `spec.endpoints[port=prometheus-tls].tlsConfig.insecureSkipVerify` to false and provide a Kubernetes Secret containing CA cert used for Prometheus.
Metrics listed in [Keycloak metrics](https://github.com/aerogear/keycloak-metrics-spi) will be scraped from all Keycloak nodes.

```yaml
---
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: rabbitmq
name: keycloak
spec:
podMetricsEndpoints:
- port: prometheus
interval: 15s
selector:
matchLabels:
app.kubernetes.io/component: rabbitmq
app.kubernetes.io/component: keycloak
namespaceSelector:
any: true
```

File [rabbitmq-cluster-operator-podmonitor.yml](./rabbitmq-cluster-operator-podmonitor.yml) contains a scrape target for the RabbitMQ Cluster Operator.
[The metrics](https://book.kubebuilder.io/reference/metrics.html) emitted by the RabbitMQ Cluster Operator are created by Kubernetes controller-runtime and are therefore completely different from the RabbitMQ metrics.
File [keycloak-cluster-operator-podmonitor.yml](./keycloak-cluster-operator-podmonitor.yml) contains a scrape target for the keycloak Cluster Operator.
[The metrics](https://book.kubebuilder.io/reference/metrics.html) emitted by the keycloak Cluster Operator are created by Kubernetes controller-runtime and are therefore completely different from the keycloak metrics.
23 changes: 0 additions & 23 deletions keycloak-observability/docs/README-rules.md

This file was deleted.

0 comments on commit b49fc57

Please sign in to comment.