Collects error messages ad sends them to Microsoft Teams or Telegram

Overview

ErrorCollector Logback-classic Maven metadata URL

This projects aims to provide a convenient way to be notified if an error in on of your systems occurs.

The appender will collect all errors in a configurable interval (default 5 min).

If exception occurred will send them to the configured publisher(Microsoft Teams and Telegram are currently supported)

Gradle

kotlinscript:

repositories{
  mavenCentral()
}
dependencies{
  implementation("net.mayope:errorcollector:x.x.x")
}

groovy:

repositories{
  mavenCentral()
}
dependencies{
  implementation 'net.mayope:errorcollector:x.x.x'
}

Maven

<dependency>
  <groupId>net.mayopegroupId>
  <artifactId>errorcollectorartifactId>
  <version>0.0.7version>
dependency>

Usage Telegram

Example Logback configuration

ERROR https://api.telegram.org -5514719561 1711031898:AAEtyASDJwnl73or02KLttD3zPlWWIPuxVs https://my.deployed.pastebin username password exception1;exception2 60 600 github https://github.com/mayope/errorcollector/issues/new https://github.com/mayope/errorcollector/issues/new myCoolService PRODUCTION ">
xml version="1.0" encoding="UTF-8"?>
<configuration>

    <appender name="errorAppender" class="net.mayope.errorcollector.TelegramAppender">
        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
            <level>ERRORlevel>
        filter>
        <url>https://api.telegram.orgurl>
        <chatId>-5514719561chatId>
        <botToken>1711031898:AAEtyASDJwnl73or02KLttD3zPlWWIPuxVsbotToken>
      
        <urlPastebin>https://my.deployed.pastebinurlPastebin>
        <pastebinUsername>usernamepastebinUsername>
        <pastebinPassword>passwordpastebinPassword>
        <blacklist>exception1;exception2blacklist>
        <connectTimeOut>60connectTimeOut>
        <readTimeOut>600readTimeOut>
        <issueProvider>githubissueProvider>
        <issueBaseUrl>https://github.com/mayope/errorcollector/issues/newissueBaseUrl>
        <sendIntervalMinutes>https://github.com/mayope/errorcollector/issues/newsendIntervalMinutes>
        <serviceName>myCoolServiceserviceName>
        <activateOnEnv>PRODUCTIONactivateOnEnv>
    appender>

    <root level="ERROR">
        <appender-ref ref="errorAppender"/>
    root>
configuration>

Parameter

  • url: String, optional, default = "https://api.telegram.org"

  • chatId: String, required

  • botToken: String, required

  • connectTimeOut: Long, optional, default = 60ms

  • readTimeOut: Long, optional, default = 600ms

  • urlPastebin: String?, optional, default = null

    | this can be used to post stacktraces to a pastebin. In the message will then appear a link to the pastebin for this stacktrace

  • pastebinUsername: String?, optional, default = null

  • pastebinPassword: String?, optional, default = null

    | This parameters can be used for basic authentication against the configured pastebin

  • blacklist: String = "", optional, default = null

    | Will split all strings in this parameter by ; and if an exception contains any of this strings, it will be dropped

  • issueProvider: String?, optional, default = null, possible values= jira,github

    | this parameter can be used to create an issue create link in the message

  • issueBaseUrl: String?, optional, default = null

  • sendIntervalMinutes: Long, optional, default = 5

  • serviceName: String?, optional, default = Environment variable HOSTNAME or if this is also null ""

  • activateOnEnv: String?, optional ,default = null

    | Only enable error sending if this environment variable is set to any value

Usage Teams

Example Logback Configuration

ERROR https://outlook.office.com/webhook/456654612321651 https://my.deployed.pastebin username password exception1;exception2 60 600 github https://github.com/mayope/errorcollector/issues/new https://github.com/mayope/errorcollector/issues/new myCoolService PRODUCTION ">
xml version="1.0" encoding="UTF-8"?>
<configuration>

  <appender name="teamsAppender" class="net.mayope.errorcollector.TeamsAppender">
    <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
      <level>ERRORlevel>
    filter>
    <webhookUrl>https://outlook.office.com/webhook/456654612321651webhookUrl>
    
    <urlPastebin>https://my.deployed.pastebinurlPastebin>
    <pastebinUsername>usernamepastebinUsername>
    <pastebinPassword>passwordpastebinPassword>
    <blacklist>exception1;exception2blacklist>
    <connectTimeOut>60connectTimeOut>
    <readTimeOut>600readTimeOut>
    <issueProvider>githubissueProvider>
    <issueBaseUrl>https://github.com/mayope/errorcollector/issues/newissueBaseUrl>
    <sendIntervalMinutes>https://github.com/mayope/errorcollector/issues/newsendIntervalMinutes>
    <serviceName>myCoolServiceserviceName>
    <activateOnEnv>PRODUCTIONactivateOnEnv>
  appender>

  <include resource="org/springframework/boot/logging/logback/base.xml"/>
  <logger name="org.springframework" level="INFO"/>

  <root level="ERROR">
    <appender-ref ref="teamsAppender"/>
  root>
configuration>

Parameter

  • webhookUrl: String, required

Following parameters are the same as for the Telegram Appender

You might also like...
BluePass extracts two factor authentication codes (2FA) from SMS and sends them to a paired device via Bluetooth RFCOMM.
BluePass extracts two factor authentication codes (2FA) from SMS and sends them to a paired device via Bluetooth RFCOMM.

BluePass extracts two factor authentication codes (2FA) from SMS and sends them to a paired device via Bluetooth RFCOMM.

Recover deleted messages for whatsapp and Facebook lets you recover messages that sender deleted

Recover deleted messages for whatsapp and Facebook lets you recover messages that sender deleted. It also recover deleted media Images, Audio, Video etc

Sync chat messages and various information on Telegram and Minecraft

Sync chat messages and various information on Telegram and Minecraft

Bringing webhooks into Telegram. Push messages to chats via URL with a simple API.
Bringing webhooks into Telegram. Push messages to chats via URL with a simple API.

Webhooks over Telegram (WoT) WoT aims to provide a simple API for registering webhooks and sending messages to Telegram chats via them using a single

NekoX is an free and open source third-party Telegram client, based on Telegram-FOSS with features added.

NekoX NekoX is an free and open source third-party Telegram client, based on Telegram-FOSS with features added. We are no longer able to update versio

EplFootball - Android application displaying EPL teams and their players using MVVM, Coroutines, Flow, Live Data, Retrofit, View Binding, Data Binding, Hilt e.t.c Kotlin Multiplatform is an SDK for cross-platform mobile development, which enables teams to use the same business logic in both Android and iOS client applications.
Kotlin Multiplatform is an SDK for cross-platform mobile development, which enables teams to use the same business logic in both Android and iOS client applications.

Kotlin Multiplatform is an SDK for cross-platform mobile development, which enables teams to use the same business logic in both Android and iOS client applications.

App that helps to scan barcodes, Qr that sends to destined link
App that helps to scan barcodes, Qr that sends to destined link

ScanCode Aplicación Android ScanCode Escanea cualquier código Implementación de

Microsoft Services SDKs for Android produced by MS Open Tech.

Important: This preview SDK has been deprecated and is no longer being maintained. We recommend that you use Microsoft Graph and the associated Micros

Android samples built using Jetpack Window Manager for foldable and dual-screen devices like Microsoft Surface Duo.

Jetpack Window Manager samples for dual-screen and foldable devices like Microsoft Surface Duo Android app samples that use Jetpack Window Manager to

This repo contains components built with Jetpack Compose for the Microsoft Surface Duo.

Surface Duo Jetpack Compose SDK This repo contains components built with Jetpack Compose for the Microsoft Surface Duo and other large screen and fold

Microsoft Fluent UI implemented in Jetpack Compose.

fluentui (WIP) Microsoft Fluent UI implemented in Jetpack Compose. Controls Some of the controls available include: ActionBarLayout AppBarLayout Avata

Button for android with animations for transition and error states.
Button for android with animations for transition and error states.

Transition Button Android Preview Expand animation: Shake animation: Installation Gradle dependencies { implementation 'com.royrodriguez:transitionbu

A simple watchdog that detects Android ANR (Application Not Responding) error and throws a meaningful exception

ANR-WatchDog A simple watchdog that detects Android ANRs (Application Not Responding). Table of contents ANR-WatchDog Table of contents Why it exists

Create & Show progress, data or error views, the easy way!
Create & Show progress, data or error views, the easy way!

State Views for Android (BETA version) Create & Show progress, data or error views, the easy way! StateViews is based on ViewSwitcher mechanism and al

Error handling library for Android and Java

ErrorHandler Error handling library for Android and Java Encapsulate error handling logic into objects that adhere to configurable defaults. Then pass

Robust error-handling for Kotlin and Android
Robust error-handling for Kotlin and Android

Code Complete: A Practical Handbook of Software Construction, on error-handling techniques: Consumer applications tend to favor robustness to correctn

See a pretty error screen when your Android app crashes
See a pretty error screen when your Android app crashes

WhatTheStack WhatTheStack is a library to make your debugging experience on Android better. It shows you a pretty error screen when your Android App c

Powerful Error Detector for Android
Powerful Error Detector for Android

Erratum Powerful Error Detector for Android Preview If an exception is detected, the exception activity is automatically launched. This activity also

Owner
Mayope
Simple Kubernetes Hosting
Mayope
Talkufy brings you everything you need. From chatting, video calling (Beta), translating messages, group chats and lots more.

Talkufy A highly advanced and encrypted open source featured chat/video calling app for android using Firebase Firestore and Jitsi Meet. With this app

Scooter 12 Dec 16, 2022
This command line program can extract chat messages send on the Minecraft server HGLabor

HGLabor-Log-Extractor Das Programm durchläuft einmalig deine Minecraft-Logs und sammelt alle Nachrichten heraus, die auf HGLabor geschrieben wurden. K

null 4 Dec 12, 2021
SayHi! is an instant messaging app that allows users to send text messages to other people using the app

SayHi SayHi! is an instant messaging app that allows users to send text messages to other people using the app ?? Screen Shots ?? Features OTP Verific

Prince Fahad 0 Dec 25, 2021
Multi Lingual Chat app - A modern chat application that allows users to translate text messages into their preferred language

Multi Lingual Chat app - A modern chat application that allows users to translate text messages into their preferred language

Manjunath Nayak 0 Jan 18, 2022
Unofficial, FOSS-friendly fork of the original Telegram client for Android

or 1McafEgMvqAVujNLtcJumZHxp2UfaNByqs Telegram-FOSS Telegram is a messaging app with a focus on speed and security. It’s superfast, simple and free. T

null 2k Jan 1, 2023
Telegram bot provides time-based currency

Timecobot Telegram bot provides time-based currency. The accumulated time can be used to block another user. There are no discriminatory rules, admini

Daniel Demidko 21 Jul 14, 2022
A hybrid chat android application based on the features of Instagram and Whatsapp having UI just as Telegram.

A hybrid chat android application based on the features of Instagram and Whatsapp having UI just as Telegram.

Ratik Tiwari 1 May 22, 2022
Simple telegram cat-captcha bot

kotlin-project-template Project Template for convenient project setup. Motivation Every time I create a new project, I do a lot of routine work, so th

Alex Sokol 15 Nov 16, 2022
Telegram client based on official Android sources

Telegram messenger for Android Telegram is a messaging app with a focus on speed and security. It’s superfast, simple and free. This repo contains the

Dmitry Kotov 12 Dec 25, 2022
Matches incoming and/or outgoing text messages against set rules and sends them over to webhook.

Textmatic If you ever wanted a tool to simply push the SMS (or text messages) from your phone to somewhere remote, this is it. This app matches all in

Float 2 Jan 7, 2022