{"record":{"id":"5acac03339b0df25","repo":"thanos-io/thanos","slug":"no-external-labels-configured-for-receive-uniquel","errorCode":null,"errorMessage":"no external labels configured for receive, uniquely identifying external labels must be configured (ideally with `receive_` prefix); see https://thanos.io/tip/thanos/storage.md#external-labels for details.","messagePattern":"no external labels configured for receive, uniquely identifying external labels must be configured \\(ideally with `receive_` prefix\\); see https://thanos\\.io/tip/thanos/storage\\.md#external-labels for details\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/thanos/receive.go","lineNumber":82,"sourceCode":")\n\nfunc registerReceive(app *extkingpin.App) {\n\tcmd := app.Command(component.Receive.String(), \"Accept Prometheus remote write API requests and write to local tsdb.\")\n\n\tconf := &receiveConfig{}\n\tconf.registerFlag(cmd)\n\n\tcmd.Setup(func(g *run.Group, logger log.Logger, reg *prometheus.Registry, tracer opentracing.Tracer, _ <-chan struct{}, debugLogging bool) error {\n\t\tlset, err := parseFlagLabels(conf.labelStrs)\n\t\tif err != nil {\n\t\t\treturn errors.Wrap(err, \"parse labels\")\n\t\t}\n\n\t\tif !model.UTF8Validation.IsValidLabelName(conf.tenantLabelName) {\n\t\t\treturn errors.Errorf(\"unsupported format for tenant label name, got %s\", conf.tenantLabelName)\n\t\t}\n\t\tif lset.Len() == 0 {\n\t\t\treturn errors.New(\"no external labels configured for receive, uniquely identifying external labels must be configured (ideally with `receive_` prefix); see https://thanos.io/tip/thanos/storage.md#external-labels for details.\")\n\t\t}\n\n\t\tgrpcLogOpts, logFilterMethods, err := logging.ParsegRPCOptions(conf.reqLogConfig)\n\n\t\tif err != nil {\n\t\t\treturn errors.Wrap(err, \"error while parsing config for request logging\")\n\t\t}\n\n\t\ttsdbOpts := &tsdb.Options{\n\t\t\tMinBlockDuration:               int64(time.Duration(*conf.tsdbMinBlockDuration) / time.Millisecond),\n\t\t\tMaxBlockDuration:               int64(time.Duration(*conf.tsdbMaxBlockDuration) / time.Millisecond),\n\t\t\tRetentionDuration:              int64(time.Duration(*conf.retention) / time.Millisecond),\n\t\t\tOutOfOrderTimeWindow:           int64(time.Duration(*conf.tsdbOutOfOrderTimeWindow) / time.Millisecond),\n\t\t\tMaxBytes:                       int64(conf.tsdbMaxBytes),\n\t\t\tOutOfOrderCapMax:               conf.tsdbOutOfOrderCapMax,\n\t\t\tNoLockfile:                     conf.noLockFile,\n\t\t\tWALCompression:                 compressutil.ParseCompressionType(conf.walCompression, compression.Snappy),\n\t\t\tMaxExemplars:                   conf.tsdbMaxExemplars,","sourceCodeStart":64,"sourceCodeEnd":100,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/cmd/thanos/receive.go#L64-L100","documentation":"Error \"no external labels configured for receive, uniquely identifying external labels must be configured (ideally with `receive_` prefix); see https://thanos.io/tip/thanos/storage.md#external-labels for details.\" thrown in thanos-io/thanos.","triggerScenarios":"Thrown at cmd/thanos/receive.go:82 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Configure external labels via --label, e.g. --label=receive_replica=$(HOSTNAME)","Ensure labels uniquely identify this receive instance and ideally use the receive_ prefix","See the Thanos storage.md external labels docs"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"35b8b991177def87ed52dcf10f9b6d87f07282c8","analyzedAt":"2026-09-07T01:49:59.689Z","contentChangedAt":"2026-09-07T01:49:59.689Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}