Skip to content

Instantly share code, notes, and snippets.

View opsgenie-github's full-sized avatar

opsgenie-github

View GitHub Profile
var http = require('http');
var https = require('https');
// Config start
var ogApiKey = '<ogApiKey>';
var jiraUsername = '<jiraUsername>';
var jiraPassword = '<jiraPassword>';
// If you're using your own installation of JIRA,
import com.ifountain.opsgenie.client.http.OpsGenieHttpClient
import com.ifountain.opsgenie.client.util.ClientConfiguration
import com.ifountain.opsgenie.client.util.JsonUtils
import org.apache.http.HttpHeaders
import org.apache.http.auth.UsernamePasswordCredentials
import org.apache.http.impl.auth.BasicScheme
LOG_PREFIX = "[${action}]:";
logger.warn("${LOG_PREFIX} Will execute action for alertId ${alert.alertId}");