Documentation ¶
Index ¶
Constants ¶
const ( //QueryForServicesInDowntime livestatusquery for services in downtime. QueryForServicesInDowntime = `GET services Columns: downtimes host_name display_name Filter: scheduled_downtime_depth > 0 OutputFormat: csv ` //QueryForHostsInDowntime livestatusquery for hosts in downtime QueryForHostsInDowntime = `GET hosts Columns: downtimes name Filter: scheduled_downtime_depth > 0 OutputFormat: csv ` //QueryForDowntimeid livestatusquery for downtime start/end QueryForDowntimeid = `GET downtimes Columns: id start_time entry_time OutputFormat: csv ` )
const ( //QueryForNotifications livestatusquery for notifications. QueryForNotifications = `GET log Columns: type time contact_name message Filter: type ~ .*NOTIFICATION Filter: time < %d Negate: OutputFormat: csv ` //QueryForComments livestatusquery for comments QueryForComments = `` /* 133-byte string literal not displayed */ //QueryForDowntimes livestatusquery for downtimes QueryForDowntimes = `` /* 132-byte string literal not displayed */ )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache contains stored data
type CacheBuilder ¶
type CacheBuilder struct {
// contains filtered or unexported fields
}
CacheBuilder fetches data from livestatus.
func NewLivestatusCacheBuilder ¶
func NewLivestatusCacheBuilder(livestatusConnector *Connector) *CacheBuilder
NewLivestatusCacheBuilder constructor, which also starts it immediately.
func (CacheBuilder) IsServiceInDowntime ¶
func (builder CacheBuilder) IsServiceInDowntime(host, service, time string) bool
IsServiceInDowntime returns true if the host/service is in downtime
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
Collector fetches data from livestatus.
func NewLivestatusCollector ¶
func NewLivestatusCollector(jobs chan interface{}, livestatusConnector *Connector, fieldSeperator string) *Collector
NewLivestatusCollector constructor, which also starts it immediately.
type CommentData ¶
type CommentData struct { Data // contains filtered or unexported fields }
CommentData adds Comments types to the livestatus data
func (CommentData) Print ¶
func (comment CommentData) Print(version float32) string
Print srints the data in influxdb lineformat
type Data ¶
type Data struct {
// contains filtered or unexported fields
}
Data contains basic data extracted from livestatusqueries.
type DowntimeData ¶
type DowntimeData struct { Data // contains filtered or unexported fields }
DowntimeData adds Comments types to the livestatus data
func (DowntimeData) Print ¶
func (downtime DowntimeData) Print(version float32) string
Print prints the data in influxdb lineformat
type NotificationData ¶
type NotificationData struct { Data // contains filtered or unexported fields }
NotificationData adds notification types to the livestatus data
func (NotificationData) Print ¶
func (notification NotificationData) Print(version float32) string
Print prints the data in influxdb lineformat