Post formatted log messages to slack, mentioning users when error ocurrs
Project description
licenseware-logblocks
How it works?
Given a continuous log producer:
while true; do echo $RANDOM | tee -a /tmp/awesome-app.log; sleep 1; done
When tail
is called on generated log file push strings into licenseware_logblocks.py
parse them and publish formated message to slack.
tail -f /tmp/awesome-app.log | python3 licenseware_log_blocks.py
SLACK_TAGGED_USERS_IDS - will be tagged on all ERRORS
Requirements
Environment variables:
SLACK_TAGGED_USERS_IDS
(ex:export SLACK_TAGGED_USERS_IDS="<@U02CS9QL0JK>, <@U02U2KQ7N3Y>, <@U030JAJF5RV>, <@U02SDCAHJH3>, <@UHW04RBGT>"
);SLACK_CHANNEL_WEBHOOK_URL
(ex:export SLACK_CHANNEL_WEBHOOK_URL=https://hooks.slack.com/services/etc/etc/etc
)
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
Built Distribution
File details
Details for the file licenseware-logblocks-0.1.1.tar.gz
.
File metadata
- Download URL: licenseware-logblocks-0.1.1.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | db7af3214a26db69d3802a04b2212e652928cfa5be120a8429451368739cc9aa |
|
MD5 | bf200a582903412fb7cebf394286d639 |
|
BLAKE2b-256 | cdb5687510b207f2b7dfecf804f9b135d11849e21d56f3a8ba9b91f1332b94a3 |
Provenance
File details
Details for the file licenseware_logblocks-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: licenseware_logblocks-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73b6224cfa4447feea2b677ff42d76607948e7ea7c2c20c0cea5059e7c6ea8d1 |
|
MD5 | 0b006158db1ec688bd86dfa6769c45fd |
|
BLAKE2b-256 | 13b4609b5608194eef230616e7f13a8dfd95e0e50005ded3a4bc98ed1fc34c12 |