use of com.linkedin.kafka.cruisecontrol.monitor.sampling.prometheus.model.PrometheusValue in project cruise-control by linkedin.
the class PrometheusMetricSampler method addTopicMetrics.
private int addTopicMetrics(Cluster cluster, RawMetricType metricType, PrometheusQueryResult queryResult) throws InvalidPrometheusResultException {
int brokerId = getBrokerId(cluster, queryResult);
String topic = getTopic(queryResult);
int metricsAdded = 0;
for (PrometheusValue value : queryResult.values()) {
addMetricForProcessing(new TopicMetric(metricType, value.epochSeconds() * SEC_TO_MS, brokerId, topic, value.value()));
metricsAdded++;
}
return metricsAdded;
}
use of com.linkedin.kafka.cruisecontrol.monitor.sampling.prometheus.model.PrometheusValue in project cruise-control by linkedin.
the class PrometheusMetricSampler method addBrokerMetrics.
private int addBrokerMetrics(Cluster cluster, RawMetricType metricType, PrometheusQueryResult queryResult) throws InvalidPrometheusResultException {
int brokerId = getBrokerId(cluster, queryResult);
int metricsAdded = 0;
for (PrometheusValue value : queryResult.values()) {
addMetricForProcessing(new BrokerMetric(metricType, value.epochSeconds() * SEC_TO_MS, brokerId, value.value()));
metricsAdded++;
}
return metricsAdded;
}
use of com.linkedin.kafka.cruisecontrol.monitor.sampling.prometheus.model.PrometheusValue in project cruise-control by linkedin.
the class PrometheusMetricSampler method addPartitionMetrics.
private int addPartitionMetrics(Cluster cluster, RawMetricType metricType, PrometheusQueryResult queryResult) throws InvalidPrometheusResultException {
int brokerId = getBrokerId(cluster, queryResult);
String topic = getTopic(queryResult);
int partition = getPartition(queryResult);
int metricsAdded = 0;
for (PrometheusValue value : queryResult.values()) {
addMetricForProcessing(new PartitionMetric(metricType, value.epochSeconds() * SEC_TO_MS, brokerId, topic, partition, value.value()));
metricsAdded++;
}
return metricsAdded;
}
Aggregations