Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gyndlf/geologs
Slack bot to watch log files and run basic server commands
https://github.com/gyndlf/geologs
bot python slack
Last synced: 3 months ago
JSON representation
Slack bot to watch log files and run basic server commands
- Host: GitHub
- URL: https://github.com/gyndlf/geologs
- Owner: gyndlf
- License: other
- Created: 2024-09-08T00:51:43.000Z (5 months ago)
- Default Branch: master
- Last Pushed: 2024-09-13T06:33:39.000Z (5 months ago)
- Last Synced: 2024-10-04T21:35:56.123Z (4 months ago)
- Topics: bot, python, slack
- Language: Python
- Homepage: https://pypi.org/project/geologs/
- Size: 29.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
![https://pypi.org/project/geologs](https://img.shields.io/pypi/v/geologs.svg) ![https://pypi.org/project/geologs](https://img.shields.io/pypi/wheel/geologs) ![](https://img.shields.io/badge/certified-cool_project-blue)
# 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 channelPull 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.
```toml
[testing]
channel = "#file-logs"
logfile = "test.log"
delay = 10
parser = "basic"[test2]
channel = "#ssh-logins"
logcmd = "journalctl -u sshd --no-pager -f"
delay = 5
parser = "ssh"
```