beanstalkd_exporter
beanstalkd_exporter copied to clipboard
Inconsistent label cardinality error with mappings
I am trying to start Beanstalkd exporter and getting the following error:
# prometheus-beanstalkd-exporter -mapping-config='/etc/prometheus/beanstalkd_mappings.conf'
panic: inconsistent label cardinality
goroutine 8 [running]:
github.com/prometheus/client_golang/prometheus.(*MetricVec).With(...)
/Users/felix/go/pkg/mod/github.com/prometheus/[email protected]/prometheus/vec.go:146
github.com/prometheus/client_golang/prometheus.(*GaugeVec).With(0xc000188168, 0xc000280d50, 0x0, 0x0)
/Users/felix/go/pkg/mod/github.com/prometheus/[email protected]/prometheus/gauge.go:115 +0xa4
main.(*Exporter).statTube(0xc000206000, 0xc00006e0a0, 0xc00001e9e0, 0x1b, 0x0, 0x0, 0x0)
/Users/felix/Projects/github.com/messagebird/beanstalkd_exporter/exporter.go:296 +0x690
main.(*Exporter).scrapeWorker.func1(0xc0002ca0c0, 0x2, 0xc00001e9e0, 0x1b, 0xc000206000, 0xc00006e0a0)
/Users/felix/Projects/github.com/messagebird/beanstalkd_exporter/exporter.go:234 +0xe1
created by main.(*Exporter).scrapeWorker
/Users/felix/Projects/github.com/messagebird/beanstalkd_exporter/exporter.go:224 +0x8e
These are the contents of my /etc/prometheus/beanstalkd_mappings.conf file:
popeyelive\.activity_regenerator
service_name="popeye"
environment="production"
name="activity_regenerator"
popeyelive\.apisubscriber
service_name="popeye"
environment="production"
name="apisubscriber"
popeyelive\.availability_regenerator
service_name="popeye"
environment="production"
name="availability_regenerator"
popeyelive\.boatwizard_importer
service_name="popeye"
environment="production"
name="boatwizard_importer"
popeyelive\.boat_regenerator
service_name="popeye"
environment="production"
name="boat_regenerator"
popeyelive\.channeler
service_name="popeye"
environment="production"
name="channeler"
popeyelive\.contract_updater
service_name="popeye"
environment="production"
name="contract_updater"
popeyelive\.eugene
service_name="popeye"
environment="production"
name="eugene"
popeyelive\.invalidator
service_name="popeye"
environment="production"
name="invalidator"
popeyelive\.invoice_exporter
service_name="popeye"
environment="production"
name="invoice_exporter"
popeyelive\.mail_queue
service_name="popeye"
environment="production"
name="mail_queue"
popeyelive\.notificator
service_name="popeye"
environment="production"
name="notificator"
popeyelive\.regenerator
service_name="popeye"
environment="production"
name="regenerator"
popeyelive\.reservations_list
service_name="popeye"
environment="production"
name="reservations_list"
popeyelive\.resizer
service_name="popeye"
environment="production"
name="resizer"
popeyelive\.zapper
service_name="popeye"
environment="production"
name="zapper"
popeyelive\.zipper
service_name="popeye"
environment="production"
name="zipper"
I have also tried the following configuration of my mappings file:
popeyelive\.([a-zA-Z_-][a-zA-Z0-9_-]+)
service_name="popeye"
environment="production"
name="$1"
But then I would get this error:
FATA[0000] Error loading mapping config:Line 3: tube name '$1' doesn't match regex '^[a-zA-Z_-][a-zA-Z0-9_-]+$' source="main.go:73"
Could someone spot the problem?