Documentation ¶
Index ¶
- Constants
- func IVar(value string) string
- func IsValidHostType(t string) bool
- func Output(s State, message interface{})
- type APIRequest
- func (ic *APIRequest) Create(name []string, jsonBody string) *APIRequest
- func (ic *APIRequest) Delete(name []string, jsonBody string) *APIRequest
- func (ic *APIRequest) Do() *APIResponse
- func (ic *APIRequest) Get(name []string, jsonBody ...string) *APIRequest
- func (ic *APIRequest) Params(param map[string]string) *APIRequest
- func (ic *APIRequest) Update(name []string, jsonBody string) *APIRequest
- type APIResponse
- type Client
- func (c *Client) Actions(action string) *APIRequest
- func (c *Client) Check() *APIRequest
- func (c *Client) HostGroups(hostName string) *APIRequest
- func (c *Client) Hosts(hostName string) *APIRequest
- func (c *Client) Notifications(hostName string) *APIRequest
- func (c *Client) Service(hostName string) *APIRequest
- func (c *Client) SetEndpoint(endpoint string) *Client
- type ClusterHost
- func (h *ClusterHost) Apply(alert *api.ClusterAlert) error
- func (h *ClusterHost) Complete(v string)
- func (h *ClusterHost) Delete(namespace, name string) error
- func (h *ClusterHost) DeleteChecks(cmd string) error
- func (h *ClusterHost) ForceDeleteIcingaHost(kh IcingaHost) error
- func (h *ClusterHost) IcingaServiceSearchQuery(svc string, kids ...IcingaHost) string
- type Config
- type Configurator
- type IcingaHost
- type IcingaObject
- type NodeHost
- func (h *NodeHost) Apply(alert *api.NodeAlert, node *core.Node) error
- func (h *NodeHost) Complete(v string)
- func (h *NodeHost) Delete(alertNamespace, alertName string, node *core.Node) error
- func (h *NodeHost) DeleteChecks(cmd string) error
- func (h *NodeHost) ForceDeleteIcingaHost(kh IcingaHost) error
- func (h *NodeHost) IcingaServiceSearchQuery(svc string, kids ...IcingaHost) string
- type PodHost
- func (h *PodHost) Apply(alert *api.PodAlert, pod *core.Pod) error
- func (h *PodHost) Complete(v string)
- func (h *PodHost) Delete(alertNamespace, alertName string, pod *core.Pod) error
- func (h *PodHost) DeleteChecks(cmd string) error
- func (h *PodHost) ForceDeleteIcingaHost(kh IcingaHost) error
- func (h *PodHost) IcingaServiceSearchQuery(svc string, kids ...IcingaHost) string
- type ResponseObject
- type State
Constants ¶
View Source
const ( ICINGA_ADDRESS = "ICINGA_ADDRESS" // host:port ICINGA_API_USER = "ICINGA_API_USER" ICINGA_API_PASSWORD = "ICINGA_API_PASSWORD" ICINGA_CA_CERT = "ICINGA_CA_CERT" ICINGA_SERVER_KEY = "ICINGA_SERVER_KEY" ICINGA_SERVER_CERT = "ICINGA_SERVER_CERT" ICINGA_IDO_HOST = "ICINGA_IDO_HOST" ICINGA_IDO_PORT = "ICINGA_IDO_PORT" ICINGA_IDO_DB = "ICINGA_IDO_DB" ICINGA_IDO_USER = "ICINGA_IDO_USER" ICINGA_IDO_PASSWORD = "ICINGA_IDO_PASSWORD" ICINGA_WEB_HOST = "ICINGA_WEB_HOST" ICINGA_WEB_PORT = "ICINGA_WEB_PORT" ICINGA_WEB_DB = "ICINGA_WEB_DB" ICINGA_WEB_USER = "ICINGA_WEB_USER" ICINGA_WEB_PASSWORD = "ICINGA_WEB_PASSWORD" ICINGA_WEB_UI_PASSWORD = "ICINGA_WEB_UI_PASSWORD" )
View Source
const ( TypePod = "pod" TypeNode = "node" TypeCluster = "cluster" )
Variables ¶
This section is empty.
Functions ¶
func IsValidHostType ¶
Types ¶
type APIRequest ¶
type APIRequest struct { Err error Status int ResponseBody []byte // contains filtered or unexported fields }
func (*APIRequest) Create ¶
func (ic *APIRequest) Create(name []string, jsonBody string) *APIRequest
func (*APIRequest) Delete ¶
func (ic *APIRequest) Delete(name []string, jsonBody string) *APIRequest
func (*APIRequest) Do ¶
func (ic *APIRequest) Do() *APIResponse
func (*APIRequest) Get ¶
func (ic *APIRequest) Get(name []string, jsonBody ...string) *APIRequest
func (*APIRequest) Params ¶
func (ic *APIRequest) Params(param map[string]string) *APIRequest
func (*APIRequest) Update ¶
func (ic *APIRequest) Update(name []string, jsonBody string) *APIRequest
type APIResponse ¶
func (*APIResponse) Into ¶
func (r *APIResponse) Into(to interface{}) (int, error)
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Actions ¶
func (c *Client) Actions(action string) *APIRequest
func (*Client) Check ¶
func (c *Client) Check() *APIRequest
func (*Client) HostGroups ¶
func (c *Client) HostGroups(hostName string) *APIRequest
func (*Client) Hosts ¶
func (c *Client) Hosts(hostName string) *APIRequest
func (*Client) Notifications ¶
func (c *Client) Notifications(hostName string) *APIRequest
func (*Client) Service ¶
func (c *Client) Service(hostName string) *APIRequest
func (*Client) SetEndpoint ¶
type ClusterHost ¶
type ClusterHost struct {
// contains filtered or unexported fields
}
func NewClusterHost ¶
func NewClusterHost(IcingaClient *Client, verbosity string) *ClusterHost
func (*ClusterHost) Apply ¶
func (h *ClusterHost) Apply(alert *api.ClusterAlert) error
func (*ClusterHost) Delete ¶
func (h *ClusterHost) Delete(namespace, name string) error
func (*ClusterHost) DeleteChecks ¶
func (h *ClusterHost) DeleteChecks(cmd string) error
func (*ClusterHost) ForceDeleteIcingaHost ¶
func (h *ClusterHost) ForceDeleteIcingaHost(kh IcingaHost) error
func (*ClusterHost) IcingaServiceSearchQuery ¶
func (h *ClusterHost) IcingaServiceSearchQuery(svc string, kids ...IcingaHost) string
type Configurator ¶
func (*Configurator) ConfigFile ¶
func (c *Configurator) ConfigFile() string
func (*Configurator) LoadConfig ¶
func (c *Configurator) LoadConfig(userInput envconfig.LoaderFunc) (*Config, error)
type IcingaHost ¶
func ParseHost ¶
func ParseHost(name string) (*IcingaHost, error)
func (IcingaHost) Name ¶
func (kh IcingaHost) Name() (string, error)
type IcingaObject ¶
type NodeHost ¶
type NodeHost struct {
// contains filtered or unexported fields
}
func NewNodeHost ¶
func (*NodeHost) DeleteChecks ¶
func (*NodeHost) ForceDeleteIcingaHost ¶
func (h *NodeHost) ForceDeleteIcingaHost(kh IcingaHost) error
func (*NodeHost) IcingaServiceSearchQuery ¶
func (h *NodeHost) IcingaServiceSearchQuery(svc string, kids ...IcingaHost) string
type PodHost ¶
type PodHost struct {
// contains filtered or unexported fields
}
func NewPodHost ¶
func (*PodHost) DeleteChecks ¶
func (*PodHost) ForceDeleteIcingaHost ¶
func (h *PodHost) ForceDeleteIcingaHost(kh IcingaHost) error
func (*PodHost) IcingaServiceSearchQuery ¶
func (h *PodHost) IcingaServiceSearchQuery(svc string, kids ...IcingaHost) string
type ResponseObject ¶
type ResponseObject struct { Results []struct { Attrs struct { Name string `json:"name"` CheckInterval float64 `json:"check_interval"` Vars map[string]interface{} `json:"vars"` LastState float64 `json:"last_state"` Acknowledgement float64 `json:"acknowledgement"` } `json:"attrs"` Name string `json:"name"` } `json:"results"` }
Click to show internal directories.
Click to hide internal directories.