wongnai / kube-slack

Kubernetes Slack Monitoring
MIT License
323 stars 59 forks source link

Document how to setup the Slack integration #5

Closed johanhaleby closed 7 years ago

johanhaleby commented 7 years ago

I've created a slack bot and invited it to a channel and tried to configure the SLACK_URL to the best of my knowledge but nothing seem to happen. The kube-slack pod doesn't print anything to the logs that indicates an error (I'm using the tagged v1.1.0 v2.0.0 version). Thus it's hard to troubleshoot what's going wrong. It would be nice if you could provide some additional docs describing in more depth how one should create and configure the slackbot.

whs commented 7 years ago

The bot doesn't say anything in the chat immediately, you will have to spawn a failing pod first to test whether it works or not. (Try running a pod with unexisting image)

Thanks for your suggestion on the documentation.

johanhaleby commented 7 years ago

@whs Oh so it only notifies on failures (this is actually a good thing I think :))? I thought it notified on everything so I've just tried to delete a random pod to the RC recreate it. I thought that this would make the bot create comment in the channel.

fhemberger commented 7 years ago

It would be nice to have the bot output something like "kube-slack started" on initialization. Also: Is there a way to provoke a bot message to check if everything has been set up correctly?

whs commented 7 years ago

There is no way to trigger bot interaction, as I designed the bot to be pretty lightweight (it doesn't open connection to Slack all the time, nor it requires you to setup webhook). I don't think this feature will be added.

To test whether bot is working, try creating a pod but set the image name to be something not existing. It should send a message to Slack that the pod is in ErrImgPull status.

On Wed, Dec 21, 2016 at 3:32 PM, Frederic Hemberger < notifications@github.com> wrote:

It would be nice to have the bot output something like "kube-slack started" on initialization. Also: Is there a way to provoke a bot message to check if everything has been set up correctly?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/whs/kube-slack/issues/5#issuecomment-268465543, or mute the thread https://github.com/notifications/unsubscribe-auth/AAVFi9r3s-KaDggw6ScgHyUtNF4ClaPlks5rKOQGgaJpZM4LRolz .

fhemberger commented 7 years ago

Okay, I used the following pod description for testing (maybe it makes sense to add a note to the README):

apiVersion: v1
kind: Pod
metadata:
  name: kube-slack-test
spec:
  containers:
  - image: willwill/kube-slack-test:latest
    name: kube-slack-test

(Unfortunately the bot didn't show a message, I have to check my setup again.)

whs commented 7 years ago

I updated the installation guide, thanks for your suggestion.