예제 #1
0
파일: dummy.go 프로젝트: cavaliercoder/g2z
// init is a mandatory initialization function which must be used exclusively to register Zabbix
// module function handlers. It is called when Zabbix calls `dlopen()` to load this Go module.
//
// No other work should be performed in this function. All other initialization activities should
// be executed with an InitHandlerFunc.
func init() {
	g2z.RegisterInitHandler(InitModule)
	g2z.RegisterUninitHandler(UninitModule)

	g2z.RegisterUint64Item("go.ping", "", Ping)
	g2z.RegisterStringItem("go.echo", "Hello,world!", Echo)
	g2z.RegisterDoubleItem("go.random", "0,100", Random)
	g2z.RegisterDiscoveryItem("go.cpu.discovery", "", DiscoverCpus)
	g2z.RegisterStringItem("go.version", "", Version)
}
예제 #2
0
func init() {
	g2z.RegisterDiscoveryItem("go.discovery", "", Discover)
}