The following services are used as monitoring tools:
- Prometheus tool for storing time series.
- Grafana service for monitoring key system performance indicators.
Let’s look at how to deploy them to a Kubernetes cluster in a few steps:
- Clear CRDs before installation (optional).
- Download the Helm chart and the configuration file.
- Fill out the configuration file.
- Install the Monitoring chart using helm in the Kubernetes cluster.
Step 1: Clear CRDs before installation (optional)
Perform CRD cleanup if you have previously installed monitoring tools or are using an BRIX version below BRIX - v2023.6.19 or BRIX LTS - v2023.4.52.
To clear old CRDs, execute the following command:
kubectl delete crd alertmanagerconfigs.monitoring.coreos.com
kubectl delete crd alertmanagers.monitoring.coreos.com
kubectl delete crd podmonitors.monitoring.coreos.com
kubectl delete crd probes.monitoring.coreos.com
kubectl delete crd prometheusagents.monitoring.coreos.com
kubectl delete crd prometheuses.monitoring.coreos.com
kubectl delete crd prometheusrules.monitoring.coreos.com
kubectl delete crd scrapeconfigs.monitoring.coreos.com
kubectl delete crd servicemonitors.monitoring.coreos.com
kubectl delete crd thanosrulers.monitoring.coreos.com
Step 2: Download the Helm chart and the configuration file
For installation via the internet, obtain the configuration file values-monitoring.yaml
by executing the command:
helm repo add elma365 https://charts.elma365.tech
helm repo update
helm show values elma365/monitoring> values-monitoring.yaml
Step 3: Fill out the configuration file
Fill out the configuration file values-monitoring.yaml
for the installation of monitoring tools. For this, specify the desired namespace
for the monitoring service in the parameters kube-prometheus-stack.namespaceOverride
and grafana.namespaceOverride
, for example, namespaceOverride: monitoring
. The namespace will be created during the installation if it has not been created beforehand.
For Grafana:
- Ensure that the interface is enabled and
kube-prometheus-stack.grafana.ingress.enabled
is set totrue
. - Specify the address at which Grafana will be accessible in the parameter
kube-prometheus-stack.grafana.ingress.hosts
. - Set the administrator’s password in the parameter
kube-prometheus-stack.grafana.adminPassword
.
Filling out the values-monitoring.yaml configuration file for monitoring installation
|
Filling out parameters for connecting to the Mimir remote storage
|
Step 4: Install the Monitoring chart using helm in the Kubernetes cluster
Install the Monitoring chart in the namespace
specified in the configuration file values-monitoring.yaml
in step 2. The namespace will be created during the installation if it has not been created beforehand.
To install via the internet, execute the command:
helm upgrade --install elma365-monitoring elma365/monitoring -f values-monitoring.yaml -n monitoring --create-namespace
Начало внимание
After installing the monitoring tools, you need to configure their use on the BRIX application side.
Конец внимание
Delete the Monitoring chart using helm in the Kubernetes cluster
Начало внимание
Before removing the Monitoring add-on component, disable monitoring on the BRIX application side.
Конец внимание
- To delete the elma365-monitoring chart in
namespace monitoring
, execute the command:
helm uninstall elma365-monitoring -n monitoring
- CRDs created by the elma365-monitoring chart are not removed by default and must be manually cleared by a user with cluster-admin rights:
kubectl delete crd alertmanagerconfigs.monitoring.coreos.com
kubectl delete crd alertmanagers.monitoring.coreos.com
kubectl delete crd podmonitors.monitoring.coreos.com
kubectl delete crd probes.monitoring.coreos.com
kubectl delete crd prometheusagents.monitoring.coreos.com
kubectl delete crd prometheuses.monitoring.coreos.com
kubectl delete crd prometheusrules.monitoring.coreos.com
kubectl delete crd scrapeconfigs.monitoring.coreos.com
kubectl delete crd servicemonitors.monitoring.coreos.com
kubectl delete crd thanosrulers.monitoring.coreos.com
- If the CRD remains in the Terminating status for more than 5 minutes during deletion, patch the CRD with the command:
kubectl patch crd/MY_CRD_NAME -p '{"metadata":{"finalizers":[]}}' --type=merge