Versions in this module Expand all Collapse all v0 v0.0.2 Jan 23, 2018 Changes in this version + const CmdAcknowledgeHostProblem + const CmdAcknowledgeServiceProblem + const CmdProcessHostCheckResult + const CmdProcessServiceCheckResult + const CmdScheduleForcedHostCheck + const CmdScheduleForcedServiceCheck + const CmdScheduleForcedServiceCheckAll + const CmdScheduleHostCheck + const CmdScheduleHostDowntime + const CmdScheduleHostServiceCheckAll + const CmdScheduleHostServiceDowntimeAll + const CmdScheduleHostgroupHostsDowntime + const CmdScheduleHostgroupServiceDowntime + const CmdScheduleRecursiveDowntime + const CmdScheduleRecursiveTriggeredDowntime + const CmdScheduleServiceCheck + const CmdScheduleServiceDowntime + const CmdScheduleServicegroupHostDowntime + const CmdScheduleServicegroupServiceDowntime + const NRPE_MAX_PACKETBUFFER_LENGTH + const NrpePacketSize + const NrpeTypeQuery + const NrpeTypeResponse + const StateCritical + const StateDown + const StateOk + const StateUnknown + const StateUnreachable + const StateUp + const StateWarning + func DecodeNagiosCmd(cmd string) (name string, args []string, err error) + func EncodeHostCheck(h Host) string + func EncodeServiceCheck(s Service) string + type Command struct + Filename string + func NewCmd(file string) (c *Command, err error) + func (cmd *Command) Cmd(command string, params ...string) (err error) + func (cmd *Command) Send(command string, params ...string) (err error) + type CommonFields struct + Acknowledged bool + CheckMessage string + DisplayName string + Downtime bool + Flapping bool + Hostname string + LastCheck time.Time + LastHardStateChange time.Time + LastStateChange time.Time + NextCheck time.Time + NotificationsEnabled bool + PreviousState string + State string + StateHard bool + func (c *CommonFields) UpdateCommonFromMap(m map[string]string, dataType int) error + func (c *CommonFields) UpdateStatus(status string, message string) type Host + func DecodeHostCheck(check string) (Host, error) + func NewHostFromArgs(args []string) (Host, error) + func NewHostFromMap(m map[string]string) (Host, error) + func (h *Host) MarshalCmd() string + type HostCount struct + Acknowledged int + All int + Down int + Downtime int + Unreachable int + Up int + type NrpeConfig struct + Command map[string]string + Config map[string]string + func ParseNrpeConfig(data io.Reader) (cfg NrpeConfig, err error) + type NrpePacket struct + Buffer [NRPE_MAX_PACKETBUFFER_LENGTH]byte + Crc uint32 + ResultCore int16 + Tail [2]byte + Type int16 + Version int16 + func ReadNrpe(r io.Reader) (p *NrpePacket, err error) + func ReadNrpeBytes(b []byte) (p *NrpePacket, err error) + func (r *NrpePacket) CheckCRC() + func (r *NrpePacket) Generate(w io.Writer) (err error) + func (r *NrpePacket) GenerateBytes() (b []byte, err error) + func (r *NrpePacket) GetMessage() (str string, err error) + func (r *NrpePacket) PrepareRequest() (err error) + func (r *NrpePacket) PrepareResponse() (err error) + func (r *NrpePacket) SetMessage(msg string) (err error) type Service + func DecodeServiceCheck(check string) (Service, error) + func NewServiceFromArgs(args []string) (Service, error) + func NewServiceFromMap(m map[string]string) (Service, error) + func (s *Service) MarshalCmd() string + type ServiceCount struct + Acknowledged int + All int + Critical int + Downtime int + Ok int + Unknown int + Warning int + type Status struct + Host map[string]Host + Service map[string]map[string]Service + Summary Summary + func LoadStatus(r io.Reader) (Status, error) + func (s *Status) UpdateStatus(r io.Reader) error + type Summary struct + func (sum *Summary) UpdateHost(hosts map[string]Host) error + func (sum *Summary) UpdateService(services map[string]map[string]Service) error v0.0.1 Jul 16, 2015 Changes in this version + type Host struct + Address string + Displayname string + HostGroups []string + Hostname string + Parents *[]Host + func NewHost() Host + func NewHostFromEnv() (Host, error) + type Notification struct + Host Host + HostState string + HostStateDuration time.Duration + HostStateHard bool + IsHost bool + IsService bool + Recipients []string + Service Service + ServiceState string + ServiceStateDuration time.Duration + ServiceStateHard bool + Type string + func NewNotification() Notification + func NewNotificationFromEnv() (Notification, error) + type Service struct + ContactGroups []string + Contacts []string + Description string + DisplayName string + Hostname string + ServiceGroups []string + Volatile bool + func NewService() Service + func NewServiceFromEnv() (Service, error)