logchecker

module
v0.0.0-...-4389925 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2015 License: LGPL-3.0

README

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": ["user_1@host.com"], // 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.

Directories

Path Synopsis
Package logchecker is a simple library to check a list of logs files and send notification about their abnormal activities.
Package logchecker is a simple library to check a list of logs files and send notification about their abnormal activities.
Main package
Main package

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL