Documentation ¶
Overview ¶
Package collector includes all individual collectors to gather and export lsf metrics.
Index ¶
- Variables
- func DisableDefaultCollectors()
- func FormatQueusStatus(status string, logger log.Logger) float64
- func FormatbhostsStatus(status string, logger log.Logger) float64
- func QueuesSplite(lsfOutput []byte, logger log.Logger) (map[int]*queuesInfo, error)
- type Collector
- type Job
- type JobCollector
- type LsfCollector
- type QueuesCollector
Constants ¶
This section is empty.
Variables ¶
var ( // Regexp to parse lsid. ClusterNameRegex = regexp.MustCompile(`My\s+cluster\s+name\s+is\s+(?P<cluster_name>[^\s]+)`) MasterNameRegex = regexp.MustCompile(`My\s+master\s+name\s+is\s+(?P<master_name>[^\s]+)`) LSFVersionRegex = regexp.MustCompile(`(?P<lsf_version>\d+.\d+.\d+.\d+)`) )
Functions ¶
func DisableDefaultCollectors ¶
func DisableDefaultCollectors()
DisableDefaultCollectors sets the collector state to false for all collectors which have not been explicitly enabled on the command line.
func FormatQueusStatus ¶ added in v1.0.1
func FormatbhostsStatus ¶ added in v1.0.1
Types ¶
type Collector ¶
type Collector interface { // Get new metrics and expose them via prometheus registry. Update(ch chan<- prometheus.Metric) error }
Collector is the interface a collector has to implement.
func NewLSFJobCollector ¶
NewLmstatCollector returns a new Collector exposing lmstat license stats.
func NewLSFQueuesCollector ¶ added in v1.0.1
NewLmstatCollector returns a new Collector exposing lmstat license stats.
type JobCollector ¶
type JobCollector struct { JobInfo *prometheus.Desc // contains filtered or unexported fields }
func (*JobCollector) Update ¶
func (c *JobCollector) Update(ch chan<- prometheus.Metric) error
Update calls (*lmstatCollector).getLmStat to get the platform specific memory metrics.
type LsfCollector ¶
type LsfCollector struct { Collectors map[string]Collector // contains filtered or unexported fields }
LsfCollector implements the prometheus.Collector interface.
func NewLsfCollector ¶
func NewLsfCollector(logger log.Logger, filters ...string) (*LsfCollector, error)
NewLsfCollector creates a new LsfCollector.
func (LsfCollector) Collect ¶
func (n LsfCollector) Collect(ch chan<- prometheus.Metric)
Collect implements the prometheus.Collector interface.
func (LsfCollector) Describe ¶
func (n LsfCollector) Describe(ch chan<- *prometheus.Desc)
Describe implements the prometheus.Collector interface.
type QueuesCollector ¶ added in v1.0.1
type QueuesCollector struct { QueuesPendingCount *prometheus.Desc QueuesRuningCount *prometheus.Desc QueuesMaxJobCount *prometheus.Desc QueuesStatus *prometheus.Desc // contains filtered or unexported fields }
func (*QueuesCollector) Update ¶ added in v1.0.1
func (c *QueuesCollector) Update(ch chan<- prometheus.Metric) error
Update calls (*lmstatCollector).getLmStat to get the platform specific memory metrics.