Comments (6)
I think the webhook sink is covering this use case, considering incoming webhooks in Slack (https://api.slack.com/messaging/webhooks). I tested it and it works flawless. Of course you need to play with the layout, but I think one can live with this.
Maybe consider deprecating the Slack sink and recommend the webhook sink instead, since Slack recommends not using legacy tokens?
from kubernetes-event-exporter.
@minac if I recall it right, I was just adding an incoming webhook like you probably already did. My config.yaml was probably very similar to this:
logLevel: debug
route:
# Main route
routes:
# This route allows dumping all events because it has no fields to match and no drop rules.
- match:
- receiver: "alert"
receivers:
- name: "alert"
webhook:
endpoint: "https://hooks.slack.com/services/bla/bla/bla"
layout:
text: "{{.Message}}"
Hope it helped. You have to play around with the layout a bit to make it nice. But styling is probably a personal thing. Good luck!
from kubernetes-event-exporter.
I was missing that last bit of the layout. Thank you!
from kubernetes-event-exporter.
Then it's a very good first issue to contribute.
from kubernetes-event-exporter.
Hey @wcarlsen! I could use a hand, how did you configure the Slack webhook?
receivers:
- name: "slack"
webhook:
endpoint: "https://hooks.slack.com/services/bla/bla/bla"
headers:
User-Agent: kube-event-exporter 1.0
Did you use any API Token? When setting up Incoming Webhooks in Slack there are no tokens now, right?
Thanks!
from kubernetes-event-exporter.
Thanks @wcarlsen, this should be added to the docs. Also wasted few hours to realise I missed the layout section.
from kubernetes-event-exporter.
Related Issues (20)
- Add ClusterName to Events - PR Coming Soon
- Only log out to the sink HOT 1
- Template errors should have higher level ?
- Opensearch sink HOT 1
- Support itemizing config using CRDs
- Grouping results by logging query are not displayed.
- ES: only write ops with an op_type of create are allowed in data streams HOT 5
- Webhook retry?
- Export to local error
- Feature: add XML payload to Webhooks/HTTP
- LogLevel on elasticsearch HOT 1
- Integer data type in Layout?
- Slack receiver token from env variable HOT 1
- why kubernetes-event-exporter stop collect
- Kubernetes events not getting exported to ES HOT 5
- Wrong GetTimestampMs value of FailedScheduling event HOT 1
- Layout for Elastic Common Schema
- Can we export the event to mongoDB?
- Addition of Prometheus Metrics to Enhance Observability
- Future of this project HOT 5
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 kubernetes-event-exporter.