Custom Notification Webhook- Chef Client run failures

Hi,

Hope someone can suggest me to build webhook URL. Please let me know a sample url and the format to receive the notificationnotification.

I am trying to build the Webhook URL to receive notification for "chef client run failures". I would like to have the failures notified to FLOWDOCK mailbox using api. The authentication is token based for flowdock.

Thanks

It looks as though CA Flowdock supports the required token authentication https://www.flowdock.com/api/how-to-integrate#/post-inbox however the message format for Chef Client run failures is fixed. You may need to build something to translate the fields sent by Chef Automate into the right format required for Flowdock Inbox. In the past, we have built various integrations using Azure Functions or AWS Lambda to do the translation.

The example message format can be found here: https://docs.chef.io/integrate_node_notifications_webhook.html

Stuart

1 Like

Hi Stuart,

Thanks so much for your reply and valuable information provided.

On this case, we need to build another instance to translate the chef automate fields info before throwing it out to Flowdock. Do you have an existing design on how are we going to integrate this? If you don’t mind sharing us the integrations you did. It will be valuable for us.

Best regards,
Gian

Hi Gian,

Here’s our implementation that could take Chef Client Run failures and send the data over to Microsoft’s Log Analytics solution: https://blog.chef.io/2017/09/21/announcing-azure-log-analytics-relay-for-chef-automate/

In this case, we implemented this as an Azure Function that simply reposted the information into Log Analytics through their API. All the code does really is add the required authorization and token fields required. It was written in C# but of course you have your choice of languages. Please ping me at stuart@chef.io if you need more info on the code.

Stuart

1 Like

Give the slack handler a go. Really quite simple.

https://supermarket.chef.io/cookbooks/slack_handler

Hi Stuart,

This is acknowledged. We’ll check it out and reach to you for any queries that we may have.

Regards,
Gian

Hi,

Yes integrating with Slack is much simpler and its supported by Chef Automate. But our company does not use Slack as default. We’re using Flowdock.

Thanks,