ustream / openduty

An open source Alerting and incident escalation tool
MIT License
788 stars 188 forks source link

Rocket notifier, set SSL validation to False #91

Open hanynowsky opened 7 years ago

hanynowsky commented 7 years ago

`

#######
import requests
import traceback

class RocketNotifier:
    def notify(self, notification):

        try:
            payload = { 
                      "text": notification.message
                    }

            response = requests.post(notification.user_to_notify.profile.rocket_webhook_url, payload, verify=False)

            if response.status_code == 200:
                print "Rocket message sent"
            else:
                print "Failed to send Rocket message, API response %s " % response.status_code
        except Exception as e:
            print "Failed to send Rocket message"
            #print(str(e))
            traceback.print_exc()
            raise
sysrex commented 6 years ago

https://github.com/openduty/openduty