nagios

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2015 License: LGPL-3.0 Imports: 5 Imported by: 2

README

go-nagios-common

Common data structures for nagios objects

WiP

Documentation

Overview

Host definition

Service definition

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Host

type Host struct {
	Hostname    string
	Displayname string
	HostGroups  []string
	Address     string
	Parents     *[]Host
}

func NewHost

func NewHost() Host

func NewHostFromEnv

func NewHostFromEnv() (Host, error)

type Notification

type Notification struct {
	Host                 Host
	Service              Service
	Type                 string
	Recipients           []string
	HostState            string
	HostStateHard        bool
	HostStateDuration    time.Duration
	ServiceState         string
	ServiceStateHard     bool
	ServiceStateDuration time.Duration
	IsHost               bool
	IsService            bool
}

Notification types:

*

func NewNotification

func NewNotification() Notification

func NewNotificationFromEnv

func NewNotificationFromEnv() (Notification, error)

type Service

type Service struct {
	Hostname      string
	Description   string
	DisplayName   string
	ServiceGroups []string // list of service groups this service belongs to
	Volatile      bool
	Contacts      []string // list of service contacts
	ContactGroups []string // list of service contact groups
}

func NewService

func NewService() Service

func NewServiceFromEnv

func NewServiceFromEnv() (Service, error)

Jump to

Keyboard shortcuts

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