mtyurt / supervisor-event-to-slack

A small tool to send supervisor events to Slack
BSD 3-Clause "New" or "Revised" License
8 stars 1 forks source link

Not receiving slack messages apart from starting state #1

Open Kaali09 opened 2 years ago

Kaali09 commented 2 years ago

Hi, @mtyurt

Thanks for awesome tool.

I have configured the supervisor to send slack notification for process_state but I am receving the notification only for STARTING state. Not getting notification for RUNNING, STOPPED state. Could you please help me with this?

Below is the script and configuration:

echo.sh

#!/bin/bash
set -e
echo "Hello Kali"

sleep 10
echo "Hello guys" >> /tmp/test.txt

supervisord.conf

[program:echo]
command=/usr/local/bin/echo.sh
process_name=%(program_name)s
autostart=true
autorestart=true
redirect_stderr=true
user=root
[eventlistener:status_listener]
command=/usr/local/bin/supervisor-event-to-slack
events=PROCESS_STATE
autostart=true
buffer_size=1024
environment=SLACK_TOKEN="xxxxxxxx",SLACK_CHANNNEL="sssd-test"
Kaali09 commented 2 years ago

@mtyurt Thanks for checking this.

Kindly let me know the mistake I am doing here and if possible please share sample script if you have to test this as you mentioned here https://mtyurt.net/post/2018/monitoring-supervisord-processes-in-slack-with-go.html...

Kaali09 commented 2 years ago

Did you get time to check this @mtyurt

Kaali09 commented 2 years ago

@mtyurt Could you please update on this?

edwardl0406 commented 2 weeks ago

I faced the same issue, when looking up stderr, it's due to Error: SLACK_CHANNEL cannot be found

After investigating the issue, I found a type in configuration example. This is a typo, SLACK_CHANNNEL should be SLACK_CHANNEL

This is a very good program, appreciated it!