diff --git a/host.go b/host.go index d5bfd41..ffaf397 100644 --- a/host.go +++ b/host.go @@ -38,6 +38,7 @@ type Host struct { // Fields below used only when creating hosts GroupIds HostGroupIDs `json:"groups,omitempty"` + UserMacros Macros `json:"macros,omitempty"` Interfaces HostInterfaces `json:"interfaces,omitempty"` TemplateIDs TemplateIDs `json:"templates,omitempty"` } diff --git a/item.go b/item.go index 5bb0ed9..73685be 100644 --- a/item.go +++ b/item.go @@ -44,7 +44,7 @@ const ( ExternalCheck ItemType = 10 // DatabaseMonitor type DatabaseMonitor ItemType = 11 - //IPMIAgent type + // IPMIAgent type IPMIAgent ItemType = 12 // SSHAgent type SSHAgent ItemType = 13 @@ -58,7 +58,7 @@ const ( SNMPTrap ItemType = 17 // DependentItem type (new in 3.4) DependentItem ItemType = 18 - //HTTPAgent type (new in 4.0) + // HTTPAgent type (new in 4.0) HTTPAgent ItemType = 19 ) diff --git a/lld_rule.go b/lld_rule.go index 393336d..45736e8 100644 --- a/lld_rule.go +++ b/lld_rule.go @@ -34,7 +34,7 @@ type LLDRule struct { AuthType string `json:"authtype,omitempty"` DelayFlex string `json:"delay_flex,omitempty"` Description string `json:"description,omitempty"` - Error string `json:"error,omitempty"` //Readonly + Error string `json:"error,omitempty"` // Readonly IpmiSensor string `json:"ipmi_sensor,omitempty"` LifeTime string `json:"lifetime,omitempty"` Params string `json:"params,omitempty"` diff --git a/macro.go b/macro.go index 5964155..55747e3 100644 --- a/macro.go +++ b/macro.go @@ -4,7 +4,7 @@ package zabbix // https://www.zabbix.com/documentation/3.2/manual/api/reference/usermacro/object type Macro struct { MacroID string `json:"hostmacroids,omitempty"` - HostID string `json:"hostid"` + HostID string `json:"hostid,omitemptry"` MacroName string `json:"macro"` Value string `json:"value"` } @@ -63,7 +63,7 @@ func (api *API) MacrosUpdate(macros Macros) (err error) { // MacrosDeleteByIDs Wrapper for usermacro.delete // Cleans MacroId in all macro elements if call succeed. -//https://www.zabbix.com/documentation/3.2/manual/api/reference/usermacro/delete +// https://www.zabbix.com/documentation/3.2/manual/api/reference/usermacro/delete func (api *API) MacrosDeleteByIDs(ids []string) (err error) { response, err := api.CallWithError("usermacro.delete", ids) diff --git a/trigger.go b/trigger.go index 15676a0..526a40d 100644 --- a/trigger.go +++ b/trigger.go @@ -57,8 +57,8 @@ type Trigger struct { Description string `json:"description"` Expression string `json:"expression"` Comments string `json:"comments"` - //TemplateId string `json:"templateid"` - //Value ValueType `json:""` + // TemplateId string `json:"templateid"` + // Value ValueType `json:""` Priority SeverityType `json:"priority,string"` Status StatusType `json:"status,string"`