Badger

Dashboard

Last updated: 3 months ago

Downloads: 7

  • Screenshot from 2018-12-26 22-08-42.png
    Screenshot from 2018-12-26 22-08-42.png
  • Screenshot from 2018-12-26 22-08-11.png
    Screenshot from 2018-12-26 22-08-11.png
  • Screenshot from 2018-12-26 22-08-27.png
    Screenshot from 2018-12-26 22-08-27.png
  • Screenshot from 2019-01-03 17-32-28.png
    Screenshot from 2019-01-03 17-32-28.png

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