Skip to content
This repository has been archived by the owner on Mar 21, 2023. It is now read-only.
/ logchecker Public archive

It is a simple library to check a list of logs files and send notification about their abnormal activities.

License

Notifications You must be signed in to change notification settings

z0rr0/logchecker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LogChecker

GoDoc Build Status

It is a simple library to check a list of logs files and send notification about their abnormal activities.

IMPORTANT: It is in development now.

Usage

Only Linux is supported now.

API descriptions can be found on godoc.org.

Configuration

Files for observation can be added using a configuration file, see examples in config.example.json.

Description of "observed" array element:

{
  "name": "My service #2",           // Service name
  "files": [                         // watched files
    {
      "file": "/var/log/syslog",     // absolute file path
      "pattern": "My service error", // regexp pattern for monitoring
      "increase": false,             // increase "boundary" value during a time period
      "emails": ["[email protected]"], // email addresses for notifications
      "boundary": 1,                 // boundary value for notifications
      "period": 3600,                // time period
      "limit": 6                     // maximum emails during a time period
    }
  ]
}

Testing

Use standard Go testing mechanism:

cd $GOPATH/src/github.com/z0rr0/logchecker/logchecker
go test

There is a nice article about tests covering.

Dependencies

Design guidelines

There are recommended style guides:

A compliance with the second style guide can be checked using go-lint tool.

License

This source code is governed by a LGPLv3 license that can be found in the LICENSE file.

About

It is a simple library to check a list of logs files and send notification about their abnormal activities.

Resources

License

Stars

Watchers

Forks

Packages

No packages published