forked from claranet/go-zabbix-api
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhost_interface.go
35 lines (30 loc) · 971 Bytes
/
host_interface.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package zabbix
type (
// InterfaceType different interface type
InterfaceType int
)
const (
// Differente type of zabbix interface
// see "type" in https://www.zabbix.com/documentation/3.2/manual/api/reference/hostinterface/object
// Agent type
Agent InterfaceType = 1
// SNMP type
SNMP InterfaceType = 2
// IPMI type
IPMI InterfaceType = 3
// JMX type
JMX InterfaceType = 4
)
// HostInterface represents zabbix host interface type
// https://www.zabbix.com/documentation/3.2/manual/api/reference/hostinterface/object
type HostInterface struct {
InterfaceID string `json:"interfaceid,omitempty"`
DNS string `json:"dns"`
IP string `json:"ip"`
Main int `json:"main,string"`
Port string `json:"port"`
Type InterfaceType `json:"type,string"`
UseIP int `json:"useip,string"`
}
// HostInterfaces is an array of HostInterface
type HostInterfaces []HostInterface