func (m MurmurPlugin) GraphDefinition() map[string]mp.Graphs {
	return graphdef
}
GraphDefinition interface for mackerelplugin
package mpmurmur
import (
	"flag"
	"fmt"
	"time"
	mp "github.com/mackerelio/go-mackerel-plugin-helper"
	"layeh.com/gumble/gumble"
)
var graphdef = map[string]mp.Graphs{
	"murmur.connections": {
		Label: "Murmur Connections",
		Unit:  "integer",
		Metrics: []mp.Metrics{
			{Name: "con_cur", Label: "Current users", Diff: false, Type: "uint32"},
			{Name: "con_max", Label: "Maximum users", Diff: false, Type: "uint32"},
		},
	},
}
type MurmurPlugin struct {
	Host    string
	Timeout uint64
}
func (m MurmurPlugin) FetchMetrics() (map[string]interface{}, error) {
	resp, err := gumble.Ping(m.Host, 0, time.Millisecond*time.Duration(m.Timeout))
	if err != nil {
		return nil, err
	}
	metrics := map[string]interface{}{
		"con_cur": uint32(resp.ConnectedUsers),
		"con_max": uint32(resp.MaximumUsers),
	}
	return metrics, nil
}