-
-
Save oroce/a495b730fdf36fa470f7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sendAlert (property, value) { | |
console.log('Sending alert... %s : %s', property, value); | |
var payload = { | |
apiKey: '', | |
message: '' | |
}; | |
var options = { | |
host: 'api.opsgenie.com', | |
path: '/v1/json/alert', | |
method: 'POST' | |
}; | |
var request = https.request(options); | |
request.on('error', function (err) { | |
//todo: proper error handling | |
console.log(err); | |
}); | |
request.end(JSON.stringify(payload)); | |
} | |
/* | |
Opening socket 7 | |
tSLInformation.usNumberOfFreeBuffers 6 | |
HCI Event error on command: 1008 | |
Closing socket 7 | |
Opening socket 7 | |
tSLInformation.usNumberOfFreeBuffers 6 | |
HCI Event error on command: 1008 | |
HCI Event error on command: 100b | |
Closing socket 7 | |
Opening socket 7 | |
tSLInformation.usNumberOfFreeBuffers 6 | |
HCI Event error on command: 1008 | |
HCI Event error on command: 100b | |
Closing socket 7 | |
Error: ENOENT | |
*/ | |
// this makes me :( |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment