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 TypeMethodDescriptionvoidcalculateMetric(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 CollectorTypeprotected StringMethods inherited from class org.jenkinsci.plugins.prometheus.collectors.BaseMetricCollector
calculateName, collect, getBaseName, initCollector
-
Method Details
-
getCollectorType
- Specified by:
getCollectorTypein classBaseMetricCollector<Jenkins,io.prometheus.client.Gauge> - Returns:
- - the name of the collector without subsystem, namespace, prefix
-
getHelpText
- Specified by:
getHelpTextin 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:
getCollectorBuilderin classBaseMetricCollector<Jenkins,io.prometheus.client.Gauge> - Returns:
- - builder object of the type of collector
-
calculateMetric
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<Jenkins,io.prometheus.client.Gauge> - Specified by:
calculateMetricin classBaseMetricCollector<Jenkins,io.prometheus.client.Gauge> - Parameters:
jenkinsObject- - Examples:Job,RunlabelValues- - The label values for the calculation
-