op5monitor

package
v0.0.0-...-6e5ea15 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2020 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HostCreate

func HostCreate(config ConfigTree, data map[string]interface{}, replaceHost bool) (ok bool)

func HostDelete

func HostDelete(config ConfigTree, hostname string) bool

func HostFetch

func HostFetch(config ConfigTree, host string)

func QueueSave

func QueueSave(config ConfigTree) bool

func SendCheck

func SendCheck(config ConfigTree, checkType string, data CheckResults)

func SendCheckHost

func SendCheckHost(
	config ConfigTree,
	hostname string,
	statusCode int,
	output string,
)

func SendCheckService

func SendCheckService(
	config ConfigTree,
	hostname string,
	service string,
	statusCode int,
	output string,
)

func ServiceCreate

func ServiceCreate(config ConfigTree, data map[string]interface{}) (ok bool)

Types

type CheckResults

type CheckResults struct {
	Hostname           string `json:"host_name"`
	StatusCode         int    `json:"status_code"`
	PluginOutput       string `json:"plugin_output"`
	ServiceDescription string `json:"service_description,omitempty"`
}

Check structure to replace using a map.

type ConfigTree

type ConfigTree struct {
	URL    string
	User   string
	Pass   string
	Input  string
	Output string
}

func Setup

func Setup(server, user, pass, input, output string) (config ConfigTree)

Jump to

Keyboard shortcuts

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