Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ikstream/systemwatchslack
Python script with systemd units to watch for failed services
https://github.com/ikstream/systemwatchslack
python3 slack slack-webhook systemd systemd-service systemd-timer
Last synced: 6 days ago
JSON representation
Python script with systemd units to watch for failed services
- Host: GitHub
- URL: https://github.com/ikstream/systemwatchslack
- Owner: ikstream
- License: mit
- Created: 2017-05-11T21:26:37.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-03-11T14:55:54.000Z (almost 7 years ago)
- Last Synced: 2024-11-19T08:50:57.860Z (2 months ago)
- Topics: python3, slack, slack-webhook, systemd, systemd-service, systemd-timer
- Language: Python
- Size: 6.84 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SystemWatchSlack
Python script with systemd units to watch for failed servicesThis script will use `systemd --failed` to retrieve failed services
and post them to the slack team and channel you specify## Usage
To use SystemWatchSlack you first have to set your team and channel in `systemd-watcher.py`Afterward copy the systemd timer and service file to your systemd directory
`# cp watch-systemd.* /etc/systemd/system/`Now enable and start the timer
`# systemctl enable watch-systemd.timer`
`# systemctl start watch-systemd.timer`By default the timer will start the script every 10 minutes and 30 seconds after reboot. You can change this in watch-systemd.timer.
Change start time after reboot to 20 seconds
`OnBootSec=20sec`Change intervall to every week
`OnUnitActiveSec=1w`