Class JenkinsUpGauge
java.lang.Object
org.jenkinsci.plugins.prometheus.collectors.BaseMetricCollector<Jenkins,io.prometheus.client.Gauge>
org.jenkinsci.plugins.prometheus.collectors.jenkins.JenkinsUpGauge
- All Implemented Interfaces:
MetricCollector<Jenkins,
io.prometheus.client.Gauge>
-
Field Summary
Fields inherited from class org.jenkinsci.plugins.prometheus.collectors.BaseMetricCollector
collector, labelNames, namePrefix, namespace, SEPARATOR, subsystem
-
Method Summary
Modifier and TypeMethodDescriptionvoid
calculateMetric
(Jenkins 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 CollectorType
protected String
Methods inherited from class org.jenkinsci.plugins.prometheus.collectors.BaseMetricCollector
calculateName, collect, getBaseName, initCollector
-
Method Details
-
getCollectorType
- Specified by:
getCollectorType
in classBaseMetricCollector<Jenkins,
io.prometheus.client.Gauge> - Returns:
- - the name of the collector without subsystem, namespace, prefix
-
getHelpText
- Specified by:
getHelpText
in classBaseMetricCollector<Jenkins,
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:
getCollectorBuilder
in classBaseMetricCollector<Jenkins,
io.prometheus.client.Gauge> - Returns:
- - builder object of the type of collector
-
calculateMetric
Description copied from interface:MetricCollector
This method contains the logic to calculate a metric value based on the given Jenkins object (e.g. Job, Run,...)- Specified by:
calculateMetric
in interfaceMetricCollector<Jenkins,
io.prometheus.client.Gauge> - Specified by:
calculateMetric
in classBaseMetricCollector<Jenkins,
io.prometheus.client.Gauge> - Parameters:
jenkinsObject
- - Examples:Job
,Run
labelValues
- - The label values for the calculation
-