parser

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseStatus

func ParseStatus(data *string) (map[string][]NagiosStatus, error)

ParseStatus parses status and returns a mapped list of issues per hostname

func ParseStatusFromFile

func ParseStatusFromFile(f string) (map[string][]NagiosStatus, error)

ParseStatusFromFile reads nagios entries from a file and returns a mapped listof issues per hostname

Types

type NagiosStatus

type NagiosStatus struct {
	StatusType string            `json:"status_type,omitempty"`
	Hostname   string            `json:"hostname,omitempty"`
	Service    string            `json:"service,omitempty"`
	State      string            `json:"state,omitempty"`
	Values     map[string]string `json:"values,omitempty"`
}

NagiosStatus is a status structure for nagios events

Jump to

Keyboard shortcuts

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