Monitoring Formula
The monitoring services in SUSE Manager are configured using formulas with forms. The package is installed by default, and contains these formulas:
- 
Grafana 
- 
Prometheus 
- 
Prometheus Exporters 
For more information about using monitoring, see Prometheus 및 Grafana를 사용한 모니터링.
1. Grafana
- 
Navigate to the tab, and set these parameters in the Grafanasection:- 
Check the Enabledbox to enable Grafana visualizations.Initial admin passwordis used on the first run only, and Grafana UI prompts to change it. This field cannot be used to change the Grafana password. For more information on how to change the password, see Prometheus 및 Grafana를 사용한 모니터링.
 
- 
- 
For each Prometheus data source you want to use, in the section, click +, and set these parameters: - 
In the Datasource namefield, type a name to identify the data source.
- 
In the Prometheus URLfield, type the used protocol, the location of the Prometheus server, and append port9090. For example,http://example.com:9090. In case TLS encryption is enabled in Prometheus formula make sure to usehttpsprotocol and FQDN.
- 
In the fields Prometheus server usernameandPrometheus server password, enter basic authentication credentials for Prometheus server matching the ones in Prometheus formula.
 
- 
- 
In the Dashboardssection, check the dashboards you want to use:- 
Uyuni server dashboard
- 
Uyuni clients dashboard
- 
PostgreSQL dashboard
- 
Apache HTTPD dashboard
- 
Kubernetes cluster dashboard
- 
Kubernetes etcd dashboard
- 
Kubernetes namespaces dashboard
 
- 
- 
Click Save Formula to save your configuration. 
2. Prometheus
- 
Navigate to the tab, and set these parameters in the Prometheussection:- 
Check the Enabledbox to enable Prometheus monitoring.
- 
In the Scrape intervalfield, type the frequency of data scraping, in seconds. For example,15will scrape data every fifteen seconds.
- 
In the Evaluation intervalfield, type the frequency of rules evaluation, in seconds. For example,15will evaluate alerting and aggregation rules every fifteen seconds.
 
- 
- 
In the TLSsection, set these parameters:- 
Check the Enabledbox to enable the secure configuration on Prometheus server.
- 
In the Server Certificatefield, type the path to the TLS server certificate.
- 
In the Server Keyfield, type the path to the TLS server key.
- 
In the Userfield, type the user name for Prometheus server.
- 
In the Password Hashfield, type the password for Prometheus server hashed with bcrypt.
 
- 
- 
In the Uyuni Serversection, set these parameters:- 
Check the Enabledbox to enable monitoring on this server.
- 
Check the Autodiscover clientsbox to enable Prometheus to automatically find and monitor new clients when they are added to the server.
- 
In the Usernamefield, type the user name of the Prometheus account on the server.
- 
In the Passwordfield, type the password of the Prometheus account on the server.
- 
In the Targets TLSsection, set these parameters:- 
Check the Enabledbox to enable the secure configuration for auto-discovered targets.
- 
In the CA Certificatefield, type the path to the Certificate Authority certificate.
- 
In the Client Certificatefield, type the path to the TLS client certificate for authentication.
- 
In the Client Keyfield, type the path to the TLS client key for authentication.
 
- 
 
- 
- 
In the Alertingsection, set these parameters:- 
Check the Enable local Alertmanager servicebox to enable the alert manager service.
- 
Check the Use local Alertmanagerbox to use the local alert manager service.
 
- 
- 
For each alert manager you want to use, in the section, click +, and set these parameters: - 
In the IP Address:Portfield, type the location of the alert manager target, including the port number.
 
- 
- 
To use a rule file, in the section, click +, and set these parameters: - 
In the Rule Filesfield, type the location of the rule file you want to use.
 
- 
- 
To add a custom scrape configuration, in the User defined scrape configurationssection, click +, and set these parameters:- 
In the Job namefield, type a unique job name for your configuration.
- 
In the Filesfield, type the location pattern of file service discovery files you want to use. For more information, see the upstream documentation https://prometheus.io/docs/prometheus/latest/configuration/configuration/#file_sd_config.
 
- 
- 
Click Save Formula to save your configuration. 
| The formula does not generate and deploy the TLS certificates and keys. Ensure the files are present on the Salt client and readable for the user  | 
3. Prometheus Exporters
- 
Navigate to the tab, and set these parameters in the Node Exportersection:- 
Check the Enabledbox to enable the node exporter.
- 
In the Argumentsfield, type any customized arguments for this exporter. For example,--web.listen-address=":9100".
 
- 
- 
In the Apache Exportersection:- 
Check the Enabledbox to enable the Apache exporter.
- 
In the Argumentsfield, type any customized arguments for this exporter. For example,--telemetry.address=":9117".
 
- 
- 
In the Postgres Exportersection:- 
Check the Enabledbox to enable the PostreSQL exporter.
- 
In the Data source Namefield, type the name of the data source to use.
- 
In the Argumentsfield, type any customized arguments for this exporter. For example,--web.listen-address=":9187".
 
- 
- 
In the TLSsection:- 
Check the Enabledbox to enable the secure configuration.
- 
In the CA Certificatefield, type the path to the Certificate Authority certificate.
- 
In the Server Certificatefield, type the path to the TLS server certificate.
- 
In the Server Keyfield, type the path to the TLS server key.
 
- 
- 
Click Save Formula to save your configuration. 
3.1. File-based service discovery
It is possible to define monitored targets using file-based service discovery provided in the Prometheus formula. This is a basic example demonstrating the usage:
[
  {
    "targets": [ "<client1>:9100", "<client2>:9100" ],
    "labels": {
      "role": "<suma-client>",
      "job": "<suma-refclient>"
    }
  },
  {
    "targets": [ "<server>:80" ],
    "labels": {
      "role": "<suma-server>",
      "job": "<suma-refhost>",
      "__metrics_path__": "/rhn/metrics"
    }
  }
]
For more information, see https://prometheus.io/docs/guides/file-sd/.
3.2. TLS certificates and keys
The formula does not generate and deploy the TLS certificates and keys. Ensure the files are present on the Salt client and readable for the user prometheus before applying the highstate. For more information about generating client and server certificates, see Prometheus 및 Grafana를 사용한 모니터링.
4. Activate Forms
When you have completed and saved all the forms, apply the highstate.
For more information about using monitoring, see Prometheus 및 Grafana를 사용한 모니터링.