Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var WILDCARD = "*Микро*" //"*Березо*"
Functions ¶
func Run ¶
func Run(username string, password string, comandToMM chan<- msgmngr.CommandFromZbx, svdZbxHosts *brds.SavedHosts)
Run launches the Zabbix API client.
Types ¶
type ZabbixClient ¶
ZabbixClient represents an instance of the Zabbix API client.
func (*ZabbixClient) Authentication ¶
func (c *ZabbixClient) Authentication() error
Authentication authenticates the Zabbix API client.
func (*ZabbixClient) GetHost ¶
func (c *ZabbixClient) GetHost(pattern string) ([]map[string]string, error)
GetHost retrieves hosts according to the specified hostname pattern.
func (*ZabbixClient) GetTrigger ¶
func (c *ZabbixClient) GetTrigger(hosts []map[string]string, svdZbxHosts *brds.SavedHosts) error
GetTrigger retrieves triggered triggers for the specified hosts.
It then sends information about the hosts over the specified channel (outZabbix).
type ZabbixParams ¶
type ZabbixParams struct { Output []string `json:"output,omitempty"` Search map[string]string `json:"search,omitempty"` SearchWildcardsEnabled bool `json:"searchWildcardsEnabled,omitempty"` SearchByAny bool `json:"searchByAny,omitempty"` Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` Host string `json:"host,omitempty"` Monitored_hosts int `json:"monitored_hosts,omitempty"` }
For information about the Zabbix API, see the link https://www.zabbix.com/documentation/current/en/manual/api.
type ZabbixRequest ¶
type ZabbixResponse ¶
type ZabbixResponse struct { Jsonrpc string `json:"jsonrpc,omitempty"` Result []map[string]string `json:"result,omitempty"` // Hosts []map[string]string `json:"host,omitempty"` Id int `json:"id,omitempty"` }
type ZabbixParamsResponseHos { Output []string `json:"output,omitempty"` }
Click to show internal directories.
Click to hide internal directories.