Class ExecutorsBusyGauge
java.lang.Object
org.jenkinsci.plugins.prometheus.collectors.BaseMetricCollector<LoadStatistics.LoadStatisticsSnapshot,io.prometheus.client.Gauge>
org.jenkinsci.plugins.prometheus.collectors.executors.ExecutorsBusyGauge
- All Implemented Interfaces:
MetricCollector<LoadStatistics.LoadStatisticsSnapshot,io.prometheus.client.Gauge>
public class ExecutorsBusyGauge
extends BaseMetricCollector<LoadStatistics.LoadStatisticsSnapshot,io.prometheus.client.Gauge>
-
Field Summary
Fields inherited from class org.jenkinsci.plugins.prometheus.collectors.BaseMetricCollector
collector, labelNames, namePrefix, namespace, SEPARATOR, subsystem -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedExecutorsBusyGauge(String[] labelNames, String namespace, String subsystem, String namePrefix) -
Method Summary
Modifier and TypeMethodDescriptionvoidcalculateMetric(LoadStatistics.LoadStatisticsSnapshot jenkinsObject, String[] labelValues) This method contains the logic to calculate a metric value based on the given Jenkins object (e.g.protected io.prometheus.client.SimpleCollector.Builder<?,io.prometheus.client.Gauge> protected CollectorTypeprotected StringMethods inherited from class org.jenkinsci.plugins.prometheus.collectors.BaseMetricCollector
calculateName, collect, getBaseName, initCollector
-
Constructor Details
-
ExecutorsBusyGauge
-
-
Method Details
-
getCollectorType
- Specified by:
getCollectorTypein classBaseMetricCollector<LoadStatistics.LoadStatisticsSnapshot,io.prometheus.client.Gauge> - Returns:
- - the name of the collector without subsystem, namespace, prefix
-
getHelpText
- Specified by:
getHelpTextin classBaseMetricCollector<LoadStatistics.LoadStatisticsSnapshot,io.prometheus.client.Gauge> - Returns:
- - the help text which should be displayed
-
getCollectorBuilder
protected io.prometheus.client.SimpleCollector.Builder<?,io.prometheus.client.Gauge> getCollectorBuilder()- Specified by:
getCollectorBuilderin classBaseMetricCollector<LoadStatistics.LoadStatisticsSnapshot,io.prometheus.client.Gauge> - Returns:
- - builder object of the type of collector
-
calculateMetric
public void calculateMetric(LoadStatistics.LoadStatisticsSnapshot jenkinsObject, String[] labelValues) Description copied from interface:MetricCollectorThis method contains the logic to calculate a metric value based on the given Jenkins object (e.g. Job, Run,...)- Specified by:
calculateMetricin interfaceMetricCollector<LoadStatistics.LoadStatisticsSnapshot,io.prometheus.client.Gauge> - Specified by:
calculateMetricin classBaseMetricCollector<LoadStatistics.LoadStatisticsSnapshot,io.prometheus.client.Gauge> - Parameters:
jenkinsObject- - Examples:Job,RunlabelValues- - The label values for the calculation
-