Versions in this module Expand all Collapse all v0 v0.8.0-1 Jan 9, 2015 v0.7.0-2 Nov 24, 2014 v0.6.0-2 Oct 23, 2014 v0.5.0 Sep 30, 2014 Changes in this version + const VERSION + var Actions = map[string]ActionBuilder + var BuildAction = convertAction + var BuildHost = convertHost + var BuildRule = convertRule + var BuildService = convertService + var CommandHandlers = map[string]commandFunc + var Defaults = GlobalConfig + var Events = []EventType + var Hup os.Signal = syscall.SIGHUP + var Licensing string = "Licensed under the GNU Public License 3.0" + var Name string = "Inspeqtor" + var Notifier = map[string]NotifierBuilder + var SignalHandlers = map[os.Signal]func(*Inspeqtor) + var Term os.Signal = syscall.SIGTERM + func HandleSignal(sig os.Signal, handler func(*Inspeqtor)) + func HandleSignals() + func ParseInq(global *ConfigFile, confDir string) (*Host, []Checkable, error) + type Action interface + Trigger func(event *Event) error + type ActionBuilder func(Checkable, *AlertRoute) (Action, error) + type AlertRoute struct + Channel string + Config map[string]string + Name string + func ValidateChannel(name string, channel string, config map[string]string) (*AlertRoute, error) + type Checkable interface + Collect func(bool, func(Checkable)) + Metrics func() metrics.Store + Name func() string + Parameter func(string) string + Resolve func([]services.InitSystem) error + Rules func() []*Rule + Verify func() []*Event + type ConfigFile struct + AlertRoutes map[string]*AlertRoute + Top GlobalConfig + func ParseGlobal(rootDir string) (*ConfigFile, error) + type EmailEvent struct + Config *EmailNotifier + type EmailNotifier struct + From string + Host string + Password string + To string + Username string + func (e *EmailNotifier) TriggerEmail(event *Event, sender EmailSender) error + func (e EmailNotifier) Trigger(event *Event) error + type EmailSender func(e *EmailNotifier, doc bytes.Buffer) error + type Entity struct + func (e *Entity) Metrics() metrics.Store + func (e *Entity) Name() string + func (e *Entity) Parameter(key string) string + func (e *Entity) Parameters() map[string]string + func (e *Entity) Rules() []*Rule + type Event struct + Type EventType + func (e *Event) Hostname() string + func (e *Event) Service() *Service + func (e *Event) Target() string + type EventType string + const ProcessDoesNotExist + const ProcessExists + const RuleFailed + const RuleRecovered + func (s EventType) String() string + type GlobalConfig struct + CycleTime uint + DeployLength uint + type Host struct + func NewHost() *Host + func (h *Host) Collect(silenced bool, completeCallback func(Checkable)) + func (h *Host) Resolve(_ []services.InitSystem) error + func (s *Host) Verify() []*Event + type Inspeqtor struct + GlobalConfig *ConfigFile + Host *Host + RootDir string + ServiceManagers []services.InitSystem + Services []Checkable + SilenceUntil time.Time + Socket net.Listener + SocketPath string + StartedAt time.Time + Valid bool + func New(dir string, socketpath string) (*Inspeqtor, error) + func (i *Inspeqtor) Parse() error + func (i *Inspeqtor) Shutdown() + func (i *Inspeqtor) Start() + func (i *Inspeqtor) TestAlertRoutes() int + type NotifierBuilder func(Checkable, map[string]string) (Action, error) + type Operator uint8 + const GT + const LT + func (o Operator) String() string + type Restartable interface + Restart func() error + type Restarter struct + func (r Restarter) Trigger(event *Event) error + type Rule struct + Actions []Action + CurrentValue float64 + CycleCount int + DisplayThreshold string + Entity Checkable + MetricFamily string + MetricName string + Op Operator + State RuleState + Threshold float64 + TrippedCount int + func (r *Rule) Consequence() string + func (r *Rule) DisplayState() string + func (r *Rule) EntityName() string + func (r *Rule) FetchDisplayCurrentValue() string + func (r *Rule) FetchLatestMetricValue() float64 + func (r *Rule) Metric() string + func (r *Rule) Reset() + func (rule *Rule) Check() *Event + type RuleState string + const Ok + const Recovered + const Triggered + func (o RuleState) String() string + type Service struct + EventHandler Action + Manager services.InitSystem + Process *services.ProcessStatus + func NewService(name string) *Service + func (s *Service) Restart() error + func (s *Service) SetMetrics(newStore metrics.Store) + func (s *Service) String() string + func (s *Service) Transition(ps *services.ProcessStatus, emitter func(EventType)) + func (s *Service) Verify() []*Event + func (svc *Service) Collect(silenced bool, completeCallback func(Checkable)) + func (svc *Service) Resolve(mgrs []services.InitSystem) error