13.2. Monitoring with custom Prometheus
Prometheus is an open-source monitoring and alerting platform. You can use it to monitor health and availability of Central and Sensor components of RHACS. When you enable monitoring, RHACS creates a new monitoring service on port number 9090 and a network policy allowing inbound connections to that port.
This monitoring service exposes an endpoint that is not encrypted by TLS and has no authorization. Use this only when you do not want to use Red Hat OpenShift monitoring.
Before you can use custom Prometheus monitoring, if you have Red Hat OpenShift, you must disable the default monitoring. If you are using Kubernetes, you do not need to perform this step.
To disable the default monitoring by using the Operator, change the configuration of the Central custom resource as shown in the following example. For more information on configuration options, see "Central configuration options using the Operator" in the "Additional resources" section.
Procedure
-
On the OpenShift Container Platform web console, go to the Operators
Installed Operators page. - Select the RHACS Operator from the list of installed Operators.
- Click on the Central tab.
- From the list of Central instances, click on a Central instance for which you want to enable monitoring.
Click on the YAML tab and update the YAML configuration as shown in the following example:
monitoring: openshift: enabled: false
13.2.2. Disabling Red Hat OpenShift monitoring for Central services by using Helm 링크 복사링크가 클립보드에 복사되었습니다!
To disable the default monitoring by using Helm, change the configuration options in the central-services Helm chart. For more information on configuration options, see the documents in the "Additional resources" section.
Procedure
Update the configuration file with the following value:
monitoring.openshift.enabled: false-
Run the
helm upgradecommand and specify the configuration files.
13.2.3. Monitoring Central services by using the RHACS Operator 링크 복사링크가 클립보드에 복사되었습니다!
You can monitor Central services, Central and Scanner, by changing the configuration of the Central custom resource. For more information on configuration options, see "Central configuration options using the Operator" in the "Additional resources" section.
Procedure
-
On the OpenShift Container Platform web console, go to the Operators
Installed Operators page. - Select the Red Hat Advanced Cluster Security for Kubernetes Operator from the list of installed Operators.
- Click on the Central tab.
- From the list of Central instances, click on a Central instance for which you want to enable monitoring for.
Click on the YAML tab and update the YAML configuration:
-
For monitoring Central, enable the
central.monitoring.exposeEndpointconfiguration option for theCentralcustom resource. -
For monitoring Scanner, enable the
scanner.monitoring.exposeEndpointconfiguration option for theCentralcustom resource.
-
For monitoring Central, enable the
- Click Save.