Configure monitoring
You can customize the module using the spec.distribution.modules.monitoring object in the following way:
-
type: you can select betweenprometheus(default),prometheusAgentandmimir, ornoneto avoid installing the module.prometheuswill install Prometheus Operator and a preconfigured Prometheus instance, Alertmanager, a set of alert rules, exporters needed to monitor all the components of the cluster, Grafana and a series of dashboards to view the collected metrics, and more.prometheusAgentwill install Prometheus operator, an instance of Prometheus in Agent mode (no alerting, no queries, no storage), and all the exporters needed to get metrics for the status of the cluster and the workloads. Useful when having a centralized (remote) Prometheus where to ship the metrics and not storing them locally in the cluster.mimirwill install the same as theprometheusoption, and in addition Grafana Mimir that allows for longer retention of metrics and the usage of Object Storage.
-
prometheusobject: if you specifiedprometheusormimirintype, this object lets you customize some aspects of thePrometheusinstance, which is governed by Prometheus Operator.remoteWrite: Set this option to ship the collected metrics to a remote Prometheus receiver.remoteWriteis an array of objects that allows configuring the remoteWrite options for Prometheus. The objects in the array follow the same schema as in the prometheus operator.resources: with this object, you can customize Prometheus' Pods resources.retentionSize: the retention size for the k8s Prometheus instance.retentionTime: the retention time for the K8s Prometheus instance.storageSize: the storage size for the k8s Prometheus instance.
-
alertmanager: if you specifiedprometheusormimirintype, SD will install Alertmanager inside the cluster. With this object, you can customize some aspects of it:deadManSwitchWebhookUrl: The webhook url to send deadman switch monitoring, for example to use with healthchecks.io.installDefaultRules: SD comes with predefined Prometheus rules to generate alerts. If true, the default rules will be installed.slackWebhookUrl: the Slack webhook url to send alerts.
-
grafana: if you specifiedprometheusormimirintype, SD will install Grafana inside the cluster. With this object, you can customize some aspects of it:-
basicAuthIngress: setting this to true will deploy an additionalgrafana-basic-authingress protected with Grafana's basic auth instead of SSO. It's intended use is as a temporary ingress for when there are problems with the SSO login flow. -
usersRoleAttributePath: JMESPath expression to retrieve the user's role. Example:usersRoleAttributePath: "contains(groups[*], 'beta') && 'Admin' || contains(groups[*], 'gamma') && 'Editor' || contains(groups[*], 'delta') && 'Viewer'More details in Grafana's documentation.
-
-
prometheusAgentobject: if you specifiedprometheusAgentintype, this object lets you specify:remoteWrite: you can specify a list of remote Prometheus receivers to ship metrics to.resources: with this object, you can customize Prometheus' Pods resources.
-
mimirobject: if you specifiedmimirintype, this object lets you customize some aspects of the installation:backend: the storage backend type for Mimir.minio(default) will use an in-cluster MinIO deployment for object storage,externalEndpointcan be used to point to an external S3-compatible object storage instead of deploying an in-cluster MinIO.externalEndpoint: if you specifiedexternalEndpointas backend, you need to specify this object to provide the needed credentials to your S3-compatible bucket.retentionTime: The retention time for the mimir pods.
-
minio.storageSize: if you selectedminioas storage backend for the module, it will install a minio instance inside the cluster. Here you specify the size for the bucket that's dedicated to the monitoring storage.infoThe minio instance will have 3 replicas with 2 PVCs each, so the storage size you specify will be multiplicated by a factor of 6.
-
minio.rootUser: here you can provide custom credentials for the Minio root user.