ELMA365 On-Premises > ELMA365 On-Premises Enterprise > Install add-on components for ELMA365 / Install monitoring tools

Install monitoring tools

The installation of monitoring tools involves deploying Prometheus in the Kubernetes cluster for time-series storage and Grafana for visualization.

The installation consists of four steps:

  1. Clear CRDs before installation (optional).
  2. Download the helm chart and the configuration file.
  3. Fill out the configuration file.
  4. 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 ELMA365 version below ELMA365 - v2023.6.19 or ELMA365 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:

  1. Ensure that the interface is enabled and kube-prometheus-stack.grafana.ingress.enabled is set to true.
  2. Specify the address at which Grafana will be accessible in the parameter kube-prometheus-stack.grafana.ingress.hosts.
  3. Set the administrator's password in the parameter kube-prometheus-stack.grafana.adminPassword.

## Monitoring settings
kube-prometheus-stack:
  grafana:
    ## address where Grafana will be accessible
    ingress:
      enabled: true
      hosts:
        - grafana.mycompany.com
    ## administrator's credentials
    adminUser: admin
    adminPassword: admin
    ## list of used plugins
    plugins:
    - camptocamp-prometheus-alertmanager-datasource
    - flant-statusmap-panel
    - vonage-status-panel
    sidecar:
      dashboards:
        enabled: true
        label: "grafana_dashboard"
        labelValue: ""
        annotations:
        folderAnnotation: grafana-dashboard-folder
  prometheus:
    prometheusSpec:
      serviceMonitorSelectorNilUsesHelmValues: false

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 

Начало внимание

The installation of the monitoring tools add-on does not automatically enable monitoring and dashboards on the ELMA365 application side.

After installation, don't forget to change the ELMA365 application settings and set up monitoring on the application side.

Read more about enabling service monitoring on the ELMA365 application side in Enable monitoring in ELMA365 Enterprise.

Конец внимание

Delete the Monitoring chart using helm in the Kubernetes cluster

Начало внимание

Before removing the Monitoring add-on component, disable monitoring on the ELMA365 application side..

Конец внимание

  1. To delete the elma365-monitoring chart in the namespace monitoring, execute the command:

helm uninstall elma365-monitoring -n monitoring

  1. 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

  1. 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

Found a typo? Highlight the text, press ctrl + enter and notify us