This topic describes how to manage Prometheus data sources.
Enable/Disable a Prometheus data source
After a Prometheus data source is created, it must be manually enabled before it can be used. You can refer to this section to enable or disable a Prometheus data source. After a Prometheus data source is disabled, monitoring data will be written only to MonitorDB.
Prerequisites
- Ensure the current user logged in to OCP has the ADMIN role.
- Before enabling a Prometheus data source, make sure you have modified the
prometheus.yamlconfiguration file and restarted the Prometheus service as described in Create a Prometheus data source.
Procedure
Log in to OCP.
Click System Management > External Integration in the left navigation pane.
Click the Prometheus tab.
On the Prometheus Data Sources page, click Enable/Disable in the Actions column to enable or disable a Prometheus data source.
Verify a Prometheus data source
You can refer to this section to verify whether a Prometheus data source is available.
Prerequisites
- Ensure the current user logged in to OCP has the ADMIN role.
- A Prometheus data source has been created as described in Create a Prometheus data source.
Procedure
Log in to OCP.
Click System Management > External Integration in the left navigation pane.
Click the Prometheus tab.
On the Prometheus Data Sources page, click Verify in the Actions column.
In the dialog box that appears, click Verify.
View the verification result in the notification bubble.
Edit a Prometheus data source
You can refer to this section to update or modify the configuration of a Prometheus data source.
Prerequisites
- Ensure the current OCP user is in the ADMIN role.
- You have created a Prometheus data source.
Procedure
Log in to OCP.
In the left navigation bar, click System Management > External Integration.
Click the Prometheus tab.
On the Prometheus Data Sources page, click ... in the Actions column > Edit.
In the dialog box that appears, modify the configuration of the Prometheus data source.
For configuration details, refer to Create a Prometheus data source.
After verification, click Save.
Delete a Prometheus data source
You can refer to this section to delete a Prometheus data source. After deletion, monitoring historical data for all clusters will be unavailable, and the monitoring system will be inaccessible. Deleted data sources cannot be recovered; proceed with caution.
Prerequisites
- Ensure the current OCP user is in the ADMIN role.
- You have created a Prometheus data source, and the Prometheus data source is in the Pending Enablement or Disabled state.
Procedure
Log in to OCP.
In the left navigation bar, click System Management > External Integration.
Click the Prometheus tab.
On the Prometheus Data Sources page, click ... in the Actions column > Delete.
In the dialog box that appears, click Delete.
