Push logs generated by Pioreactors to your Slack workspace
Project description
Pioreactor Logs2Slack
This is a Pioreactor plugin to post a bioreactor's logs to a Slack channel.
Installation
This is a two part installation.
1. Setting up your Slack workspace
-
You probably want a dedicated channel for incoming logs, as it can get chatty. So go ahead and create a dedicated channel in your Slack workspace. I've called mine
experiment_logs
. -
In Your Apps, click "Create New App" -> From "Scratch". Give it a name (something descriptive, like
Pioreactor Logs2Slack
), and select the workspace. -
On the next page, select "Incoming Webhooks", and turn "Activate" to
On
-
Click "Add new webhook to workspace"
-
In the next section, select the channel you made in step 1. Click "Allow".
-
On the next page, under "Webhook URL", is your new webhook URL, something like
https://hooks.slack.com/services/ABC.../124...
. Important: this is private, don't share it with untrusted people, don't commit it into Github, etc.
2. Installing this plugin
-
In your Pioreactor interface, click on "Plugins". Find
pioreactor-logs2slack
, and click "Install" beside it. Or you can runpio plugins install pioreactor-logs2slack
. Either way, this plugin will be installed on your leader Pioreactor. -
After installing (should take less than a minute), click on "Configuration". At the bottom of the page will be a section called
[logs2slack]
.
[logs2slack]
slack_webhook_url=
log_level=INFO
Add your webhook URL from step 6. here. Click "Save". You can also change the level of logs to report, see Python logging levels.
-
Power-cycle (reboot) the Pioreactor leader, or ssh into the Pioreactor leader and run
sudo systemctl restart pioreactor_startup_run@logs2slack.service
-
In your dedicated Slack channel, you should start to see logs arrive!
Project details
Release history Release notifications | RSS feed
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 pioreactor_logs2slack-0.3.4.tar.gz
.
File metadata
- Download URL: pioreactor_logs2slack-0.3.4.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.0rc2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83152808f64ab541d8ee6dd3e31c40fa857607c537cfe069cbeb16e7d31eed10 |
|
MD5 | 9bf3653e14205503553f47992a64fddc |
|
BLAKE2b-256 | efdb2ef9a264c5827b2cab3f3608be87feb8ddcda1bc5c135d5a0a921d1cce09 |
File details
Details for the file pioreactor_logs2slack-0.3.4-py3-none-any.whl
.
File metadata
- Download URL: pioreactor_logs2slack-0.3.4-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.0rc2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | add58e0e8b173c19d398e896ed7c9cb633897767d37c077e5cf7097363389b37 |
|
MD5 | 62e9775dbdb04118fdb77001ee312cbd |
|
BLAKE2b-256 | 95448777480b138b9af02f5a01e9179ed0405359fef1e2d029fb37261fe9da7e |