From e1aadb8a2d9e7aa1c3960a1aa2a1bd5ceec4e17e Mon Sep 17 00:00:00 2001 From: Tamas Gal <tgal@km3net.de> Date: Fri, 4 Oct 2019 17:39:24 +0200 Subject: [PATCH] Post the status of the monitoring --- scripts/chatbot.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/chatbot.py b/scripts/chatbot.py index efd80e6..29da68b 100644 --- a/scripts/chatbot.py +++ b/scripts/chatbot.py @@ -14,6 +14,7 @@ Options: """ import re +import subprocess import toml from rocketchat_API.rocketchat import RocketChat from RocketChatBot import RocketChatBot @@ -61,7 +62,8 @@ def register_handlers(bot): if channel_id != CHANNEL_ID: print("skipping") return - bot.send_message('erm... smooth datataking... for sure', channel_id) + status = subprocess.check_output(['supervisorctl', 'status']) + bot.send_message(status, channel_id) def shifters(msg, user, channel_id): if channel_id != CHANNEL_ID: -- GitLab