pvdh / munin_exporter Goto Github PK
View Code? Open in Web Editor NEWMaking munin-data accessible to prometheus.io
License: MIT License
Making munin-data accessible to prometheus.io
License: MIT License
go build
# munin_exporter
./munin_exporter.go:262: counterPerMetric[name].WithLabelValues(hostname, graph, key).Set undefined (type prometheus.Counter has no field or method Set)
go build
./munin_exporter.go:51:30: undefined: prometheus.Handler
Sorry I am not familiar with go. How do I build this app? A hint in the Readme would be helpful.
I installed go in version 1.9.2 on a mac with brew install go
and run:
go get github.com/pvdh/munin_exporter
which outputs:
package bufio: unrecognized import path "bufio" (import path does not begin with hostname)
package flag: unrecognized import path "flag" (import path does not begin with hostname)
package fmt: unrecognized import path "fmt" (import path does not begin with hostname)
package bytes: unrecognized import path "bytes" (import path does not begin with hostname)
package compress/gzip: unrecognized import path "compress/gzip" (import path does not begin with hostname)
package encoding/json: unrecognized import path "encoding/json" (import path does not begin with hostname)
package errors: unrecognized import path "errors" (import path does not begin with hostname)
package expvar: unrecognized import path "expvar" (import path does not begin with hostname)
package math: unrecognized import path "math" (import path does not begin with hostname)
package sort: unrecognized import path "sort" (import path does not begin with hostname)
package encoding: unrecognized import path "encoding" (import path does not begin with hostname)
package io: unrecognized import path "io" (import path does not begin with hostname)
package log: unrecognized import path "log" (import path does not begin with hostname)
package os: unrecognized import path "os" (import path does not begin with hostname)
package reflect: unrecognized import path "reflect" (import path does not begin with hostname)
package strconv: unrecognized import path "strconv" (import path does not begin with hostname)
package strings: unrecognized import path "strings" (import path does not begin with hostname)
package sync: unrecognized import path "sync" (import path does not begin with hostname)
package unicode/utf8: unrecognized import path "unicode/utf8" (import path does not begin with hostname)
package unsafe: unrecognized import path "unsafe" (import path does not begin with hostname)
package encoding/binary: unrecognized import path "encoding/binary" (import path does not begin with hostname)
package regexp: unrecognized import path "regexp" (import path does not begin with hostname)
package time: unrecognized import path "time" (import path does not begin with hostname)
package mime: unrecognized import path "mime" (import path does not begin with hostname)
package net/http: unrecognized import path "net/http" (import path does not begin with hostname)
package encoding/hex: unrecognized import path "encoding/hex" (import path does not begin with hostname)
package io/ioutil: unrecognized import path "io/ioutil" (import path does not begin with hostname)
package net: unrecognized import path "net" (import path does not begin with hostname)
package path: unrecognized import path "path" (import path does not begin with hostname)
package runtime: unrecognized import path "runtime" (import path does not begin with hostname)
package runtime/debug: unrecognized import path "runtime/debug" (import path does not begin with hostname)
package sync/atomic: unrecognized import path "sync/atomic" (import path does not begin with hostname)
I have a munin_exporter running on http://127.0.0.1:9999/metrics, the values exported from munin and added by munin_exporter are the same but not match with the values listed by the exporter and them into the prometheus db
Ex:
a.- Fetch values of CPU plugin from munin
user.value 16962807
nice.value 42162
system.value 4364036
idle.value 1426443347
iowait.value 8289865
irq.value 140
softirq.value 48117
steal.value 8780807
guest.value 0
b.- Values logged (added) by munin_exporter
2017/11/07 17:55:26 cpu_user: 16962744.000000
2017/11/07 17:55:26 cpu_nice: 42162.000000
2017/11/07 17:55:26 cpu_system: 4363982.000000
2017/11/07 17:55:26 cpu_idle: 1426440545.000000
2017/11/07 17:55:26 cpu_iowait: 8289863.000000
2017/11/07 17:55:26 cpu_irq: 140.000000
2017/11/07 17:55:26 cpu_softirq: 48117.000000
2017/11/07 17:55:26 cpu_steal: 8780763.000000
2017/11/07 17:55:26 cpu_guest: 0.000000
c.- Values displaying at http://127.0.0.1:9999/metrics
# HELP cpu_guest CPU usage: guest, The time spent running a virtual CPU for guest operating systems under the control of the Linux kernel.
# TYPE cpu_guest counter
cpu_guest{graphname="cpu",hostname="newfedra.ud.nohup.it",muninlabel="guest",type="derive"} 0
# HELP cpu_idle CPU usage: idle, Idle CPU time
# TYPE cpu_idle counter
cpu_idle{graphname="cpu",hostname="newfedra.ud.nohup.it",muninlabel="idle",type="derive"} 1.70992541578e+11
# HELP cpu_iowait CPU usage: iowait, CPU time spent waiting for I/O operations to finish when there is nothing else to do.
# TYPE cpu_iowait counter
cpu_iowait{graphname="cpu",hostname="newfedra.ud.nohup.it",muninlabel="iowait",type="derive"} 9.94513336e+08
# HELP cpu_irq CPU usage: irq, CPU time spent handling interrupts
# TYPE cpu_irq counter
cpu_irq{graphname="cpu",hostname="newfedra.ud.nohup.it",muninlabel="irq",type="derive"} 16800
# HELP cpu_nice CPU usage: nice, CPU time spent by nice(1)d programs
# TYPE cpu_nice counter
cpu_nice{graphname="cpu",hostname="newfedra.ud.nohup.it",muninlabel="nice",type="derive"} 5.05944e+06
# HELP cpu_softirq CPU usage: softirq, CPU time spent handling "batched" interrupts
# TYPE cpu_softirq counter
cpu_softirq{graphname="cpu",hostname="newfedra.ud.nohup.it",muninlabel="softirq",type="derive"} 5.765193e+06
# HELP cpu_steal CPU usage: steal, The time that a virtual CPU had runnable tasks, but the virtual CPU itself was not running
# TYPE cpu_steal counter
cpu_steal{graphname="cpu",hostname="newfedra.ud.nohup.it",muninlabel="steal",type="derive"} 1.05243819e+09
# HELP cpu_system CPU usage: system, CPU time spent by the kernel in system activities
# TYPE cpu_system counter
cpu_system{graphname="cpu",hostname="newfedra.ud.nohup.it",muninlabel="system",type="derive"} 5.22904571e+08
# HELP cpu_user CPU usage: user, CPU time spent by normal programs and daemons
# TYPE cpu_user counter`
```
This issue is only with the type "derive" with "gauge" the values are ok.
Prometheus 1.8.1
munin-node v2.0.33
in fetchMetrics() it is assumed that if a something isn't a gauge it is a counter however found plugins where config shows fewer items than fetch .
A munin-plugin may report "U" (undefined) as a value if for some reason the plugin can't provide a correct one.
I'm not sure this is handled correctly in munin_exporter.
Can you use this to import all the historic data from munin to prometheus?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.