Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prometneus_client error #402

Closed
logicall opened this issue Nov 30, 2015 · 2 comments
Closed

Prometneus_client error #402

logicall opened this issue Nov 30, 2015 · 2 comments

Comments

@logicall
Copy link

Hello!
I'm trying to run a telegraph version 0.2.2 with the plugin Prometneus_client and get this error

2015/11/30 12:52:08 Output Enabled:  influxdb-0
2015/11/30 12:52:08 Output Enabled:  prometheus_client-0
2015/11/30 12:52:08 Attempting connection to output: influxdb-0
2015/11/30 12:52:08 Successfully connected to output: influxdb-0
2015/11/30 12:52:08 Attempting connection to output: prometheus_client-0
2015/11/30 12:52:08 Successfully connected to output: prometheus_client-0
2015/11/30 12:52:08 Starting Telegraf (version 0.2.2)
2015/11/30 12:52:08 Loaded outputs: influxdb-0 prometheus_client-0
2015/11/30 12:52:08 Loaded plugins: cpu disk io mem swap system
2015/11/30 12:52:08 Tags enabled:
2015/11/30 12:52:08 Agent Config: Interval:10s, Debug:true, Hostname:"influxdb", Flush Interval:11.317380935s
2015/11/30 12:52:10 Gathered metrics, (10s interval), from 6 plugins in 10.156456ms
2015/11/30 12:52:20 Gathered metrics, (10s interval), from 6 plugins in 13.886312ms
panic: inconsistent label cardinality

goroutine 29 [running]:
github.com/prometheus/client_golang/prometheus.(*MetricVec).With(0xc82027e790, 0xc8200f04e0, 0x0, 0x0)
        /home/telebuild/go/src/github.com/influxdb/telegraf/Godeps/_workspace/src/github.com/prometheus/client_golang/prometheus/vec.go:137 +0x91
github.com/prometheus/client_golang/prometheus.(*UntypedVec).With(0xc82027e790, 0xc8200f04e0, 0x0, 0x0)
        /home/telebuild/go/src/github.com/influxdb/telegraf/Godeps/_workspace/src/github.com/prometheus/client_golang/prometheus/untyped.go:120 +0x42
github.com/influxdb/telegraf/outputs/prometheus_client.(*PrometheusClient).Write(0xc820190980, 0xc82054d000, 0x1ee, 0x200, 0x0, 0x0)
        /home/telebuild/go/src/github.com/influxdb/telegraf/outputs/prometheus_client/prometheus_client.go:96 +0x978
github.com/influxdb/telegraf.(*Agent).writeOutput(0xc820236090, 0xc82054d000, 0x1ee, 0x200, 0xc820190e80, 0xc8201a6600, 0xc820550dc0)
        /home/telebuild/go/src/github.com/influxdb/telegraf/agent.go:332 +0x116
created by github.com/influxdb/telegraf.(*Agent).flush
        /home/telebuild/go/src/github.com/influxdb/telegraf/agent.go:372 +0x117

goroutine 1 [select]:
github.com/influxdb/telegraf.(*Agent).Run(0xc820236090, 0xc8201a6600, 0x0, 0x0)
        /home/telebuild/go/src/github.com/influxdb/telegraf/agent.go:487 +0x98b
main.main()
        /home/telebuild/go/src/github.com/influxdb/telegraf/cmd/telegraf/telegraf.go:159 +0x1712

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1696 +0x1

goroutine 5 [syscall]:
os/signal.loop()
        /usr/local/go/src/os/signal/signal_unix.go:22 +0x18
created by os/signal.init.1
        /usr/local/go/src/os/signal/signal_unix.go:28 +0x37

goroutine 23 [IO wait]:
net.runtime_pollWait(0x7f0d09ec04c8, 0x72, 0xc820010200)
        /usr/local/go/src/runtime/netpoll.go:157 +0x60
net.(*pollDesc).Wait(0xc820113db0, 0x72, 0x0, 0x0)
        /usr/local/go/src/net/fd_poll_runtime.go:73 +0x3a
net.(*pollDesc).WaitRead(0xc820113db0, 0x0, 0x0)
        /usr/local/go/src/net/fd_poll_runtime.go:78 +0x36
net.(*netFD).accept(0xc820113d50, 0x0, 0x7f0d0cd07eb0, 0xc8203b5540)
        /usr/local/go/src/net/fd_unix.go:408 +0x27c
net.(*TCPListener).AcceptTCP(0xc82002c198, 0x4528f0, 0x0, 0x0)
        /usr/local/go/src/net/tcpsock_posix.go:254 +0x4d
net/http.tcpKeepAliveListener.Accept(0xc82002c198, 0x0, 0x0, 0x0, 0x0)
        /usr/local/go/src/net/http/server.go:2135 +0x41
net/http.(*Server).Serve(0xc8201a65a0, 0x7f0d0cd07e78, 0xc82002c198, 0x0, 0x0)
        /usr/local/go/src/net/http/server.go:1887 +0xb3
net/http.(*Server).ListenAndServe(0xc8201a65a0, 0x0, 0x0)
        /usr/local/go/src/net/http/server.go:1877 +0x136
created by github.com/influxdb/telegraf/outputs/prometheus_client.(*PrometheusClient).Start
        /home/telebuild/go/src/github.com/influxdb/telegraf/outputs/prometheus_client/prometheus_client.go:33 +0x14a

goroutine 24 [select, locked to thread]:
runtime.gopark(0x10921b8, 0xc8202bef28, 0xec5110, 0x6, 0x18, 0x2)
        /usr/local/go/src/runtime/proc.go:185 +0x163
runtime.selectgoImpl(0xc8202bef28, 0x0, 0x18)
        /usr/local/go/src/runtime/select.go:392 +0xa64
runtime.selectgo(0xc8202bef28)
        /usr/local/go/src/runtime/select.go:212 +0x12
runtime.ensureSigM.func1()
        /usr/local/go/src/runtime/signal1_unix.go:227 +0x353
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1696 +0x1

goroutine 25 [chan receive]:
main.main.func1(0xc8201a6660, 0xc8201a6600)
        /home/telebuild/go/src/github.com/influxdb/telegraf/cmd/telegraf/telegraf.go:139 +0x36
created by main.main
        /home/telebuild/go/src/github.com/influxdb/telegraf/cmd/telegraf/telegraf.go:141 +0x1031

goroutine 10 [select]:
github.com/influxdb/telegraf.(*Agent).flusher(0xc820236090, 0xc8201a6600, 0xc8201a67e0, 0x0, 0x0)
        /home/telebuild/go/src/github.com/influxdb/telegraf/agent.go:389 +0x448
github.com/influxdb/telegraf.(*Agent).Run.func1(0xc82027c330, 0xc820236090, 0xc8201a6600, 0xc8201a67e0)
        /home/telebuild/go/src/github.com/influxdb/telegraf/agent.go:448 +0x7f
created by github.com/influxdb/telegraf.(*Agent).Run
        /home/telebuild/go/src/github.com/influxdb/telegraf/agent.go:452 +0x41f

goroutine 28 [select]:
net/http.(*persistConn).roundTrip(0xc820130160, 0xc820370c60, 0x0, 0x0, 0x0)
        /usr/local/go/src/net/http/transport.go:1164 +0xb0d
net/http.(*Transport).RoundTrip(0xc820236120, 0xc8201da000, 0xa8, 0x0, 0x0)
        /usr/local/go/src/net/http/transport.go:235 +0x530
net/http.send(0xc8201da000, 0x7f0d0cd074d8, 0xc820236120, 0xc820195ef0, 0x0, 0x0)
        /usr/local/go/src/net/http/client.go:220 +0x52c
net/http.(*Client).send(0xc8201885a0, 0xc8201da000, 0x44, 0x0, 0x0)
        /usr/local/go/src/net/http/client.go:143 +0x15a
net/http.(*Client).doFollowingRedirects(0xc8201885a0, 0xc8201da000, 0x1091d80, 0x0, 0x0, 0x0)
        /usr/local/go/src/net/http/client.go:380 +0xbc0
net/http.(*Client).Do(0xc8201885a0, 0xc8201da000, 0x28, 0x0, 0x0)
        /usr/local/go/src/net/http/client.go:178 +0x188
github.com/influxdb/influxdb/client/v2.(*client).Write(0xc820192440, 0x7f0d09e7bb30, 0xc82037a9c0, 0x0, 0x0)
        /home/telebuild/go/src/github.com/influxdb/telegraf/Godeps/_workspace/src/github.com/influxdb/influxdb/client/v2/client.go:382 +0x8e5
github.com/influxdb/telegraf/outputs/influxdb.(*InfluxDB).Write(0xc82023c000, 0xc82054d000, 0x1ee, 0x200, 0x0, 0x0)
        /home/telebuild/go/src/github.com/influxdb/telegraf/outputs/influxdb/influxdb.go:145 +0x3aa
github.com/influxdb/telegraf.(*Agent).writeOutput(0xc820236090, 0xc82054d000, 0x1ee, 0x200, 0xc820190e40, 0xc8201a6600, 0xc820550dc0)
        /home/telebuild/go/src/github.com/influxdb/telegraf/agent.go:332 +0x116
created by github.com/influxdb/telegraf.(*Agent).flush
        /home/telebuild/go/src/github.com/influxdb/telegraf/agent.go:372 +0x117

goroutine 31 [IO wait]:
net.runtime_pollWait(0x7f0d09ec0408, 0x72, 0xc820010200)
        /usr/local/go/src/runtime/netpoll.go:157 +0x60
net.(*pollDesc).Wait(0xc8200bc3e0, 0x72, 0x0, 0x0)
        /usr/local/go/src/net/fd_poll_runtime.go:73 +0x3a
net.(*pollDesc).WaitRead(0xc8200bc3e0, 0x0, 0x0)
        /usr/local/go/src/net/fd_poll_runtime.go:78 +0x36
net.(*netFD).Read(0xc8200bc380, 0xc820019000, 0x1000, 0x1000, 0x0, 0x7f0d0cd03050, 0xc820010200)
        /usr/local/go/src/net/fd_unix.go:232 +0x23a
net.(*conn).Read(0xc82018e048, 0xc820019000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
        /usr/local/go/src/net/net.go:172 +0xe4
net/http.noteEOFReader.Read(0x7f0d09ec0588, 0xc82018e048, 0xc8201301b8, 0xc820019000, 0x1000, 0x1000, 0xc8201a7860, 0x0, 0x0)
        /usr/local/go/src/net/http/transport.go:1370 +0x67
net/http.(*noteEOFReader).Read(0xc82038da80, 0xc820019000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
        <autogenerated>:126 +0xd0
bufio.(*Reader).fill(0xc8201a7740)
        /usr/local/go/src/bufio/bufio.go:97 +0x1e9
bufio.(*Reader).Peek(0xc8201a7740, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0)
        /usr/local/go/src/bufio/bufio.go:132 +0xcc
net/http.(*persistConn).readLoop(0xc820130160)
        /usr/local/go/src/net/http/transport.go:876 +0xf7
created by net/http.(*Transport).dialConn
        /usr/local/go/src/net/http/transport.go:685 +0xc78

goroutine 32 [select]:
net/http.(*persistConn).writeLoop(0xc820130160)
        /usr/local/go/src/net/http/transport.go:1009 +0x40c
created by net/http.(*Transport).dialConn
        /usr/local/go/src/net/http/transport.go:686 +0xc9d

Here is my config

[agent]
  interval = "10s"
  round_interval = true
  flush_interval = "10s"
  flush_jitter = "5s"
  flush_retries = 2
  debug = false
  hostname = ""

[outputs]
[[outputs.influxdb]]
  urls = ["http://localhost:8086"] # required.
  database = "telegraf" # required.
  precision = "s"

[[outputs.prometheus_client]]
    listen = ":9126"

[cpu]
  percpu = true
  totalcpu = true
  drop = ["cpu_time"]
[disk]
[io]
[mem]
[swap]
[system]
@sparrc
Copy link
Contributor

sparrc commented Nov 30, 2015

Closing as a duplicate of #389, which will be fixed in 0.2.3, thanks for the report!

@sparrc sparrc closed this as completed Nov 30, 2015
@sparrc
Copy link
Contributor

sparrc commented Dec 1, 2015

@logicall 0.2.3 is now available on the README

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants