Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BOP-602] Monitoring page #11

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions content/docs/reference/monitoring/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Monitoring

Mirantis Kubernetes Engine 4 (MKE4) uses the [kube-prometheus-stack](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack) a collection of Kubernetes manifests, [Grafana](https://grafana.com/) dashboards, and [Prometheus rules](https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/) combined with documentation and scripts to provide easy to operate end-to-end Kubernetes cluster monitoring with [Prometheus](https://prometheus.io/) using the [Prometheus Operator](https://github.com/prometheus-operator/prometheus-operator).

## Configuration

Grafana is enabled by default and may be toggled via the MKE4 config:
```
monitoring:
enableGrafana: true
```

## Accessing the UIs

Prometheus and Grafana dashboards can be accessed quickly using kubectl port-forward after running the quickstart via the commands below.

### Prometheus

`$ kubectl --namespace mke port-forward svc/prometheus-k8s 9090`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This command doesn't work.

 kubectl --namespace mke port-forward svc/prometheus-k8s 9090
Error from server (NotFound): services "prometheus-k8s" not found
 k get svc -n mke
NAME                                    TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                                        AGE
authentication-dex                      NodePort    10.99.155.129    <none>        5556:34324/TCP,5554:33443/TCP,5558:33534/TCP   14m
minio                                   NodePort    10.99.60.250     <none>        9000:35371/TCP,9001:33100/TCP                  14m
monitoring-grafana                      ClusterIP   10.107.228.160   <none>        80/TCP                                         14m
monitoring-kube-prometheus-operator     ClusterIP   10.103.47.104    <none>        443/TCP                                        14m
monitoring-kube-prometheus-prometheus   ClusterIP   10.105.195.138   <none>        9090/TCP,8080/TCP                              14m
monitoring-kube-state-metrics           ClusterIP   10.107.112.186   <none>        8080/TCP                                       14m
monitoring-prometheus-node-exporter     ClusterIP   10.101.83.32     <none>        9100/TCP                                       14m
prometheus-operated                     ClusterIP   None             <none>        9090/TCP                                       13m
velero                                  ClusterIP   10.102.130.79    <none>        8085/TCP                                       13m
 kubectl --namespace mke port-forward svc/prometheus-operated 9090
Forwarding from 127.0.0.1:9090 -> 9090
Forwarding from [::1]:9090 -> 9090
Handling connection for 9090

Recommend changing the command to this:

$ kubectl --namespace mke port-forward svc/prometheus-operated 9090


Then access via http://localhost:9090

Check failure on line 21 in content/docs/reference/monitoring/README.md

View workflow job for this annotation

GitHub Actions / check-links

[Linkspector] reported by reviewdog 🐶 Connot reach http://localhost:9090. Status: null net::ERR_CONNECTION_REFUSED at http://localhost:9090 Raw Output: message:"Connot reach http://localhost:9090. Status: null net::ERR_CONNECTION_REFUSED at http://localhost:9090" location:{path:"content/docs/reference/monitoring/README.md" range:{start:{line:21 column:17} end:{line:21 column:38}}} severity:ERROR source:{name:"linkspector" url:"https://github.com/UmbrellaDocs/linkspector"}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably add localhost to the ignore section

https://github.com/Mirantis/mke-docs/pull/16/files


### Grafana

`$ kubectl --namespace mke port-forward svc/grafana 3000:80`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This command doesn't work.

 kubectl --namespace mke port-forward svc/grafana 3000:80
Error from server (NotFound): services "grafana" not found
 k get svc -n mke
NAME                                    TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                                        AGE
authentication-dex                      NodePort    10.99.155.129    <none>        5556:34324/TCP,5554:33443/TCP,5558:33534/TCP   14m
minio                                   NodePort    10.99.60.250     <none>        9000:35371/TCP,9001:33100/TCP                  14m
monitoring-grafana                      ClusterIP   10.107.228.160   <none>        80/TCP                                         14m
monitoring-kube-prometheus-operator     ClusterIP   10.103.47.104    <none>        443/TCP                                        14m
monitoring-kube-prometheus-prometheus   ClusterIP   10.105.195.138   <none>        9090/TCP,8080/TCP                              14m
monitoring-kube-state-metrics           ClusterIP   10.107.112.186   <none>        8080/TCP                                       14m
monitoring-prometheus-node-exporter     ClusterIP   10.101.83.32     <none>        9100/TCP                                       14m
prometheus-operated                     ClusterIP   None             <none>        9090/TCP                                       13m
velero                                  ClusterIP   10.102.130.79    <none>        8085/TCP                                       13m
 kubectl --namespace mke port-forward svc/monitoring-grafana 3000:80
Forwarding from 127.0.0.1:3000 -> 3000
Forwarding from [::1]:3000 -> 3000

Recommend changing the command to this:

$ kubectl --namespace mke port-forward svc/monitoring-grafana 3000:80


Then access via http://localhost:3000

Check failure on line 27 in content/docs/reference/monitoring/README.md

View workflow job for this annotation

GitHub Actions / check-links

[Linkspector] reported by reviewdog 🐶 Connot reach http://localhost:3000. Status: null net::ERR_CONNECTION_REFUSED at http://localhost:3000 Raw Output: message:"Connot reach http://localhost:3000. Status: null net::ERR_CONNECTION_REFUSED at http://localhost:3000" location:{path:"content/docs/reference/monitoring/README.md" range:{start:{line:27 column:17} end:{line:27 column:38}}} severity:ERROR source:{name:"linkspector" url:"https://github.com/UmbrellaDocs/linkspector"}

## Opscare (Feature in progress)

[Mirantis Opscare](https://www.mirantis.com/resources/opscare-datasheet/) is disabled by default and may be enabled via the MKE4 config.

```
monitoring:
enableOpscare: true
```

Enabling opscare installs the Prometheus [Alertmanager](https://prometheus.io/docs/alerting/latest/alertmanager/) addon. In future releases, Opscare will additionally install a salesforce-notifier component as it does in MKE3.

Loading