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...) }
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...) }