mirror of
https://github.com/carlosedp/cluster-monitoring.git
synced 2024-11-20 19:07:17 +01:00
Fix endpoint names
This commit is contained in:
parent
cdc33631f4
commit
b4d6ff0466
@ -69,11 +69,9 @@ wget https://github.com/rancher/k3s/releases/download/`curl -s https://api.githu
|
||||
sudo mv k3s /usr/local/bin
|
||||
|
||||
# Start K3s
|
||||
sudo k3s server --docker &
|
||||
sudo k3s server &
|
||||
```
|
||||
|
||||
To generate the metrics with all metadata required by the dashboards, K3s needs to be started with Docker as the runtime.
|
||||
|
||||
Now to deploy the monitoring stack on your K3s cluster, there are three parameters to be configured on `vars.jsonnet`:
|
||||
|
||||
1. Set `k3s.enabled` to `true`.
|
||||
@ -91,8 +89,6 @@ To list the created ingresses, run `k3s kubectl get ingress --all-namespaces`.
|
||||
* Prometheus on [https://prometheus.[your_node_ip].nip.io](https://prometheus.[your_node_ip].nip.io)
|
||||
* Alertmanager on [https://alertmanager.[your_node_ip].nip.io](https://alertmanager.[your_node_ip].nip.io)
|
||||
|
||||
There are some dashboards that shows no values due to some cadvisor metrics not having the complete metadata if K3s is started with default script or no `--docker` arg. Check the open issues for more information.
|
||||
|
||||
## Updating the ingress suffixes
|
||||
|
||||
To avoid rebuilding all manifests, there is a make target to update the Ingress URL suffix to a different suffix (using nip.io) to match your host IP. Run `make change_suffix IP="[IP-ADDRESS]"` to change the ingress route IP for Grafana, Prometheus and Alertmanager and reapply the manifests. If you have a K3s cluster, run `make change_suffix IP="[IP-ADDRESS] K3S=k3s`.
|
||||
|
@ -5,10 +5,10 @@ local utils = import 'utils.libsonnet';
|
||||
{
|
||||
prometheus+:: {
|
||||
kubeControllerManagerPrometheusDiscoveryEndpoints:
|
||||
utils.newEndpoint('kube-controller-manager', 'kube-system', vars.k3s.master_ip, 'http-metrics', 10252),
|
||||
utils.newEndpoint('kube-controller-manager-prometheus-discovery', 'kube-system', vars.k3s.master_ip, 'http-metrics', 10252),
|
||||
|
||||
kubeSchedulerPrometheusDiscoveryEndpoints:
|
||||
utils.newEndpoint('kube-scheduler', 'kube-system', vars.k3s.master_ip, 'http-metrics', 10251),
|
||||
utils.newEndpoint('kube-scheduler-prometheus-discovery', 'kube-system', vars.k3s.master_ip, 'http-metrics', 10251),
|
||||
|
||||
serviceMonitorKubelet+:
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user