Documentation
¶
Index ¶
- type ActiveAvailableEnum
- type CommonGetParams
- type GroupId
- type HosGroupImpl
- func (hg *HosGroupImpl) Create(params HostGroupCreate) (rsp string, err error)
- func (hg *HosGroupImpl) Delete(hostgroupIds []string) (rsp []string, err error)
- func (hg *HosGroupImpl) Get(params HostGroupGet) (res []HostGroupModel, err error)
- func (hg *HosGroupImpl) MassAdd(params HostGroupMassAdd) (rsp *HostGroupIdResponse, err error)
- func (hg *HosGroupImpl) MassRemove(params HostGroupMassRemove) (rsp *HostGroupIdResponse, err error)
- func (hg *HosGroupImpl) MassUpdate(params HostGroupMassUpdate) (rsp *HostGroupIdResponse, err error)
- func (hg *HosGroupImpl) Update(params HostGroupUpdate) (rsp string, err error)
- type HostCreate
- type HostGet
- type HostGroupCreate
- type HostGroupGet
- type HostGroupIdResponse
- type HostGroupMassAdd
- type HostGroupMassRemove
- type HostGroupMassUpdate
- type HostGroupModel
- type HostGroupUpdate
- type HostId
- type HostInterfaceAvailableEnum
- type HostInterfaceEnum
- type HostIpEnum
- type HostModel
- type HostStatusEnum
- type InterfaceCreate
- type Macro
- type MonitoredByEnum
- type Request
- type Response
- type Tag
- type TemplatedId
- type ZbxAPI
- type ZbxApiError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActiveAvailableEnum ¶
type ActiveAvailableEnum uint8
const ( Unknown ActiveAvailableEnum = 0 Available ActiveAvailableEnum = 1 )
type CommonGetParams ¶
type CommonGetParams struct { CountOutput bool `json:"countOutput,omitempty"` // Return the number of records in the result instead of the actual data Editable bool `json:"editable,omitempty"` // If set to true return only objects that the user has write permissions to. ExcludeSearch bool `json:"excludeSearch,omitempty"` // Return results that do not match the criteria given in the search parameter. Filter map[string]any `json:"filter,omitempty"` // Filter the result. Limit int `json:"limit,omitempty"` // Limit the number of records returned. Output []string `json:"output,omitempty"` // Return only the given fields in the result. PreserveKeys bool `json:"preservekeys,omitempty"` // Use IDs as keys in the resulting array. Search []string `json:"search,omitempty"` // Search for records that match the given criteria. SearchByAny bool `json:"searchByAny,omitempty"` // Search for records that match any of the given criteria. Sort []string `json:"sort,omitempty"` // Sort the result. }
type HosGroupImpl ¶
type HosGroupImpl struct {
// contains filtered or unexported fields
}
func (*HosGroupImpl) Create ¶
func (hg *HosGroupImpl) Create(params HostGroupCreate) (rsp string, err error)
func (*HosGroupImpl) Delete ¶
func (hg *HosGroupImpl) Delete(hostgroupIds []string) (rsp []string, err error)
func (*HosGroupImpl) Get ¶
func (hg *HosGroupImpl) Get(params HostGroupGet) (res []HostGroupModel, err error)
func (*HosGroupImpl) MassAdd ¶
func (hg *HosGroupImpl) MassAdd(params HostGroupMassAdd) (rsp *HostGroupIdResponse, err error)
func (*HosGroupImpl) MassRemove ¶
func (hg *HosGroupImpl) MassRemove(params HostGroupMassRemove) (rsp *HostGroupIdResponse, err error)
func (*HosGroupImpl) MassUpdate ¶
func (hg *HosGroupImpl) MassUpdate(params HostGroupMassUpdate) (rsp *HostGroupIdResponse, err error)
func (*HosGroupImpl) Update ¶
func (hg *HosGroupImpl) Update(params HostGroupUpdate) (rsp string, err error)
type HostCreate ¶
type HostCreate struct { Groups []GroupId `json:"groups"` Host string `json:"host"` Name string `json:"name,omitempty"` Interfaces []InterfaceCreate `json:"interfaces"` Tags []Tag `json:"tags,omitempty"` Templates []TemplatedId `json:"templates"` Macros []Macro `json:"macros,omitempty"` Inventory map[string]string `json:"inventory,omitempty"` TLSAccepted uint8 `json:"tls_accepted,omitempty"` TLSConnect uint8 `json:"tls_connect,omitempty"` TLSPSKIdentity string `json:"tls_psk_identity,omitempty"` TSLPSK string `json:"tls_psk,omitempty"` MoniteredBy MonitoredByEnum `json:"monitored_by,omitempty"` ProxyId string `json:"proxyid,omitempty"` ProxyGroupId string `json:"proxy_groupid,omitempty"` }
type HostGet ¶
type HostGet struct { CommonGetParams HostIds []string `json:"hostids,omitempty"` MaintenanceIds []string `json:"maintenanceids,omitempty"` TriggerIds []string `json:"triggerids,omitempty"` }
type HostGroupCreate ¶
type HostGroupGet ¶
type HostGroupGet struct { CommonGetParams GroupIds []string `json:"groupids,omitempty"` // Return only host groups with the given host group IDs. HostIds []string `json:"hostids,omitempty"` // Return only host groups that contain the given hosts. MaintenanceIds []string `json:"maintenanceids,omitempty"` // Return only host groups with the given maintenance IDs. TriggerIds []string `json:"triggerids,omitempty"` // Return only host groups that contain the given triggers. }
type HostGroupIdResponse ¶
type HostGroupIdResponse struct {
GroupIds []string `json:"groupids"`
}
type HostGroupMassAdd ¶
This method allows to simultaneously add multiple related objects to all the given host groups.
type HostGroupMassRemove ¶
type HostGroupMassRemove struct {
HostGroupMassAdd
}
This method allows to remove related objects from multiple host groups.
type HostGroupMassUpdate ¶
type HostGroupMassUpdate struct {
HostGroupMassAdd
}
This method allows to replace hosts and templates with the specified ones in multiple host groups.
type HostGroupModel ¶
type HostGroupUpdate ¶
type HostInterfaceAvailableEnum ¶
type HostInterfaceAvailableEnum uint8
const ( InterfaceUnknownType HostInterfaceAvailableEnum = 0 InterfaceAvailableType HostInterfaceAvailableEnum = 1 InterfaceUnAvailableType HostInterfaceAvailableEnum = 2 )
type HostInterfaceEnum ¶
type HostInterfaceEnum uint8
const ( AgentHostInterfaceType HostInterfaceEnum = 1 SNMPHostInterfaceType HostInterfaceEnum = 2 IPMIHostInterfaceType HostInterfaceEnum = 3 JMXHostInterfaceType HostInterfaceEnum = 4 )
type HostIpEnum ¶
type HostIpEnum uint8
const ( UseDNSType HostIpEnum = 0 UseIPType HostIpEnum = 1 )
type HostModel ¶
type HostModel struct { HostID string `json:"hostid,omitempty"` Host string `json:"host"` Description string `json:"description,omitempty"` MonitoredBy []string `json:"monitored_by,omitempty"` ProxyId string `json:"proxyid,omitempty"` ProxyGroupId string `json:"proxy_groupid,omitempty"` Status HostStatusEnum `json:"status,omitempty"` ActiveAvailable ActiveAvailableEnum `json:"active_available,omitempty"` AssginedProxyID string `json:"assigned_proxyid,omitempty"` // ID of the proxy assigned by Zabbix server, if the host is monitored by a proxy group. }
type HostStatusEnum ¶
type HostStatusEnum uint8
const ( Monitered HostStatusEnum = 0 Unmonitered HostStatusEnum = 1 )
type InterfaceCreate ¶
type InterfaceCreate struct { Type HostInterfaceEnum `json:"type"` Main bool `json:"main,omitempty"` UserIP HostIpEnum `json:"useip,omitempty"` DNS string `json:"dns,omitempty"` Port uint `json:"port,omitempty"` Details map[string]string `json:"details,omitempty"` }
type MonitoredByEnum ¶
type MonitoredByEnum uint8
const ( ZabbixServer MonitoredByEnum = 0 ZabbixProxy MonitoredByEnum = 1 ZabbixProxyGroup MonitoredByEnum = 2 )
type Response ¶
type Response struct { JsonRpc string `json:"jsonrpc"` Result any `json:"result"` Error ZbxApiError `json:"error"` Id uint64 `json:"id"` }
type TemplatedId ¶
type TemplatedId struct {
TemplatedId string `json:"templateid"`
}
type ZbxAPI ¶
type ZbxAPI struct { HostGroup *HosGroupImpl // contains filtered or unexported fields }
func (*ZbxAPI) SetRetryCount ¶
func (*ZbxAPI) SetTimeout ¶
type ZbxApiError ¶
Click to show internal directories.
Click to hide internal directories.