timescale/promscale

error filling labels: ERROR: column "series_id" specified more than once (SQLSTATE 42701)

Takalele opened this issue · 3 comments

Hi,

i just installed promescale and timescale via docker-compose but unfortunately the prometheus data dont get ingested into timescale via promescale - i'm only getting the following error:
promescale:
level=warn ts=2022-10-05T11:07:35.698Z caller=write.go:244 msg="Error sending samples to remote storage" err="copier: writing series: error setting series ids: error filling labels: ERROR: column \"series_id\" specified more than once (SQLSTATE 42701)" num_samples=30000

timescale:
2022-10-05 11:16:52.915 UTC [1544] STATEMENT: SELECT * FROM _prom_catalog.get_or_create_label_ids($1, $2, $3, $4) 2022-10-05 11:16:55.208 UTC [1545] ERROR: column "series_id" specified more than once 2022-10-05 11:16:55.208 UTC [1545] CONTEXT: SQL statement " CREATE OR REPLACE VIEW prom_metric."cieIfLastOutHangTime" AS SELECT data.time as time, data.value as value, data.series_id AS series_id, series.labels ,series.labels[2] AS "ifAlias_id", series.labels[3] AS "ifDescr_id", series.labels[4] AS "ifIndex_id", series.labels[5] AS "ifName_id", series.labels[6] AS instance_id, series.labels[7] AS job_id, series.labels[8] AS linecards_id, series.labels[9] AS location_id, series.labels[10] AS model_id, series.labels[11] AS name_id, series.labels[12] AS platform_id, series.labels[13] AS prometheus_id, series.labels[14] AS series_id, series.labels[15] AS service_id, series.labels[16] AS stackmembers_id FROM prom_data."cieIfLastOutHangTime" AS data LEFT JOIN prom_data_series."cieIfLastOutHangTime" AS series ON (series.id = data.series_id) " PL/pgSQL function _prom_catalog.create_metric_view(text) line 28 at EXECUTE SQL statement "SELECT _prom_catalog.create_metric_view(metric_name)" PL/pgSQL function _prom_catalog.get_new_pos_for_key(text,text,text[],boolean) line 110 at PERFORM SQL function "get_or_create_label_ids" statement 1 2022-10-05 11:16:55.208 UTC [1545] STATEMENT: SELECT * FROM _prom_catalog.get_or_create_label_ids($1, $2, $3, $4)

any ideas?

BR
Takalele

Hi @Takalele I just took a quick look into the body of _prom_catalog.create_metric_view. It adds extra columns for the labels associated with a metric. It looks as though the metric that you're ingesting must contain a label named series_id. Is that possible?

I managed to recreate the issue and filed a bug in the extension #1685

@Takalele I'm closing this and we can track it on the extension issue