initial fix
This commit is contained in:
@@ -494,13 +494,7 @@ func (ds *Zabbix) GetAllGroups(ctx context.Context) ([]Group, error) {
|
||||
params := ZabbixAPIParams{
|
||||
"output": []string{"name", "groupid"},
|
||||
"sortfield": "name",
|
||||
}
|
||||
|
||||
// Zabbix v7.0 and later removed `real_hosts` parameter and replaced it with `with_hosts`
|
||||
if ds.version < 70 {
|
||||
params["real_hosts"] = true
|
||||
} else {
|
||||
params["with_hosts"] = true
|
||||
"with_hosts": true,
|
||||
}
|
||||
|
||||
result, err := ds.Request(ctx, &ZabbixAPIRequest{Method: "hostgroup.get", Params: params})
|
||||
|
||||
Reference in New Issue
Block a user