Skip to main content

Slack bot to watch log files and run basic server commands

Project description

https://pypi.org/project/geologs https://pypi.org/project/geologs

Geologs - Slack Bot

  • Runs basic system commands and pipes the output to slack
  • Watches specified log files and parses new lines before posting them in a specific slack channel

Pull requests welcome.

Installation

pip install geologs

A new Slack application needs to be made for each server. Use manifest.json as a template for the required permissions.

It is expected the API keys are given as environmental variables as SLACK_BOT_TOKEN and SLACK_APP_TOKEN.

python -m geologs --conf=config.toml

Configuration

Define the log files to listen to, delay in seconds between checking the file and an optional parser.

Available parsers can be found in geologs/parsers.py to format the logs in a pretty format.

[testing]
channel = "#tephrite"
logfile = "test.log"
delay = 10
parser = "basic"

[test2]
channel = "#rocks-are-cool"
logfile = "test.log"
delay = 5
parser = "basic"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

geologs-0.0.6.tar.gz (7.6 kB view hashes)

Uploaded Source

Built Distribution

geologs-0.0.6-py3-none-any.whl (9.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page