Documentation
¶
Index ¶
- Constants
- func FilesInDirectoryOlderThanX(folder string, age time.Duration) []string
- func IsItTime(timeStamp time.Time, duration time.Duration) bool
- func NagiosSpoolfileWorkerGenerator(jobs chan string, results map[data.Datatype]chan collector.Printable, ...) func() *NagiosSpoolfileWorker
- type NagiosSpoolfileCollector
- type NagiosSpoolfileWorker
- type PerformanceData
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func FilesInDirectoryOlderThanX ¶
FilesInDirectoryOlderThanX returns a list of file, of a folder, names which are older then a certain duration.
func NagiosSpoolfileWorkerGenerator ¶
func NagiosSpoolfileWorkerGenerator(jobs chan string, results map[data.Datatype]chan collector.Printable, livestatusCacheBuilder *livestatus.CacheBuilder) func() *NagiosSpoolfileWorker
NagiosSpoolfileWorkerGenerator generates a worker and starts it.
Types ¶
type NagiosSpoolfileCollector ¶
type NagiosSpoolfileCollector struct {
// contains filtered or unexported fields
}
NagiosSpoolfileCollector scans the nagios spoolfile folder and delegates the files to its workers.
func NagiosSpoolfileCollectorFactory ¶
func NagiosSpoolfileCollectorFactory(spoolDirectory string, workerAmount int, results map[data.Datatype]chan collector.Printable, livestatusCacheBuilder *livestatus.CacheBuilder) *NagiosSpoolfileCollector
NagiosSpoolfileCollectorFactory creates the give amount of Woker and starts them.
func (*NagiosSpoolfileCollector) Stop ¶
func (s *NagiosSpoolfileCollector) Stop()
Stop stops his workers and itself.
type NagiosSpoolfileWorker ¶
type NagiosSpoolfileWorker struct {
// contains filtered or unexported fields
}
NagiosSpoolfileWorker parses the given spoolfiles and adds the extraced perfdata to the queue.
type PerformanceData ¶
type PerformanceData struct {
// contains filtered or unexported fields
}
PerformanceData represents the nagios perfdata
func (PerformanceData) PrintForElasticsearch ¶ added in v0.2.0
func (p PerformanceData) PrintForElasticsearch(version float32, index string) string
PrintForElasticsearch prints in the elasticsearch json format
func (PerformanceData) PrintForInfluxDB ¶ added in v0.2.0
func (p PerformanceData) PrintForInfluxDB(version float32) string
PrintForInfluxDB prints the data in influxdb lineformat
Click to show internal directories.
Click to hide internal directories.