zabbixsvc

package
v1.2.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadHostsFromFile

func LoadHostsFromFile(filename string) (map[string]string, error)

Types

type Alert

type Alert struct {
	Labels      map[string]string `json:"labels"`
	Annotations map[string]string `json:"annotations"`
	StartsAt    string            `json:"startsAt,omitempty"`
	EndsAt      string            `json:"EndsAt,omitempty"`
}

Alert is alert received from alertmanager.

type AlertmanagerRequest added in v1.2.1

type AlertmanagerRequest struct {
	Version           string            `json:"version"`
	GroupKey          string            `json:"groupKey"`
	Status            string            `json:"status"`
	Receiver          string            `json:"receiver"`
	GroupLabels       map[string]string `json:"groupLabels"`
	CommonLabels      map[string]string `json:"commonLabels"`
	CommonAnnotations map[string]string `json:"commonAnnotations"`
	ExternalURL       string            `json:"externalURL"`
	Alerts            []Alert           `json:"alerts"`
}

AlertmanageRequest this is request received from Alertmanager.

type JSONHandler

type JSONHandler struct {
	Sender      *zabbixsnd.Sender
	KeyPrefix   string
	DefaultHost string
	Hosts       map[string]string
}

JSONHandler handles alerts

func (*JSONHandler) HandlePost

func (h *JSONHandler) HandlePost(w http.ResponseWriter, r *http.Request)

type ZabbixResponse

type ZabbixResponse struct {
	Response string `json:"response"`
	Info     string `json:"info"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL