cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1030
Views
0
Helpful
3
Replies

Webex alerts from Databricks Jobs

Hello Community 

Very new to Webex. I am trying to create an alert that will send a message to a Webex workspace or group chat, when a systems event happens in Databricks for example (job failure). Databricks has support for webhooks as an alert destination. I need a webhook URL for my Webex workspace. How can I create that?

Will appreciate any help.

Thanks 

 

3 Replies 3

Janos Benyovszki
Cisco Employee
Cisco Employee

@Webex Newbie Asante  

are you saying I should just copy the space link and post it in the URL part of the Databricks GUI? if so i did get an error while using the destination with the webex space link saying webhook with id XXXXXXXX was not found.

No this is not what I am saying. The space link alone will not work ever, as it is not a webhook. I recommended you 2 ways, but if you want a message to be sent without an middle man service (which is what I explained with "creating your own server") you should use Incoming Webhooks. That will create a webhook endpoint that you can use for sending POST request.

 

I also found this https://docs.defenseorchestrator.com/t-incoming-webhooks-for-webex-teams.html. Although it seems outdated. the lower left window has the help and App Hub , App Hub doesn't have incoming webhooks

It does, but it seems that the Forum somehow altered the I provided you earlier, in my alternative recommendation. Here is another attempt: https://apphub.webex.com/applications/incoming-webhooks-cisco-systems-38054-23307-75252 . Use this URL to access it, or go to the AppHub and type "Incoming Webhooks". Note however, that an Incoming Webhook will only work if your request body only has "markdown" or "text". I don't know what Databricks sends by default, or whether you can change it, you would need to research that.

Janos Benyovszki
Cisco Employee
Cisco Employee

@Webex Newbie Asante  You would need to run a server for this, where Databricks can send the webhook that you are talking about. Webex does not provide a data server to developers, we expect developers to have their own servers. Once you have that up and running, you can use it's server address as the target of your Databricks webhook. So the flow would look like this:

- create your server and note it's public URL > create Databricks webhook > Databricks event triggers > webhook payload is sent to your server > your server logic extracts all info from the webhook request > you send out a Webex message using https://developer.webex.com/docs/api/v1/messages/create-a-message API. For this you could use a bot access token https://developer.webex.com/docs/bots , but the bot has to be a member of the space where the message is sent to.

Alternatively you could also use Incoming Webhooks https://apphub.webex.com/applications/incoming-webhooks-cisco-systems-38054-23307-75252 to send the Webex message. You can create a URL for a Webex space there and if you send a POST request using that URL, you are sending a message to the Webex space. So whenever your Databricks event triggers you can do the POST request towards that URL.

 

 

I probably didn't explain well. Databricks has an easy way to add a webhook URL as destination for the message. My desire is for that to be a webex group chat. Please see picture below.

WebexNewbieAsante_0-1693859554232.png

are you saying I should just copy the space link and post it in the URL part of the Databricks GUI? if so i did get an error while using the destination with the webex space link saying webhook with id XXXXXXXX was not found.

I also found this  https://help.webex.com/en-us/article/3gv4ci/Enable-webhooks-for-alerts-in-Control-Hub  I wounder if the webhook created here would be helpful for my situation. 

I also found this https://docs.defenseorchestrator.com/t-incoming-webhooks-for-webex-teams.html. Although it seems outdated. the lower left window has the help and App Hub , App Hub doesn't have incoming webhooks