Skip to content

gilbruno/slack-notifications

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Slack-Notification

Description

This app implemented in TypeScript is an app that can be used to be notified in Slack when application errors occurs. A setting configuration enables this.

A scheduler (Cron) is launched to scan your logging file. When it encounters the string pattern you set in the configuration file, a slack notifiation is displayed int he slack channel you set in this same configuration file.

Remarks : We use sed native linux command to scan the error pattern so it can only work under Linux System

## Configuration

The configuration file is put under .secret direvctory. Below an example of the conf file :

{
    "app1" : 
        {
            "mode": "reset",
            "cronPattern": "*/20 * * * * *",
            "filePath": "~/test1.txt",
            "apiKey": "",
            "channelName": "#app1-notifications",
            "searchPattern": ["error", "erreur"],
            "slackOAuthtoken": ""
        },
    "app2" : 
        {
            "mode": "reset",
            "cronPattern": "*/10 * * * * *",
            "filePath": "~/test2.txt",
            "apiKey": "",
            "channelName": "#app2-notifications",
            "searchPattern": ["error"],
            "slackOAuthtoken": ""
        }    
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published