Git Product home page Git Product logo

Comments (14)

darkcrux avatar darkcrux commented on August 19, 2024

Seems like a bug. Will check it out.

from consul-alerts.

darkcrux avatar darkcrux commented on August 19, 2024

hi @lyrixx Just released the v0.1.2 and we now have a better error message for slack. Thanks for this.

from consul-alerts.

lyrixx avatar lyrixx commented on August 19, 2024

OK, I will try this ASAP ;)

from consul-alerts.

lyrixx avatar lyrixx commented on August 19, 2024

So I tested it, and now in the log I got:

time="2014-11-14T09:49:22Z" level="info" msg="Unable to notify slack: No hooks"

Do you have an idea?


I have create a token on https://api.slack.com/
I have tested it on https://api.slack.com/methods/chat.postMessage/test and it worked well.

from consul-alerts.

darkcrux avatar darkcrux commented on August 19, 2024

Might be possible that you configured it wrong? I got this error when I had the wrong token. Slack's a bit tricky to get running as the return message from their API is pretty vague. My bet is it can be the token, or some other variable that's part of the hook URL.

from consul-alerts.

lyrixx avatar lyrixx commented on August 19, 2024

I try to rebuild the token, and I got the same result. I googled this error and some people are talking about room_id and not room_name.

I filled all theses information: What is really mandatory / optional ?

screenshot-consul - mozilla firefox-1

from consul-alerts.

darkcrux avatar darkcrux commented on August 19, 2024

The cluster-name is surely optional, it's just there for better message formatting to Slack.

channel is probably the room_id/room_name they are talking about. During webhook integration setup, you can set this to a default channel. So this is required if that has not been setup yet.

icon-emoji is optional.

token is required.

username can be optional. it's the username that the hook will use.

Basically what the slack notifier does is send a payload to this url:

https://{{ team }}.slack.com/services/hooks/incoming-webhook?token={{ token }}

from consul-alerts.

lyrixx avatar lyrixx commented on August 19, 2024

I don't understand why it did not work. I try to curl it manually:

(I copied it from https://api.slack.com/)

>(18)[~] curl -X POST https://sensiolabs.slack.com/services/hooks/incoming-webhook?token=xoxp-XXXXXXXXXXXXXXXXXXXXX
No hooks>(18)[~] 
>(18)[~] curl -X POST https://SensioLabs.slack.com/services/hooks/incoming-webhook?token=xoxp-XXXXXXXXXXXXXXXXXXXXX
No hooks>(18)[~]

from consul-alerts.

darkcrux avatar darkcrux commented on August 19, 2024

I tried it with ours and it seems to work. It might be the token.

$ curl -X POST https://acaleph.slack.com/services/hooks/incoming-webhook?token=xxxxxxxxxxxxxxxxxxxxxxxx
No payload received

The last time I got a No hooks error was when I got the token wrong.

from consul-alerts.

lyrixx avatar lyrixx commented on August 19, 2024

I open an issue in slack

I tried to set-up consul-alerts communication with slack and I'm not able to do it. See the issue for more information about the product: https://github.com/AcalephStorage/consul-alerts/issues/20

So I tried to debug it a bit with curl:

curl -X POST https://SensioLabs.slack.com/services/hooks/incoming-webhook?token=xoxp-xxxxxxxxxxxxx -H "Host: SensioLabs.slack.com"
No hooks

I got my token and the team name on https://api.slack.com/

As you can see the repository owner tried also and he got "no payload".

I'm not sure but I guess it could be an issue with our team name. In your database, the team name is "SensioLabs". But, May be, when the HTTP request hit your application, the hostname is converted to lower case, and so I'm not fully authenticated?

Can you help me with that?

But I don't understand someting with your URL. I'm not able to find the documentation about it, and It don't understand why you don't use the "regular" API documented there https://api.slack.com/methods/chat.postMessage ?

from consul-alerts.

lyrixx avatar lyrixx commented on August 19, 2024

hmm, I understand What I did wrong. I will submit a (doc) PR to your repository to help others user (after lunch) ;)

from consul-alerts.

lyrixx avatar lyrixx commented on August 19, 2024

Voila, I just open a PR: #23

from consul-alerts.

darkcrux avatar darkcrux commented on August 19, 2024

Cool. Thanks. Merged. :)

from consul-alerts.

lyrixx avatar lyrixx commented on August 19, 2024

Wahoo, So fast ;) I hope It will help new comers ;)

from consul-alerts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.