-
Task
-
Resolution: Done
-
Normal
-
None
-
None
-
5
-
False
-
-
False
-
-
-
OBSDOCS (Mar 25 - Apr 15) #251
Reading the OpenShift Monitoring documentation, it lists the individual components that can be configured using the `cluster-monitoring-config` and `user-workload-monitoring-config` ConfigMaps.[0]
In the same table (column 0), it shows the relationship between the OpenShift object and jsonpath within the configmap to this object, however it does not list the available fields and their options.
This would indicate that all the options are available and can be viewed with the `oc explain` command.
For a worked example, if I want to configure the `scrape_interval` within the Prometheus deployment, using the docs: [0]
Component | Cluster-monitoring-config config map key | user-workload-monitoring-config config map key |
---|---|---|
Prometheus | prometheusK8s | prometheus |
Then checking the Prometheus object
```
$ oc explain prometheus --recursive | grep -e "^ spec" -e "scrape"
spec <Object>
scrapeInterval <string>
scrapeTimeout <string>
```
This would indicate that the following configuration should work:
```
apiVersion: v1
kind: ConfigMap
metadata:
name: cluster-monitoring-config
namespace: openshift-monitoring
data:
config.yaml: |
prometheusK8s:
scrape_interval: 15s
```
But reviewing the CMO code, this does not appears to be an available. [1]
Resources:
[0] https://docs.openshift.com/container-platform/4.13/monitoring/configuring-the-monitoring-stack.html#configurable-monitoring-components_configuring-the-monitoring-stack
[1] https://github.com/openshift/cluster-monitoring-operator/blob/master/pkg/manifests/types.go#L157-L225
- links to