storm-metrics-reporter-prometheus

Storm metrics reporter module that supports Prometheus Gateway

Лицензия

Лицензия

Категории

Категории

Metrics Тестирование приложения и мониторинг Monitoring Prometheus ORM Данные
Группа

Группа

com.wizenoze
Идентификатор

Идентификатор

storm-metrics-reporter-prometheus
Последняя версия

Последняя версия

0.0.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

storm-metrics-reporter-prometheus
Storm metrics reporter module that supports Prometheus Gateway
Ссылка на сайт

Ссылка на сайт

https://github.com/wizenoze/storm-metrics-reporter-prometheus
Организация-разработчик

Организация-разработчик

WizeNoze BV
Система контроля версий

Система контроля версий

https://github.com/wizenoze/storm-metrics-reporter-prometheus

Скачать storm-metrics-reporter-prometheus

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.wizenoze/storm-metrics-reporter-prometheus/ -->
<dependency>
    <groupId>com.wizenoze</groupId>
    <artifactId>storm-metrics-reporter-prometheus</artifactId>
    <version>0.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.wizenoze/storm-metrics-reporter-prometheus/
implementation 'com.wizenoze:storm-metrics-reporter-prometheus:0.0.1'
// https://jarcasting.com/artifacts/com.wizenoze/storm-metrics-reporter-prometheus/
implementation ("com.wizenoze:storm-metrics-reporter-prometheus:0.0.1")
'com.wizenoze:storm-metrics-reporter-prometheus:jar:0.0.1'
<dependency org="com.wizenoze" name="storm-metrics-reporter-prometheus" rev="0.0.1">
  <artifact name="storm-metrics-reporter-prometheus" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.wizenoze', module='storm-metrics-reporter-prometheus', version='0.0.1')
)
libraryDependencies += "com.wizenoze" % "storm-metrics-reporter-prometheus" % "0.0.1"
[com.wizenoze/storm-metrics-reporter-prometheus "0.0.1"]

Зависимости

provided (1)

Идентификатор библиотеки Тип Версия
org.apache.storm : storm-core jar 1.2.2

test (4)

Идентификатор библиотеки Тип Версия
org.junit.jupiter : junit-jupiter-api jar 5.1.0
org.junit.jupiter : junit-jupiter-engine jar 5.1.0
org.mockito : mockito-junit-jupiter jar 2.23.4
org.hamcrest : hamcrest-library jar 1.3

Модули Проекта

Данный проект не имеет модулей.

storm-metrics-reporter-prometheus

Storm metrics reporter module that supports Prometheus Push Gateway

Motivation

Apache Storm supports the following metrics reporters at the time of writing.

  • Console Reporter (org.apache.storm.metrics2.reporters.ConsoleStormReporter): Reports metrics to System.out.
  • CSV Reporter (org.apache.storm.metrics2.reporters.CsvReporter): Reports metrics to a CSV file.
  • Ganglia Reporter (org.apache.storm.metrics2.reporters.GagliaStormReporter): Reports metrics to a Ganglia server.
  • Graphite Reporter (org.apache.storm.metrics2.reporters.GraphiteStormReporter): Reports metrics to a Graphite server.
  • JMX Reporter (org.apache.storm.metrics2.reporters.JmxStormReporter): Exposes metrics via JMX.

The closest which could be used to push data to Prometheus is org.apache.storm.metrics2.reporters.JmxStormReporter. That could be put together with Prometheus JMX exporter in theory, there's one pitfall thought.

Prometheus provides a Java agent which spins up a lightweight HTTP server. That doesn't fit well with Storm's architecture, because the supervisor might create multiple worker processes on a single node and those workers would try to open the same HTTP port.

Having looked into org.apache.storm.metrics2.reporters.GraphiteStormReporter, it was pretty close what we actually need, but with Prometheus.

Installation

Download storm-metrics-reporter-prometheus-0.0.1-SNAPSHOT.jar from here and put into underneath {STORM_DIR}/extlib and/or ${STORM_DIR}/extlib-daemon depending upon the metrics of which process(es) you want to send to Prometheus.

Add enable Prometheus Metrics Reporter in storm.yaml.

storm.metrics.reporters:
  # Prometheus Reporter
  - class: "com.wizenoze.storm.metrics2.reporters.PrometheusStormReporter"
    daemons:
        - "supervisor"
        - "nimbus"
        - "worker"
    report.period: 60
    report.period.units: "SECONDS"
    filter:
      class: "org.apache.storm.metrics2.filters.RegexFilter"
      expression: "storm\\.worker\\..+\\..+\\..+\\.(?:.+\\.)?-?[\\d]+\\.\\d+-(emitted|acked|disruptor-executor.+-queue-(?:percent-full|overflow))"

    prometheus.scheme: "http"
    prometheus.host: "localhost"
    prometheus.port: 9091

Point prometheus.host and prometheus.port to your Prometheus Push Gateway. You may adjust report.period and report.period.units to make it aligned with Prometheus' scrape interval, as well as the filter expression according to your needs.

com.wizenoze

Wizenoze

Версии библиотеки

Версия
0.0.1