Class TextPrometheusMetricsProcessor
- java.lang.Object
-
- org.hawkular.agent.prometheus.PrometheusMetricsProcessor<MetricFamily>
-
- org.hawkular.agent.prometheus.text.TextPrometheusMetricsProcessor
-
public class TextPrometheusMetricsProcessor extends PrometheusMetricsProcessor<MetricFamily>
This will iterate over a list of Prometheus metrics that are given as text data.
-
-
Constructor Summary
Constructors Constructor Description TextPrometheusMetricsProcessor(InputStream inputStream, PrometheusMetricsWalker theWalker)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected MetricFamily
convert(MetricFamily metricFamily)
This method converts the metrics from the specific data format found in the input stream to the common metric format.TextPrometheusMetricDataParser
createPrometheusMetricDataParser()
-
Methods inherited from class org.hawkular.agent.prometheus.PrometheusMetricsProcessor
getInputStream, getWalker, walk
-
-
-
-
Constructor Detail
-
TextPrometheusMetricsProcessor
public TextPrometheusMetricsProcessor(InputStream inputStream, PrometheusMetricsWalker theWalker)
-
-
Method Detail
-
createPrometheusMetricDataParser
public TextPrometheusMetricDataParser createPrometheusMetricDataParser()
- Specified by:
createPrometheusMetricDataParser
in classPrometheusMetricsProcessor<MetricFamily>
- Returns:
- a new parser instance that can be used to parse the formatted data
found in the
input stream
.
-
convert
protected MetricFamily convert(MetricFamily metricFamily)
Description copied from class:PrometheusMetricsProcessor
This method converts the metrics from the specific data format found in the input stream to the common metric format.- Specified by:
convert
in classPrometheusMetricsProcessor<MetricFamily>
- Parameters:
metricFamily
- the metric family (and its metrics) that need to be converted- Returns:
- the common MetricFamily object
-
-