Documentation
¶
Index ¶
Constants ¶
View Source
const SleepTime = 500
SleepTime is the sleep time of the signal handler loop
Variables ¶
View Source
var Pause = false
Pause state
Functions ¶
func SendNotification ¶
SendNotification send a notification
Types ¶
type CONFIG ¶
type CONFIG struct {
Server string `toml:"server" default:""`
Refresh int `toml:"refresh" default:"30"`
LongRefresh int `toml:"long_refresh" default:"60"`
HostsPattern []string `toml:"hosts_pattern"`
HostsPatternString string
Client bool `default:"false"`
Debug bool `toml:"debug" default:"false"`
Popup bool `toml:"popup" default:"true"`
Warnings bool `toml:"warnings" default:"true"`
NotificationSnoozeCycle int `toml:"notification_snooze_cycle" default:"10"`
Acknowledged int `toml:"acknowledged" default:"0"`
NotificationsEnabled int `toml:"notifications_enabled" default:"1"`
InNotificationPeriod int `toml:"in_notification_period" default:"1"`
ScheduledDowntimeDepth int `toml:"scheduled_downtime_depth" default:"0"`
ServiceScheduledDowntimeDepth int `toml:"service_scheduled_downtime_depth" default:"0"`
HostScheduledDowntimeDepth int `toml:"host_scheduled_downtime_depth" default:"0"`
ServicePrefix string `toml:"service_prefix" default:""`
HostPrefix string `toml:"host_prefix" default:""`
PausePrefix string `toml:"pause_prefix" default:""`
ErrorPrefix string `toml:"error_prefix" default:""`
OkPrefix string `toml:"ok_prefix" default:""`
FlappingIcon string `toml:"flapping_icon" default:""`
HostsOnly bool `toml:"hosts_only" default:"false"`
ServicesOnly bool `toml:"services_only" default:"false"`
NotesURL bool `toml:"notes_url" default:"false"`
Limit int `toml:"limit" default:"0"`
GetDuration bool `toml:"get_duration" default:"false"`
// eg: 0 9 * * *
AutoStart string `toml:"auto_start" default:""`
// eg: 0 22 * * *
AutoStop string `toml:"auto_stop" default:""`
}
CONFIG define the configuration content
Click to show internal directories.
Click to hide internal directories.