Beispiel #1
0
func screenExport(c *cli.Context) {
	client := zabbix.NewClient(zabbixHost, zabbixUser, zabbixPass)
	client.Login()

	screens, err := client.ScreenList()
	if err != nil {
		log.LogError(err)
	}
	fmt.Printf("screens = %+v\n", screens)

	client.ScreenExport(c.String("dir"), "json", screens...)
}
Beispiel #2
0
func templateExport(c *cli.Context) {
	client := zabbix.NewClient(zabbixHost, zabbixUser, zabbixPass)
	client.Login()

	templates, err := client.TemplateList()
	if err != nil {
		log.LogError(err)
	}

	fmt.Printf("templates = %+v\n", templates)
	client.TemplateExport(c.String("dir"), "json", templates...)
}