Skip to content
ClickHouse Docs
ClickHouse DocsClickHouse Docs

system_* session settings

These settings are available in system.settings and are autogenerated from source.

system_events_show_zero_values

Type
Bool
Default
0

Allows to select zero-valued events from system.events.

Some monitoring systems require passing all the metrics values to them for each checkpoint, even if the metric value is zero.

Possible values:

  • 0 — Disabled.
  • 1 — Enabled.

Examples

Query

SELECT * FROM system.events WHERE event='QueryMemoryLimitExceeded';

Result

Ok.

Query

SET system_events_show_zero_values = 1;
SELECT * FROM system.events WHERE event='QueryMemoryLimitExceeded';

Result

┌─event────────────────────┬─value─┬─description───────────────────────────────────────────┐
│ QueryMemoryLimitExceeded │     0 │ Number of times when memory limit exceeded for query. │
└──────────────────────────┴───────┴───────────────────────────────────────────────────────┘

system_metric_log_show_zero_values_in_histograms

Type
Bool
Default
0
Version history
VersionDefault valueComment
26.50New setting controlling whether zero-valued histogram data is written to the histograms nested column of system.metric_log.

Controls whether zero-valued histogram data is written to the histograms nested column of system.metric_log.

By default, histograms whose total observation count is zero are skipped, and within each emitted histogram, bucket entries with no observations are also omitted from the histogram map. Enable this to write every histogram and every bucket regardless of count — useful for monitoring systems that require every metric to appear at every checkpoint.

Possible values:

  • 0 — Disabled. Histograms with count = 0 are not emitted; emitted histograms include only buckets that received at least one observation.
  • 1 — Enabled. All histograms are written, and every bucket boundary appears in histogram.
Navigation