← All dashboards

Badger

Dashboard for badger exported metrics.

Since badger doesn’t export native prometheus metrics you need to use a expvar collector.

Here is how to build a collector which works with this dashboard:

badgerExpvarCollector := prometheus.NewExpvarCollector(map[string]*prometheus.Desc{
	"badger_blocked_puts_total":   prometheus.NewDesc("badger_blocked_puts_total", "Blocked Puts", nil, nil),
	"badger_disk_reads_total":     prometheus.NewDesc("badger_disk_reads_total", "Disk Reads", nil, nil),
	"badger_disk_writes_total":    prometheus.NewDesc("badger_disk_writes_total", "Disk Writes", nil, nil),
	"badger_gets_total":           prometheus.NewDesc("badger_gets_total", "Gets", nil, nil),
	"badger_puts_total":           prometheus.NewDesc("badger_puts_total", "Puts", nil, nil),
	"badger_memtable_gets_total":  prometheus.NewDesc("badger_memtable_gets_total", "Memtable gets", nil, nil),
	"badger_lsm_size_bytes":       prometheus.NewDesc("badger_lsm_size_bytes", "LSM Size in bytes", []string{"database"}, nil),
	"badger_vlog_size_bytes":      prometheus.NewDesc("badger_vlog_size_bytes", "Value Log Size in bytes", []string{"database"}, nil),
	"badger_pending_writes_total": prometheus.NewDesc("badger_pending_writes_total", "Pending Writes", []string{"database"}, nil),
	"badger_read_bytes":           prometheus.NewDesc("badger_read_bytes", "Read bytes", nil, nil),
	"badger_written_bytes":        prometheus.NewDesc("badger_written_bytes", "Written bytes", nil, nil),
	"badger_lsm_bloom_hits_total": prometheus.NewDesc("badger_lsm_bloom_hits_total", "LSM Bloom Hits", []string{"level"}, nil),
	"badger_lsm_level_gets_total": prometheus.NewDesc("badger_lsm_level_gets_total", "LSM Level Gets", []string{"level"}, nil),
})
prometheus.MustRegister(badgerExpvarCollector)

Note: this is not official and I am unaffiliated with dgraph and/or badger. Don’t bother them if this dashboard doesn’t work, instead leave me a message on Twitter

Dashboard revisions

RevisionDecscriptionCreated

Reviews

Login or Sign up to write a review

Reviews from the community
Sign up for Grafana Cloud
Tooltip hover

Get this dashboard

Data source:

Dependencies:

Import the dashboard template:

or

Download JSON

Docs: Importing dashboards

Downloads: 286