1
votes

We have a notification which will post data to an application using the application end point.

notification ABC{
    post = savedetailsurl
    body = {{.|json}}  
    useBody = true
}

So the end point will save all the details in mysql DB.

Now in our template we call another end point to get the details which we saved using the webhook in notification.

template ABC {
    use the " getDetailsUrl" and use the details in forming the email
}

Now the problem is race condition. Sometimes the details are not saved yet in the backend (mysql), and getDetailsUrl is called. So we get the empty result.

Is there are way to solve the race condition.

1

1 Answers

0
votes

Bosun's notification system is designed to be very basic. If you want something more advanced you will need to use a separate system to generate the notification details and/or handle the alert workflow. Some people have used pagerduty or other monitoring systems like Shinken to do more advanced notifications or alert management.

Your best bet is to skip the built in notifications and do everything in a external system. You can still use the http://bosun.org/api to integrate with the various alert states (crit/warn/ack/close/etc) or you can change your alerts to use log = true to bypass all the built in states and create your own workflow.