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 - 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
Increasing Prometheus PVC Size¶
If you need to increase the Prometheus PVC size after initial deployment, follow the steps below carefully.
Prerequisites
- Ensure your storage class supports volume expansion (
allowVolumeExpansion: true) - Verify you have appropriate permissions to patch PVCs
Steps to increase PVC size:
1. Verify storage class supports expansion
| Bash | |
|---|---|
Replace
<storage-class-name>with your actual storage class name. The default format is:<K8S_NAMESPACE>-store-privacera-prometheus
Example:
| Bash | |
|---|---|
Expected output: true
2. Patch the PVC to increase its size
| Bash | |
|---|---|
Example:
| Bash | |
|---|---|
3. Verify the PVC resize
Check both the requested and actual capacity of the PVC:
| Bash | |
|---|---|
Ensure both Requested and Capacity reflect the new size before proceeding.
4. Copy vars.monitoring.yml to custom-vars
Copy vars.monitoring.yml from the sample-vars folder to the custom-vars folder on the Privacera Manager host if not present.
If this file already exists in the custom-vars folder, you can skip this step.
5. Update PROMETHEUS_K8S_PVC_SIZE in vars.monitoring.yml
Critical: Sync values after patching
You must update PROMETHEUS_K8S_PVC_SIZE in vars.monitoring.yml to match the new PVC size before running Helm upgrade. Failing to do so will cause the upgrade to fail.
| YAML | |
|---|---|
Example:
| YAML | |
|---|---|
6. Delete the StatefulSet safely
Critical: Required before Helm upgrade
volumeClaimTemplates in a StatefulSet are immutable — Helm upgrade will fail if the size in vars.monitoring.yml differs from the existing StatefulSet spec. Deleting the StatefulSet with --cascade=orphan is mandatory. This does NOT delete your pods, PVCs, or data.
Find the StatefulSet name:
| Bash | |
|---|---|
Delete StatefulSet safely — pods and PVCs are preserved:
| Bash | |
|---|---|
Verify pods are still running after deletion:
| Bash | |
|---|---|
7. Re-run the Helm upgrade
a. Go to privacera-manager directory.
| Bash | |
|---|---|
setup to generate the required files. | Bash | |
|---|---|
| Bash | |
|---|---|
install to update the Grafana. | Bash | |
|---|---|
post-install. | Bash | |
|---|---|
8. Verify pod is running
| Bash | |
|---|---|
Ensure prometheus-server-0 is in Running state with 2/2 ready containers.
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 | |
|---|---|