You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@hertzbeat.apache.org by "yulongz (via GitHub)" <gi...@apache.org> on 2026/05/07 08:12:43 UTC

[PR] fix: add missing compression config for VictoriaMetrics to resolve NPE [hertzbeat-helm-chart]

yulongz opened a new pull request, #22:
URL: https://github.com/apache/hertzbeat-helm-chart/pull/22

   **Problem Description**
   When deploying HertzBeat using the Helm Chart with VictoriaMetrics enabled as the default time-series data store, the Manager component continuously throws NullPointerException in logs, causing metric data to fail to write to VictoriaMetrics. Queries for historical monitoring data return empty values.
   
   **Reproduction Steps**
   - Deploy HertzBeat using the current Helm Chart (with victoria-metrics storage enabled by default)
   - Check Manager Pod logs, and the following error appears:
   java.lang.NullPointerException: Cannot invoke "org.apache.hertzbeat.warehouse.store.history.tsdb.vm.VictoriaMetricsProperties$Compression.enabled()" 
   because the return value of "org.apache.hertzbeat.warehouse.store.history.tsdb.vm.VictoriaMetricsProperties$InsertConfig.compression()" is null
   - Query historical metric data via API, returns values: {}
   
   
   **Root Cause Analysis**
   The warehouse.store.victoria-metrics.insert configuration node in the Manager ConfigMap template of the Helm Chart lacks the compression sub-configuration item. This causes the HertzBeat code to return null when calling insertConfig.getCompression().enabled(), which triggers the null pointer exception.
   
   **Fix Solution**
   Modify charts/hertzbeat/templates/manager/configmap.yaml to add the missing compression configuration under the victoria-metrics.insert node:
   
   ```
   insert:
     buffer-size: 100
     flush-interval: 3
     # Newly added configuration
     compression:
       enabled: false
   ```
   **Verification Results**
   After redeploying the Helm Chart, the NPE error no longer appears in Manager logs
   Metric data is written to VictoriaMetrics normally
   Historical metric data queries via API return valid values correctly
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@hertzbeat.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@hertzbeat.apache.org
For additional commands, e-mail: notifications-help@hertzbeat.apache.org


Re: [PR] fix: add missing compression config for VictoriaMetrics to resolve NPE [hertzbeat-helm-chart]

Posted by "Aias00 (via GitHub)" <gi...@apache.org>.
Aias00 merged PR #22:
URL: https://github.com/apache/hertzbeat-helm-chart/pull/22


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@hertzbeat.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@hertzbeat.apache.org
For additional commands, e-mail: notifications-help@hertzbeat.apache.org