AlekSi/zabbix

Host structrure should include maintenance_status

n2ux opened this issue · 0 comments

n2ux commented

The maintenance_status field of the host API should be returned as part of the host structure

`const (
Available AvailableType = 1
Unavailable AvailableType = 2

    Monitored   StatusType = 0
    Unmonitored StatusType = 1

    NotInMaint      StatusType = 0
    InMaint         StatusType = 1

)

// https://www.zabbix.com/documentation/2.2/manual/appendix/api/host/definitions
type Host struct {
HostId string json:"hostid,omitempty"
Host string json:"host"
Available AvailableType json:"available"
Error string json:"error"
Name string json:"name"
Status StatusType json:"status"
MaintenanceStatus StatusType json:"maintenance_status"

    // Fields below used only when creating hosts
    GroupIds   HostGroupIds   `json:"groups,omitempty"`
    Interfaces HostInterfaces `json:"interfaces,omitempty"`

}
`