Comments (14)
Seems like a bug. Will check it out.
from consul-alerts.
hi @lyrixx Just released the v0.1.2 and we now have a better error message for slack. Thanks for this.
from consul-alerts.
OK, I will try this ASAP ;)
from consul-alerts.
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.
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.
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 ?
from consul-alerts.
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.
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.
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.
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.
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.
Voila, I just open a PR: #23
from consul-alerts.
Cool. Thanks. Merged. :)
from consul-alerts.
Wahoo, So fast ;) I hope It will help new comers ;)
from consul-alerts.
Related Issues (20)
- Support parametric notification profiles HOT 2
- Disable notifications with consul tags HOT 1
- email notifier: distinct email receivers based on consul service HOT 1
- Checks status "from [empty] to passing/critical"
- docker image does not send http-notification HOT 3
- 200 is not the only code that indicates success
- Config not updating
- Change the default URL where reads the config in consul "/consul-alerts/xxx" for another URL, for example "/consul-alerts-2/xxx"? HOT 1
- INFO[0003] Running for leader election... Error querying Consul agent: Unexpected response code: 403 (Permission denied) INFO[0003] Shutting down watcher --> Exit Code: 1 HOT 1
- Support JWT auth for HTTP notifier HOT 2
- Update docker image.
- (Stale) Reminder doesnt get deleted
- consul-alerts stops working after some time
- Can't connect to https consul endpoint
- Cant download consulalerts 0.6.0 HOT 1
- version display error
- Opsgenie notifier should allow to configure different target address
- http-endpoint-notifier : Possibility to add HTTP headers ?
- 'Running for leader election' repeating
- Incorrect policy given in README HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from consul-alerts.