spring-boot-starter-prometheus-alerts

Starter for spring boot application witch catch alerts from Prometheus Alertmanager

Лицензия

Лицензия

MIT
Категории

Категории

Spring Boot Контейнер Микросервисы Prometheus Тестирование приложения и мониторинг Monitoring
Группа

Группа

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

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

spring-boot-starter-prometheus-alerts
Последняя версия

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

1.0.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

spring-boot-starter-prometheus-alerts
Starter for spring boot application witch catch alerts from Prometheus Alertmanager
Ссылка на сайт

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

https://github.com/MikeSafonov/spring-boot-starter-prometheus-alerts
Организация-разработчик

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

com.github.mikesafonov
Система контроля версий

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

https://github.com/MikeSafonov/spring-boot-starter-prometheus-alerts

Скачать spring-boot-starter-prometheus-alerts

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

<!-- https://jarcasting.com/artifacts/com.github.mikesafonov/spring-boot-starter-prometheus-alerts/ -->
<dependency>
    <groupId>com.github.mikesafonov</groupId>
    <artifactId>spring-boot-starter-prometheus-alerts</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.mikesafonov/spring-boot-starter-prometheus-alerts/
implementation 'com.github.mikesafonov:spring-boot-starter-prometheus-alerts:1.0.0'
// https://jarcasting.com/artifacts/com.github.mikesafonov/spring-boot-starter-prometheus-alerts/
implementation ("com.github.mikesafonov:spring-boot-starter-prometheus-alerts:1.0.0")
'com.github.mikesafonov:spring-boot-starter-prometheus-alerts:jar:1.0.0'
<dependency org="com.github.mikesafonov" name="spring-boot-starter-prometheus-alerts" rev="1.0.0">
  <artifact name="spring-boot-starter-prometheus-alerts" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.mikesafonov', module='spring-boot-starter-prometheus-alerts', version='1.0.0')
)
libraryDependencies += "com.github.mikesafonov" % "spring-boot-starter-prometheus-alerts" % "1.0.0"
[com.github.mikesafonov/spring-boot-starter-prometheus-alerts "1.0.0"]

Зависимости

runtime (3)

Идентификатор библиотеки Тип Версия
org.springframework.boot : spring-boot-starter jar
org.springframework.boot : spring-boot-starter-web jar
org.slf4j : slf4j-api jar

test (4)

Идентификатор библиотеки Тип Версия
org.springframework.boot : spring-boot-starter-test jar
org.junit.jupiter : junit-jupiter jar 5.5.1
org.mockito : mockito-core jar
org.assertj : assertj-core jar 3.13.1

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

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

spring-boot-starter-prometheus-alerts

Maven Central codecov Travis-CI Conventional Commits

Quality Gate Status Reliability Rating Maintainability Rating Security Rating

Bugs Code Smells Vulnerabilities

Duplicated Lines (%) Lines of Code Technical Debt

This is a starter for spring boot application witch catch alerts from Prometheus Alertmanager.

The starter is available at https://repo1.maven.org/maven2/ repository.

Using gradle:

repositories {
    maven {url "https://repo1.maven.org/maven2/"}
}
dependencies {
    implementation 'com.github.mikesafonov:spring-boot-starter-prometheus-alerts:1.0.0'
}

The only thing you need to do after adding the dependency is to create a bean with implementation of NotificationService interface:

@Serivce
public class MyNotificationService implementation NotificationService {
...
} 

Configuration

The following properties can be configured:

property description
prometheus.alertmanager.endpoint.base base url for POST request mapping for prometheus alert (default /alert)

Build

Build from source

You can build application using following command:

./gradlew clean build -x signArchives

Requirements:

JDK >= 1.8

Unit tests

You can run unit tests using following command:

./gradlew test

Alertmanager configuration

route:
  receiver: 'my-application'
receivers:
- name: 'my-application'
  webhook_configs:
    - url: http://<application-host>:<application-port>/alert

Usage example

Contributing

Feel free to contribute. New feature proposals and bug fixes should be submitted as GitHub pull requests. Fork the repository on GitHub, prepare your change on your forked copy, and submit a pull request.

IMPORTANT!

Before contributing please read about Conventional Commits / Conventional Commits RU

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

Версия
1.0.0