Customizing Observability Stack¶
We provide an option to customize various features in Privacera monitoring stack like:
- Customizing Prometheus (Retention period, PVC size, Taints and Toleration, Node Selectors and Resource Quota)
- Customizing Grafana (PVC size, Admin login password, Node Selectors and Resource Quota).
- Creating a custom values file to override the default one for all monitoring component.
To customize the monitoring stack copy vars.monitoing.yml file to custom-vars directory.
- SSH into the instance where Privacera Manager is installed.
- Navigate to the
configdirectory using the following command:Bash -
Copy
vars.monioring.ymlfile fromsample-varsfolder tocustom-varsfolder.If this file already exists in the
custom-varsfolder, you can skip this step.Bash -
Open
vars.monitoring.ymlfile.Bash
Customizing Prometheus Configurations¶
- In Prometheus, the default retention period is
15 days. To update the retention period, uncomment thePROMETHEUS_DATA_RETENTION_PERIODvariable in thevars.monitoring.ymlfile , set it to your desired retention period, and save the changes.Bash - The default PVC size in Prometheus is
10Giin Prometheus.To update the PVC size, uncomment thePROMETHEUS_K8S_PVC_SIZEvariable in thevars.monitoring.ymlfile and and set the desired PVC size.Bash - If you want to run Prometheus on a specific node, and the desired node is already labeled with the required key and value, uncomment the
PROMETHEUS_DEPLOYMENT_NODE_SELECTORSvariable in thevars.monitoring.ymlfile and update theKEYandVALUEwith the desired key and value. - To update the resource quota of Prometheus, uncomment
PROMETHEUS_RESOURCE_MEMORY_LIMITandPROMETHEUS_RESOURCE_CPU_LIMITvariables invars.monitoring.ymlfile and provide the desired values. Default memory limit is10Giand CPU is3core. - If you want to add taints and tolerations to the Prometheus server, uncomment the variables below and provide the desired values in place of
<PLEASE_CHANGE>. -
Prometheus Node Exporter runs as a DaemonSet and is responsible for collecting node-level metrics such as CPU, memory, and disk usage, then forwarding them to Prometheus.
By default, it is disabled. To enable it, uncomment the variable shown below in the vars.monitoring.yml file and save your changes.
Bash -
To disable Prometheus, uncomment the following variable and save the changes:
Note: (Optional) If Prometheus is already deployed, you must also complete the following steps in addition to the one mentioned above.Bash The default value of
MONITORING_NAMESPACEisprivacera-monitoring.- Manually uninstall the currently deployed Prometheus Helm chart.
- Also, make sure to clean up the Prometheus directory.
Bash
Customizing Grafana Configurations¶
- The default PVC size in Grafana is
1Gi. To update the PVC size, uncomment theGRAFANA_K8S_PVC_SIZEvariable in thevars.monitoring.ymlfile and set the desired PVC size.Bash - If you want to run Grafana on a specific node, and the desired node is already labeled with the required key and value, uncomment the
GRAFANA_DEPLOYMENT_NODE_SELECTORSvariable in thevars.monitoring.ymlfile and update theKEYandVALUEwith the desired key and value. - To update the default admin password for Grafana, uncomment the
GRAFANA_LOGIN_USER_PASSWORDvariable in thevars.monitoring.ymlfile and set it to your desired password.Bash
Creating custom values file for Monitoring components¶
If you want to create a custom values file to override the default one for the monitoring components used in Privacera, follow the steps below.
-
Go to
custom-varsfolder.Bash -
Create the required custom values files for the monitoring components. Choose the file name from the table below. For example, if you want to create the custom values file for Grafana, the file name will be
grafana-custom-values.ymlNote
You can refer public HELM chart to take the reference for creating custom values file.
MonitoringComponent Custom values file name Helm Chart Version Public Helm Chart URL Grafana grafana-custom-values.yml9.2.1Grafana Chart Grafana Oncall grafana-oncall-custom-values.yml1.8.13Grafana OnCall Chart Prometheus prometheus-custom-values.yml27.16.0Prometheus Chart BlackBox Exporter blackbox-exporter-custom-values.yml9.7.0Blackbox Exporter Chart Loki loki_custom_values.yml6.30.1Loki Chart Tempo tempo_distributed_custom_values.yml1.18.1Tempo Chart Pyroscope pyroscope_custom_values.yml1.13.4Pyroscope Chart Otel Receiver otel_collector_custom_values.yml0.126.0OpenTelemetry Chart Otel Scraper otel_scraper_custom_values.yml0.126.0OpenTelemetry Chart Otel Agent otel_agent_custom_values.yml0.126.0OpenTelemetry Chart -
Add the necessary values to the custom values file and save it.
- Redeploy the Privacera Monitoring components.
Restart Services¶
After making the configuration changes, you need to restart the services to apply them. To restart the services, follow the steps below.
a. Go to privacera-manager directory.
| Bash | |
|---|---|
setup to generate the required files. | Bash | |
|---|---|
| Bash | |
|---|---|
install to update the Grafana. | Bash | |
|---|---|
post-install. | Bash | |
|---|---|