Created
January 24, 2015 19:29
-
-
Save gergelyke/064baeddfe600ba7ede3 to your computer and use it in GitHub Desktop.
Tessel with OpsGenie
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
did you ever solve this? I'm getting similar HCI Event errors trying to do simple HTTPS posts to Slack...