Comments (8)
since this is showing up when searching for "serverites handler sensu" and I just wasted several hours trying to figure out why I am receiving notifications for warnings although I wanted only critical ...
severites != severities
so instead of
"severites": ["critical", "unknown"]
use
"severities": ["critical", "unknown"]
from sensu-plugins-slack.
having the same issue
from sensu-plugins-slack.
+1
from sensu-plugins-slack.
Try to put everything into a single file, like so:
{
"handlers": {
"slack": {
"type": "pipe",
"command": "/usr/local/bin/handler-slack.rb",
"severites": ["critical", "unknown"]
}
},
"slack": {
"webhook_url": "https://hooks.slack.com/services/...",
"template" : ""
}
}
This is how I got it working. If it still does not work, please check that all required config entries are present. The exception shown in your sensu log looks as if the handler is relying on a config entry that is nil (see also #6).
from sensu-plugins-slack.
@mnuessler Thanks! It worked.
from sensu-plugins-slack.
Can you try the latest release.
from sensu-plugins-slack.
Hi guys!
{
"handlers": {
"slack": {
"type": "pipe",
"command": "/usr/local/bin/handler-slack.rb",
"severites": ["critical", "unknown"]
}
},
"slack": {
"webhook_url": "https://hooks.slack.com/services/...",
"template" : ""
}
}
This form works to me, but a need to create two handlers and two differents slack webhooks, one for production ( slack channel like #production and one for staging ( slack channel like #staging.).
I tried create two configuration files like slack_production.json and slack_staging.json, but when it send message to slack it to send for only on channel.
Can anybody help me?
Tks
{
"handlers": {
"slack-staging": {
"type": "pipe",
"command": "/usr/local/bin/handler-slack.rb",
"severites": ["critical", "unknown"]
}
},
"slack": {
"webhook_url": "https://hooks.slack.com/services/...",
"template" : ""
}
}
{
"handlers": {
"slack-production": {
"type": "pipe",
"command": "/usr/local/bin/handler-slack.rb",
"severites": ["critical", "unknown"]
}
},
"slack": {
"webhook_url": "https://hooks.slack.com/services/...",
"template" : ""
}
}
from sensu-plugins-slack.
@eraldobernardino-luizalabs The Slack handler's config need to be named differently. Try the JSON below. I renamed the Slack config for each environment, and then pointed the handler to the respective config with -j config_name
{
"handlers": {
"slack-staging": {
"type": "pipe",
"command": "/usr/local/bin/handler-slack.rb -j slack-staging",
"severites": ["critical", "unknown"]
}
},
"slack-staging": {
"webhook_url": "https://hooks.slack.com/services/...",
"template" : ""
}
}
{
"handlers": {
"slack-production": {
"type": "pipe",
"command": "/usr/local/bin/handler-slack.rb -j slack-production",
"severites": ["critical", "unknown"]
}
},
"slack-production": {
"webhook_url": "https://hooks.slack.com/services/...",
"template" : ""
}
}
from sensu-plugins-slack.
Related Issues (20)
- Any chance to port to sensu-go HOT 6
- the plugin ignores HTTP status code
- Can't get working handler HOT 3
- Error SSL, dont work HOT 4
- Problem with "127" (Unknown) exit codes HOT 3
- More then one Slack team does not function properly HOT 1
- Issues with slack multichannel handler HOT 1
- http:// and missing images HOT 5
- icon_emoji attribute not supported by multichannel plugin HOT 2
- slack message_template HOT 3
- Define channel on check. HOT 2
- Add playbook/runbook link to aid operations in resolution of alerts HOT 1
- Event filtering in sensu-plugin is deprecated causing the handler not to always work HOT 14
- Only configured channels recieve notifications? HOT 9
- Omit field if missing from event HOT 3
- Update sensu-plugin dep to 2.7 to pick up new Sensu 2 event data mapping HOT 1
- message_template ignored if check has a notification HOT 1
- Slack forces SSL/TLS for all endpoints, even http HOT 1
- Adding payload_template stops messages sending to Slack HOT 2
- Correction in payload_template example in readme
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 sensu-plugins-slack.