zabbix

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ContextType = "application/json-rpc"

Functions

func GetTid

func GetTid(triggers map[string]string, name string) string

Types

type Request

type Request struct {
	Jsonrpc string      `json:"jsonrpc"`
	Method  string      `json:"method"`
	Params  interface{} `json:"params"`
	Id      int         `json:"id"`
	Auth    string      `json:"auth"`
}

func DefaultRequest

func DefaultRequest(auth string) *Request

type Zabbix

type Zabbix struct {
	Url string

	Token string
	// contains filtered or unexported fields
}

func New

func New(url, user, password string) *Zabbix

func (*Zabbix) GetHosts

func (z *Zabbix) GetHosts() (hosts []string)

func (*Zabbix) GetTriggers

func (z *Zabbix) GetTriggers(host string) (triggers map[string]string)

func (*Zabbix) Login

func (z *Zabbix) Login()

func (*Zabbix) StatTrigger

func (z *Zabbix) StatTrigger(tid, status string) error

Jump to

Keyboard shortcuts

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