This repository was archived by the owner on Apr 2, 2024. It is now read-only.
Commit 03ef564 1 parent c9495db commit 03ef564 Copy full SHA for 03ef564
File tree 1 file changed +7
-0
lines changed
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 100
100
SELECT _prom_catalog .get_default_value (' chunk_interval' ) INTO result;
101
101
PERFORM _ps_catalog .apply_telemetry (' metrics_default_chunk_interval' , result);
102
102
103
+ -- Metric downsampling.
104
+ SELECT prom_api .get_automatic_downsample ()::TEXT INTO result;
105
+ PERFORM _ps_catalog .apply_telemetry (' metrics_automatic_downsampling_enabled' , result);
106
+
107
+ SELECT array_agg(resolution || ' :' || retention)::TEXT INTO result FROM _prom_catalog .rollup ; -- Example: {00:05:00:720:00:00,01:00:00:8760:00:00} => {HH:MM:SS}
108
+ PERFORM _ps_catalog .apply_telemetry (' metrics_automatic_downsampling_resolutions' , result);
109
+
103
110
IF ( SELECT count (* )> 0 FROM _prom_catalog .metric WHERE metric_name = ' prometheus_tsdb_head_series' ) THEN
104
111
-- Calculate active series in Promscale. This is done by taking the help of the Prometheus metric 'prometheus_tsdb_head_series'.
105
112
-- An active series for Promscale is basically sum of active series of all Prometheus instances writing into Promscale
You can’t perform that action at this time.
0 commit comments