Skip to content

Instantly share code, notes, and snippets.

@gergelyke
Created January 24, 2015 19:29
Show Gist options
  • Save gergelyke/064baeddfe600ba7ede3 to your computer and use it in GitHub Desktop.
Save gergelyke/064baeddfe600ba7ede3 to your computer and use it in GitHub Desktop.
Tessel with OpsGenie
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 :(
@ksouthworth
Copy link

did you ever solve this? I'm getting similar HCI Event errors trying to do simple HTTPS posts to Slack...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment