Documentation ¶
Index ¶
- type ActivateResult
- type Attributes
- type CheckMKException
- type Client
- func (c *Client) ActivateChanges() error
- func (c *Client) CreateHost(hostname string, folder string, activate bool, alias string, tag_agent string, ...) error
- func (c *Client) DeleteHost(host string) error
- func (c *Client) NewAPIRequest(method, APICall string, body io.Reader) (resp_body []byte, resp_error error)
- func (c *Client) ReadALLHost() error
- func (c *Client) ReadHost(host string) (*Host, error)
- type Host
- type StructGetHostResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActivateResult ¶
type ActivateResult struct { Result activateResultSites `json:"result"` ResultCode int `json:"result_code"` }
ActivateResult holds the result of a Check_MK webAPI update
type Attributes ¶
type Attributes struct { Alias string `json:"alias"` TagAgent string `json:"tag_agent"` TagCriticality string `json:"tag_criticality"` Ipaddress string `json:"ipaddress"` }
Attributes describes the needed/optional tags for the Check_MK webAPI
type CheckMKException ¶
CheckMKException holds exceptions thrown by CheckMK
type Client ¶
type Client struct { User string Password string Host string // contains filtered or unexported fields }
Client holds the struct for connecting to a Check_MK instance
func (*Client) ActivateChanges ¶
ActivateChanges activates the pending changes done to Check_MK after create/update/delete
func (*Client) CreateHost ¶
func (c *Client) CreateHost(hostname string, folder string, activate bool, alias string, tag_agent string, tag_criticality string, ipaddress string) error
CreateHost creates a new host
func (*Client) DeleteHost ¶
DeleteHost deletes a host
type Host ¶
type Host struct { Attributes `json:"attributes"` Hostname string `json:"hostname"` Folder string `json:"folder"` }
Host holds the data for a single host
type StructGetHostResult ¶
type StructGetHostResult struct { Result struct { Attributes struct { NetworkScan struct { ScanInterval int `json:"scan_interval"` ExcludeRanges []interface{} `json:"exclude_ranges"` IPRanges []interface{} `json:"ip_ranges"` RunAs string `json:"run_as"` } `json:"network_scan"` TagAgent string `json:"tag_agent"` SnmpCommunity string `json:"snmp_community"` Ipv6Address string `json:"ipv6address"` Alias string `json:"alias"` TagCriticality string `json:"tag_criticality"` Site string `json:"site"` TagAddressFamily string `json:"tag_address_family"` Contactgroups contactGroups `json:"contactgroups"` NetworkScanResult struct { Start interface{} `json:"start"` State interface{} `json:"state"` End interface{} `json:"end"` Output string `json:"output"` } `json:"network_scan_result"` Parents []interface{} `json:"parents"` Ipaddress string `json:"ipaddress"` TagNetworking string `json:"tag_networking"` } `json:"attributes"` Hostname string `json:"hostname"` Path string `json:"path"` } `json:"result"` ResultCode int `json:"result_code"` }
StructGetHostResult holds the results of a Check_MK webAPI answer
Click to show internal directories.
Click to hide internal directories.