We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
As shown in the screenshot, I use grafana to send a test alerts, but the text of the alerts cannot be obtained in slackbot. The following is my code
func middlewareAppMentionEvent(evt *socketmode.Event, client *socketmode.Client) { eventsAPIEvent, ok := evt.Data.(slackevents.EventsAPIEvent) if !ok { logger.Info("Ignored %+v\n", evt) return } client.Ack(*evt.Request) ev, ok := eventsAPIEvent.InnerEvent.Data.(*slackevents.AppMentionEvent) logger.Info("evText----------->", ev.Text) logger.Info("evType----------->", ev.Type) if !ok { logger.Info("Ignored %+v\n", ev) return } ... ...
The log is as follows
... {"level":"info","ts":"2022-12-22T09:44:42+08:00","msg":"evText-----------> "} {"level":"info","ts":"2022-12-22T09:44:42+08:00","msg":"evType----------->app_mention"} ...
When I ping the robot like this the logs like this:
... {"level":"info","ts":"2022-12-22T10:00:57+08:00","msg":"evText-----------><@U03***LRF> Hello world"} {"level":"info","ts":"2022-12-22T10:00:57+08:00","msg":"evType----------->app_mention"} ...
I'm not sure why I can't get the grafana alerts text
1.19.3
v0.11.3
The text was updated successfully, but these errors were encountered:
Could you try to log evt.Data?
evt.Data
Sorry, something went wrong.
Sorry for reply so late. Code for log evt.Data
func middlewareAppMentionEvent(evt *socketmode.Event, client *socketmode.Client) { eventsAPIEvent, ok := evt.Data.(slackevents.EventsAPIEvent) logger.Info("evt.Data---->", evt.Data) if !ok { logger.Info("Ignored %+v\n", evt) return } ...
log
{"level":"info","ts":"2023-01-11T18:07:09+08:00","msg":"evt.Data---->{AwKZMkAdB1AbFuoc6sn1j9fA T024GQDB5 event_callback A03GSSXUTNY 0xc0000ca460 {app_mention 0xc0000ca500}}"}
slack msg
This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.
No branches or pull requests
What happened
As shown in the screenshot, I use grafana to send a test alerts, but the text of the alerts cannot be obtained in slackbot. The following is my code
The log is as follows
Expected behavior
When I ping the robot like this

the logs like this:
I'm not sure why I can't get the grafana alerts text
Versions
1.19.3
v0.11.3
The text was updated successfully, but these errors were encountered: