From 98317d161935b5360927f2fe003d0418ef4c0c3e Mon Sep 17 00:00:00 2001 From: Emel Komurcu Date: Thu, 23 May 2019 10:49:21 +0300 Subject: [PATCH] migrate teams and recipients fields to responders --- .../bmcFootPrintsV11/bmcFootPrints2opsgenie.go | 15 ++++----------- .../bmcFootPrintsV11/bmcFootPrints2opsgenie.go | 15 ++++----------- .../bmcFootPrintsV12/bmcFootPrints2opsgenie.go | 15 ++++----------- .../bmcFootPrintsV12/bmcFootPrints2opsgenie.go | 15 ++++----------- custom-integration-scripts/op5/marid.conf | 3 +-- icinga/common/opsgenie-integration.conf.part | 3 +-- icinga/icinga/icinga2opsgenie.go | 14 ++++---------- icinga2/common/opsgenie-integration.conf.part | 3 +-- icinga2/icinga2/icinga2opsgenie.go | 15 ++++----------- icinga2Incoming/common/opsgenie-integration.conf | 3 +-- icinga2Incoming/icinga2/icinga2opsgenie.go | 15 ++++----------- icingaIncoming/common/opsgenie-integration.conf | 3 +-- icingaIncoming/icinga/icinga2opsgenie.go | 15 ++++----------- nagios/common/opsgenie-integration.conf.part | 3 +-- nagios/nagios/nagios2opsgenie.go | 15 ++++----------- nagiosIncoming/common/opsgenie-integration.conf | 3 +-- nagiosIncoming/nagios/nagios2opsgenie.go | 15 ++++----------- nagiosxi/common/opsgenie-integration.conf.part | 3 +-- nagiosxi/nagiosxi/nagios2opsgenie.go | 15 ++++----------- nagiosxiIncoming/common/opsgenie-integration.conf | 3 +-- nagiosxiIncoming/nagiosxi/nagios2opsgenie.go | 15 ++++----------- netcool/netcoolShellScripts/opsgenie | 5 +---- oem/common/opsgenie-integration.conf | 2 +- oem/oem/oem2opsgenie.go | 8 ++++---- op5/common/conf/opsgenie-integration.conf.part | 3 +-- op5/op5/nagios2opsgenie.go | 15 ++++----------- opsview/nagios2opsgenie.go | 6 +++--- servicenow/OpsGenie_integration_update_set.xml | 3 +-- .../OG_SN_Bidirectional_Integration_UpdateSet.xml | 3 +-- solarwinds/triggerActionBody.txt | 8 ++++---- vcenter/common/opsgenie-integration.conf | 2 +- vcenter/vcenter/vcenter2opsgenie.go | 8 ++++---- vcsa/common/opsgenie-integration.conf | 2 +- vcsa/vcsa/vcsa2opsgenie.go | 8 ++++---- zabbix/common/opsgenie-integration.conf.part | 2 +- zabbix/zabbix/zabbix2opsgenie.go | 15 ++++----------- zabbixIncoming/common/opsgenie-integration.conf | 2 +- zabbixIncoming/zabbix/zabbix2opsgenie.go | 15 ++++----------- zenoss/common/opsgenie-integration.conf.part | 3 +-- zenoss/zenoss/zenoss2opsgenie.go | 15 ++++----------- zenossIncoming/common/opsgenie-integration.conf | 3 +-- zenossIncoming/zenoss/zenoss2opsgenie.go | 15 ++++----------- 42 files changed, 107 insertions(+), 242 deletions(-) diff --git a/bmcFootPrintsV11/bmcFootPrintsV11/bmcFootPrints2opsgenie.go b/bmcFootPrintsV11/bmcFootPrintsV11/bmcFootPrints2opsgenie.go index 0e64473..9520b95 100644 --- a/bmcFootPrintsV11/bmcFootPrintsV11/bmcFootPrints2opsgenie.go +++ b/bmcFootPrintsV11/bmcFootPrintsV11/bmcFootPrints2opsgenie.go @@ -489,9 +489,8 @@ func parseFlags() { logPath := flag.String("logPath", "", "LOGPATH") - recipients := flag.String("recipients", "", "Recipients") + responders := flag.String("responders", "", "Responders") tags := flag.String("tags", "", "Tags") - teams := flag.String("teams", "", "Teams") url := flag.String("url", "", "") username := flag.String("username", "", "Username") password := flag.String("password", "", "Password") @@ -512,16 +511,10 @@ func parseFlags() { parameters["apiKey"] = configParameters ["apiKey"] } - if *recipients != "" { - parameters["recipients"] = *recipients + if *responders != "" { + parameters["responders"] = *responders } else { - parameters["recipients"] = configParameters ["recipients"] - } - - if *teams != "" { - parameters["teams"] = *teams - } else { - parameters["teams"] = configParameters ["teams"] + parameters["responders"] = configParameters ["responders"] } if *tags != "" { diff --git a/bmcFootPrintsV11Incoming/bmcFootPrintsV11/bmcFootPrints2opsgenie.go b/bmcFootPrintsV11Incoming/bmcFootPrintsV11/bmcFootPrints2opsgenie.go index 52bfb98..846d755 100644 --- a/bmcFootPrintsV11Incoming/bmcFootPrintsV11/bmcFootPrints2opsgenie.go +++ b/bmcFootPrintsV11Incoming/bmcFootPrintsV11/bmcFootPrints2opsgenie.go @@ -489,9 +489,8 @@ func parseFlags() { logPath := flag.String("logPath", "", "LOGPATH") - recipients := flag.String("recipients", "", "Recipients") tags := flag.String("tags", "", "Tags") - teams := flag.String("teams", "", "Teams") + responders := flag.String("responders", "", "Responders") url := flag.String("url", "", "") username := flag.String("username", "", "Username") password := flag.String("password", "", "Password") @@ -512,16 +511,10 @@ func parseFlags() { parameters["apiKey"] = configParameters ["apiKey"] } - if *recipients != "" { - parameters["recipients"] = *recipients + if *responders != "" { + parameters["responders"] = *responders } else { - parameters["recipients"] = configParameters ["recipients"] - } - - if *teams != "" { - parameters["teams"] = *teams - } else { - parameters["teams"] = configParameters ["teams"] + parameters["responders"] = configParameters ["responders"] } if *tags != "" { diff --git a/bmcFootPrintsV12/bmcFootPrintsV12/bmcFootPrints2opsgenie.go b/bmcFootPrintsV12/bmcFootPrintsV12/bmcFootPrints2opsgenie.go index e87812a..01983ae 100644 --- a/bmcFootPrintsV12/bmcFootPrintsV12/bmcFootPrints2opsgenie.go +++ b/bmcFootPrintsV12/bmcFootPrintsV12/bmcFootPrints2opsgenie.go @@ -581,9 +581,8 @@ func parseFlags() { logPath := flag.String("logPath", "", "LOGPATH") - recipients := flag.String("recipients", "", "Recipients") tags := flag.String("tags", "", "Tags") - teams := flag.String("teams", "", "Teams") + responders := flag.String("responders", "", "Responders") url := flag.String("url", "", "") username := flag.String("username", "", "Username") password := flag.String("password", "", "Password") @@ -603,16 +602,10 @@ func parseFlags() { parameters["apiKey"] = configParameters ["apiKey"] } - if *recipients != "" { - parameters["recipients"] = *recipients + if *responders != "" { + parameters["responders"] = *responders } else { - parameters["recipients"] = configParameters ["recipients"] - } - - if *teams != "" { - parameters["teams"] = *teams - } else { - parameters["teams"] = configParameters ["teams"] + parameters["responders"] = configParameters ["responders"] } if *tags != "" { diff --git a/bmcFootPrintsV12Incoming/bmcFootPrintsV12/bmcFootPrints2opsgenie.go b/bmcFootPrintsV12Incoming/bmcFootPrintsV12/bmcFootPrints2opsgenie.go index 58e40c9..b44b370 100644 --- a/bmcFootPrintsV12Incoming/bmcFootPrintsV12/bmcFootPrints2opsgenie.go +++ b/bmcFootPrintsV12Incoming/bmcFootPrintsV12/bmcFootPrints2opsgenie.go @@ -581,9 +581,8 @@ func parseFlags() { logPath := flag.String("logPath", "", "LOGPATH") - recipients := flag.String("recipients", "", "Recipients") tags := flag.String("tags", "", "Tags") - teams := flag.String("teams", "", "Teams") + responders := flag.String("responders", "", "Responders") url := flag.String("url", "", "") username := flag.String("username", "", "Username") password := flag.String("password", "", "Password") @@ -603,16 +602,10 @@ func parseFlags() { parameters["apiKey"] = configParameters ["apiKey"] } - if *recipients != "" { - parameters["recipients"] = *recipients + if *responders != "" { + parameters["responders"] = *responders } else { - parameters["recipients"] = configParameters ["recipients"] - } - - if *teams != "" { - parameters["teams"] = *teams - } else { - parameters["teams"] = configParameters ["teams"] + parameters["responders"] = configParameters ["responders"] } if *tags != "" { diff --git a/custom-integration-scripts/op5/marid.conf b/custom-integration-scripts/op5/marid.conf index 23c4664..0f2a0ff 100755 --- a/custom-integration-scripts/op5/marid.conf +++ b/custom-integration-scripts/op5/marid.conf @@ -2,9 +2,8 @@ #you can define log levels: warning, debug, info,error nagios2opsgenie.logger=warning nagios2opsgenie.timeout= 60 -#recipients= +#responders= #tags= -#teams= #You can use different nagiosServer values for each of your Nagios servers (see marid configuration below) nagios_server=default diff --git a/icinga/common/opsgenie-integration.conf.part b/icinga/common/opsgenie-integration.conf.part index 92d3c7a..cc5dbbd 100644 --- a/icinga/common/opsgenie-integration.conf.part +++ b/icinga/common/opsgenie-integration.conf.part @@ -3,9 +3,8 @@ icinga2opsgenie.logger=warning icinga2opsgenie.timeout=60 logPath=/var/log/opsgenie/icinga2opsgenie.log -#recipients= #tags= -#teams= +#responders= #You can use different icingaServer values for each of your Icinga servers (see marid configuration below) icinga_server=default diff --git a/icinga/icinga/icinga2opsgenie.go b/icinga/icinga/icinga2opsgenie.go index c25af82..c1b3e8a 100644 --- a/icinga/icinga/icinga2opsgenie.go +++ b/icinga/icinga/icinga2opsgenie.go @@ -332,9 +332,8 @@ func parseFlags()map[string]string{ serviceCheckCommand := flag.String("sc", "", "SERVICECHECKCOMMAND") logPath := flag.String("logPath", "", "LOGPATH") - recipients := flag.String("recipients","","Recipients") + responders := flag.String("responders","","Responders") tags := flag.String("tags","","Tags") - teams := flag.String("teams","","Teams") flag.Parse() @@ -349,10 +348,10 @@ func parseFlags()map[string]string{ parameters["icinga_server"] = configParameters["icinga_server"] } - if *recipients != ""{ - parameters["recipients"] = *recipients + if *responders != ""{ + parameters["responders"] = *responders }else{ - parameters["recipients"] = configParameters ["recipients"] + parameters["responders"] = configParameters ["responders"] } if *tags != ""{ @@ -361,11 +360,6 @@ func parseFlags()map[string]string{ parameters["tags"] = configParameters ["tags"] } - if *teams != ""{ - parameters["teams"] = *teams - }else{ - parameters["teams"] = configParameters ["teams"] - } if *logPath != "" { parameters["logPath"] = *logPath diff --git a/icinga2/common/opsgenie-integration.conf.part b/icinga2/common/opsgenie-integration.conf.part index c702e73..591f363 100644 --- a/icinga2/common/opsgenie-integration.conf.part +++ b/icinga2/common/opsgenie-integration.conf.part @@ -3,9 +3,8 @@ icinga2opsgenie.logger=warning icinga2opsgenie.timeout=60 logPath=/var/log/opsgenie/icinga2opsgenie.log -#recipients= +#responders= #tags= -#teams= #You can use different icingaServer values for each of your Icinga servers (see marid configuration below) icinga_server=default diff --git a/icinga2/icinga2/icinga2opsgenie.go b/icinga2/icinga2/icinga2opsgenie.go index af02165..f29c743 100644 --- a/icinga2/icinga2/icinga2opsgenie.go +++ b/icinga2/icinga2/icinga2opsgenie.go @@ -306,9 +306,8 @@ func parseFlags()map[string]string{ serviceCheckCommand := flag.String("sc", "", "SERVICECHECKCOMMAND") logPath := flag.String("logPath", "", "LOGPATH") - recipients := flag.String("recipients","","Recipients") + responders := flag.String("responders","","Responders") tags := flag.String("tags","","Tags") - teams := flag.String("teams","","Teams") flag.Parse() @@ -323,10 +322,10 @@ func parseFlags()map[string]string{ parameters["icinga_server"] = configParameters["icinga_server"] } - if *recipients != ""{ - parameters["recipients"] = *recipients + if *responders != ""{ + parameters["responders"] = *responders }else{ - parameters["recipients"] = configParameters ["recipients"] + parameters["responders"] = configParameters ["responders"] } if *tags != ""{ @@ -335,12 +334,6 @@ func parseFlags()map[string]string{ parameters["tags"] = configParameters ["tags"] } - if *teams != ""{ - parameters["teams"] = *teams - }else{ - parameters["teams"] = configParameters ["teams"] - } - if *logPath != "" { parameters["logPath"] = *logPath } else { diff --git a/icinga2Incoming/common/opsgenie-integration.conf b/icinga2Incoming/common/opsgenie-integration.conf index f6bb5b4..b6a9d40 100644 --- a/icinga2Incoming/common/opsgenie-integration.conf +++ b/icinga2Incoming/common/opsgenie-integration.conf @@ -3,9 +3,8 @@ icinga2opsgenie.logger = warning icinga2opsgenie.timeout = 60 logPath = /var/log/opsgenie/icinga2opsgenie.log -#recipients= +#responders= #tags= -#teams= #You can use different icingaServer values for each of your Icinga servers (see marid configuration below) icinga_server = default diff --git a/icinga2Incoming/icinga2/icinga2opsgenie.go b/icinga2Incoming/icinga2/icinga2opsgenie.go index f41b4ea..0c0d9a2 100644 --- a/icinga2Incoming/icinga2/icinga2opsgenie.go +++ b/icinga2Incoming/icinga2/icinga2opsgenie.go @@ -305,9 +305,8 @@ func parseFlags() map[string]string { serviceCheckCommand := flag.String("sc", "", "SERVICECHECKCOMMAND") logPath := flag.String("logPath", "", "LOGPATH") - recipients := flag.String("recipients", "", "Recipients") + responders := flag.String("responders", "", "Responders") tags := flag.String("tags", "", "Tags") - teams := flag.String("teams", "", "Teams") flag.Parse() @@ -322,10 +321,10 @@ func parseFlags() map[string]string { parameters["icinga_server"] = configParameters["icinga_server"] } - if *recipients != "" { - parameters["recipients"] = *recipients + if *responders != "" { + parameters["responders"] = *responders } else { - parameters["recipients"] = configParameters ["recipients"] + parameters["responders"] = configParameters ["responders"] } if *tags != "" { @@ -334,12 +333,6 @@ func parseFlags() map[string]string { parameters["tags"] = configParameters ["tags"] } - if *teams != "" { - parameters["teams"] = *teams - } else { - parameters["teams"] = configParameters ["teams"] - } - if *logPath != "" { parameters["logPath"] = *logPath } else { diff --git a/icingaIncoming/common/opsgenie-integration.conf b/icingaIncoming/common/opsgenie-integration.conf index f6bb5b4..b6a9d40 100644 --- a/icingaIncoming/common/opsgenie-integration.conf +++ b/icingaIncoming/common/opsgenie-integration.conf @@ -3,9 +3,8 @@ icinga2opsgenie.logger = warning icinga2opsgenie.timeout = 60 logPath = /var/log/opsgenie/icinga2opsgenie.log -#recipients= +#responders= #tags= -#teams= #You can use different icingaServer values for each of your Icinga servers (see marid configuration below) icinga_server = default diff --git a/icingaIncoming/icinga/icinga2opsgenie.go b/icingaIncoming/icinga/icinga2opsgenie.go index 183245f..2870097 100644 --- a/icingaIncoming/icinga/icinga2opsgenie.go +++ b/icingaIncoming/icinga/icinga2opsgenie.go @@ -329,9 +329,8 @@ func parseFlags() map[string]string { serviceCheckCommand := flag.String("sc", "", "SERVICECHECKCOMMAND") logPath := flag.String("logPath", "", "LOGPATH") - recipients := flag.String("recipients", "", "Recipients") + responders := flag.String("responders", "", "Responders") tags := flag.String("tags", "", "Tags") - teams := flag.String("teams", "", "Teams") flag.Parse() @@ -346,10 +345,10 @@ func parseFlags() map[string]string { parameters["icinga_server"] = configParameters["icinga_server"] } - if *recipients != "" { - parameters["recipients"] = *recipients + if *responders != "" { + parameters["responders"] = *responders } else { - parameters["recipients"] = configParameters ["recipients"] + parameters["responders"] = configParameters ["responders"] } if *tags != "" { @@ -358,12 +357,6 @@ func parseFlags() map[string]string { parameters["tags"] = configParameters ["tags"] } - if *teams != "" { - parameters["teams"] = *teams - } else { - parameters["teams"] = configParameters ["teams"] - } - if *logPath != "" { parameters["logPath"] = *logPath } else { diff --git a/nagios/common/opsgenie-integration.conf.part b/nagios/common/opsgenie-integration.conf.part index 6f4ce7e..d5cb9eb 100644 --- a/nagios/common/opsgenie-integration.conf.part +++ b/nagios/common/opsgenie-integration.conf.part @@ -3,9 +3,8 @@ nagios2opsgenie.logger=warning nagios2opsgenie.timeout= 60 logPath=/var/log/opsgenie/nagios2opsgenie.log -#recipients= +#responders= #tags= -#teams= #You can use different nagiosServer values for each of your Nagios servers (see marid configuration below) nagios_server=default diff --git a/nagios/nagios/nagios2opsgenie.go b/nagios/nagios/nagios2opsgenie.go index f95de42..1df9114 100644 --- a/nagios/nagios/nagios2opsgenie.go +++ b/nagios/nagios/nagios2opsgenie.go @@ -326,9 +326,8 @@ func parseFlags()map[string]string{ servicePerfData := flag.String("spd", "", "SERVICEPERFDATA") logPath := flag.String("logPath", "", "LOGPATH") - recipients := flag.String("recipients","","Recipients") + responders := flag.String("responders","","Responders") tags := flag.String("tags","","Tags") - teams := flag.String("teams","","Teams") flag.Parse() @@ -343,16 +342,10 @@ func parseFlags()map[string]string{ parameters["nagios_server"] = configParameters["nagios_server"] } - if *recipients != ""{ - parameters["recipients"] = *recipients + if *responders != ""{ + parameters["responders"] = *responders }else{ - parameters["recipients"] = configParameters ["recipients"] - } - - if *teams != ""{ - parameters["teams"] = *teams - }else{ - parameters["teams"] = configParameters ["teams"] + parameters["responders"] = configParameters ["responders"] } if *tags != ""{ diff --git a/nagiosIncoming/common/opsgenie-integration.conf b/nagiosIncoming/common/opsgenie-integration.conf index 30522a6..ee65c9f 100644 --- a/nagiosIncoming/common/opsgenie-integration.conf +++ b/nagiosIncoming/common/opsgenie-integration.conf @@ -3,9 +3,8 @@ nagios2opsgenie.logger = warning nagios2opsgenie.timeout = 60 logPath = /var/log/opsgenie/nagios2opsgenie.log -#recipients= +#responders= #tags= -#teams= #You can use different nagiosServer values for each of your Nagios servers (see marid configuration below) nagios_server = default diff --git a/nagiosIncoming/nagios/nagios2opsgenie.go b/nagiosIncoming/nagios/nagios2opsgenie.go index c4f9314..26cd5d7 100644 --- a/nagiosIncoming/nagios/nagios2opsgenie.go +++ b/nagiosIncoming/nagios/nagios2opsgenie.go @@ -326,9 +326,8 @@ func parseFlags() map[string]string { servicePerfData := flag.String("spd", "", "SERVICEPERFDATA") logPath := flag.String("logPath", "", "LOGPATH") - recipients := flag.String("recipients", "", "Recipients") + responders := flag.String("responders", "", "Responders") tags := flag.String("tags", "", "Tags") - teams := flag.String("teams", "", "Teams") flag.Parse() @@ -343,16 +342,10 @@ func parseFlags() map[string]string { parameters["nagios_server"] = configParameters["nagios_server"] } - if *recipients != "" { - parameters["recipients"] = *recipients + if *responders != "" { + parameters["responders"] = *responders } else { - parameters["recipients"] = configParameters ["recipients"] - } - - if *teams != "" { - parameters["teams"] = *teams - } else { - parameters["teams"] = configParameters ["teams"] + parameters["responders"] = configParameters ["responders"] } if *tags != "" { diff --git a/nagiosxi/common/opsgenie-integration.conf.part b/nagiosxi/common/opsgenie-integration.conf.part index 4d1112a..771bffc 100644 --- a/nagiosxi/common/opsgenie-integration.conf.part +++ b/nagiosxi/common/opsgenie-integration.conf.part @@ -3,9 +3,8 @@ nagios2opsgenie.logger=warning nagios2opsgenie.timeout=60 logPath=/var/log/opsgenie/nagios2opsgenie.log -#recipients= +#responders= #tags= -#teams= #You can use different nagiosServer values for each of your Nagios servers (see marid configuration below) nagios_server=default diff --git a/nagiosxi/nagiosxi/nagios2opsgenie.go b/nagiosxi/nagiosxi/nagios2opsgenie.go index f426e12..86fb0e5 100644 --- a/nagiosxi/nagiosxi/nagios2opsgenie.go +++ b/nagiosxi/nagiosxi/nagios2opsgenie.go @@ -326,9 +326,8 @@ func parseFlags()map[string]string{ servicePerfData := flag.String("spd", "", "SERVICEPERFDATA") logPath := flag.String("logPath", "", "LOGPATH") - recipients := flag.String("recipients","","Recipients") + responders := flag.String("responders","","Responders") tags := flag.String("tags","","Tags") - teams := flag.String("teams","","Teams") flag.Parse() @@ -343,16 +342,10 @@ func parseFlags()map[string]string{ parameters["nagios_server"] = configParameters["nagios_server"] } - if *recipients != ""{ - parameters["recipients"] = *recipients + if *responders != ""{ + parameters["responders"] = *responders }else{ - parameters["recipients"] = configParameters ["recipients"] - } - - if *teams != ""{ - parameters["teams"] = *teams - }else{ - parameters["teams"] = configParameters ["teams"] + parameters["responders"] = configParameters ["responders"] } if *tags != ""{ diff --git a/nagiosxiIncoming/common/opsgenie-integration.conf b/nagiosxiIncoming/common/opsgenie-integration.conf index a85b264..6044faa 100644 --- a/nagiosxiIncoming/common/opsgenie-integration.conf +++ b/nagiosxiIncoming/common/opsgenie-integration.conf @@ -3,9 +3,8 @@ nagios2opsgenie.logger = warning nagios2opsgenie.timeout = 60 logPath = /var/log/opsgenie/nagios2opsgenie.log -#recipients= +#responders= #tags= -#teams= #You can use different nagiosServer values for each of your Nagios servers (see marid configuration below) nagios_server = default diff --git a/nagiosxiIncoming/nagiosxi/nagios2opsgenie.go b/nagiosxiIncoming/nagiosxi/nagios2opsgenie.go index 1a6e6df..9698e3b 100644 --- a/nagiosxiIncoming/nagiosxi/nagios2opsgenie.go +++ b/nagiosxiIncoming/nagiosxi/nagios2opsgenie.go @@ -326,9 +326,8 @@ func parseFlags() map[string]string { servicePerfData := flag.String("spd", "", "SERVICEPERFDATA") logPath := flag.String("logPath", "", "LOGPATH") - recipients := flag.String("recipients", "", "Recipients") + responders := flag.String("responders", "", "Responders") tags := flag.String("tags", "", "Tags") - teams := flag.String("teams", "", "Teams") flag.Parse() @@ -343,16 +342,10 @@ func parseFlags() map[string]string { parameters["nagios_server"] = configParameters["nagios_server"] } - if *recipients != "" { - parameters["recipients"] = *recipients + if *responders != "" { + parameters["responders"] = *responders } else { - parameters["recipients"] = configParameters ["recipients"] - } - - if *teams != "" { - parameters["teams"] = *teams - } else { - parameters["teams"] = configParameters ["teams"] + parameters["responders"] = configParameters ["responders"] } if *tags != "" { diff --git a/netcool/netcoolShellScripts/opsgenie b/netcool/netcoolShellScripts/opsgenie index 43c5fb6..794c08a 100644 --- a/netcool/netcoolShellScripts/opsgenie +++ b/netcool/netcoolShellScripts/opsgenie @@ -3,9 +3,6 @@ # Specify the location of the lamp utility LAMP_HOME=/usr/bin/lamp -#Specify the alert recipients -RECIPIENTS=all - ACTIONS="deacknowledge,add to task list, remove from task list" SERIAL="$1" NODE="$2" @@ -23,5 +20,5 @@ Sent by the Netcool/OMNIbus Automation system EOF ) -$LAMP_HOME/lamp createAlert --message "$SUMMARY" --recipients "$RECIPIENTS" --entity "$NODE" --description "$DESCRIPTION" --source NETCOOL --actions "$ACTIONS" \ +$LAMP_HOME/lamp createAlert --message "$SUMMARY" --entity "$NODE" --description "$DESCRIPTION" --source NETCOOL --actions "$ACTIONS" \ -D Serial="$SERIAL" -D Node="$NODE" -D Count="$COUNT" -D Severity="$SEVERITY" \ No newline at end of file diff --git a/oem/common/opsgenie-integration.conf b/oem/common/opsgenie-integration.conf index a2a271c..d4515fb 100644 --- a/oem/common/opsgenie-integration.conf +++ b/oem/common/opsgenie-integration.conf @@ -4,7 +4,7 @@ oem2opsgenie.logger=warning logPath=/var/log/opsgenie/oem2opsgenie.log #viaMaridUrl=http://maridHost:port/script/marid2opsgenie.groovy?async=true #tags= -#teams= +#responders= ####################################### PROXY CONFIGURATION FOR OEM ############################################ oem2opsgenie.http.proxy.enabled=false diff --git a/oem/oem/oem2opsgenie.go b/oem/oem/oem2opsgenie.go index fb944d0..f49b039 100755 --- a/oem/oem/oem2opsgenie.go +++ b/oem/oem/oem2opsgenie.go @@ -252,7 +252,7 @@ func http_post() { func parseFlags()map[string]string{ apiKey := flag.String("apiKey","","apiKey") tags := flag.String ("tags","","tags") - teams := flag.String("teams", "", "teams") + responders := flag.String("responders", "", "responders") logPath := flag.String("logPath", "", "LOGPATH") flag.Parse() @@ -276,10 +276,10 @@ func parseFlags()map[string]string{ parameters["tags"] = configParameters ["tags"] } - if *teams != "" { - parameters["teams"] = *teams + if *responders != "" { + parameters["responders"] = *responders } else { - parameters["teams"] = configParameters["teams"] + parameters["responders"] = configParameters["responders"] } if *logPath != "" { diff --git a/op5/common/conf/opsgenie-integration.conf.part b/op5/common/conf/opsgenie-integration.conf.part index 839d1e1..84b2490 100644 --- a/op5/common/conf/opsgenie-integration.conf.part +++ b/op5/common/conf/opsgenie-integration.conf.part @@ -3,9 +3,8 @@ nagios2opsgenie.logger=warning nagios2opsgenie.timeout= 60 logPath=/var/log/opsgenie/nagios2opsgenie.log -#recipients= +#responders= #tags= -#teams= #if you're using marid key, you can add it as a parameter to viaMaridUrl: &maridKey=your_marid_key #viaMaridUrl=http://maridHost:port/script/marid2opsgenie.groovy?async=true diff --git a/op5/op5/nagios2opsgenie.go b/op5/op5/nagios2opsgenie.go index ba7a6e1..e4830aa 100644 --- a/op5/op5/nagios2opsgenie.go +++ b/op5/op5/nagios2opsgenie.go @@ -323,9 +323,8 @@ func parseFlags() map[string]string { servicePerfData := flag.String("spd", "", "SERVICEPERFDATA") logPath := flag.String("logPath", "", "LOGPATH") - recipients := flag.String("recipients", "", "Recipients") + responders := flag.String("responders", "", "Responders") tags := flag.String("tags", "", "Tags") - teams := flag.String("teams", "", "Teams") flag.Parse() @@ -335,16 +334,10 @@ func parseFlags() map[string]string { parameters["apiKey"] = configParameters ["apiKey"] } - if *recipients != "" { - parameters["recipients"] = *recipients + if *responders != "" { + parameters["responders"] = *responders } else { - parameters["recipients"] = configParameters ["recipients"] - } - - if *teams != "" { - parameters["teams"] = *teams - } else { - parameters["teams"] = configParameters ["teams"] + parameters["responders"] = configParameters ["responders"] } if *tags != "" { diff --git a/opsview/nagios2opsgenie.go b/opsview/nagios2opsgenie.go index be39018..51bc5f0 100644 --- a/opsview/nagios2opsgenie.go +++ b/opsview/nagios2opsgenie.go @@ -164,7 +164,7 @@ func http_post() { func parseFlags()map[string]string{ apiKey := flag.String("apiKey","","apiKey") tags := flag.String("tags","","Tags") - teams := flag.String("teams","","Teams") + responders := flag.String("responders","","Responders") logLevel := flag.String("logLevel", "", "logLevel") logPath := flag.String("logPath", "", "logPath") opsgenieApiUrl := flag.String("opsgenieApiUrl", "", "opsgenieApiUrl") @@ -174,8 +174,8 @@ func parseFlags()map[string]string{ if *apiKey != ""{ parameters["apiKey"] = *apiKey } - if *teams != ""{ - parameters["teams"] = *teams + if *responders != ""{ + parameters["responders"] = *responders } if *tags != ""{ parameters["tags"] = *tags diff --git a/servicenow/OpsGenie_integration_update_set.xml b/servicenow/OpsGenie_integration_update_set.xml index abc15b7..5a34d12 100644 --- a/servicenow/OpsGenie_integration_update_set.xml +++ b/servicenow/OpsGenie_integration_update_set.xml @@ -150,8 +150,7 @@ OpsGenie ServiceNow integration allows you to forward ServiceNow incidents to Op "Severity" : current.severity.getDisplayValue(), "State" : current.state.getDisplayValue(), }, - recipients : current.assigned_to.email.toString(), - teams : current.assignment_group.name.toString() + responders : current.assigned_to.email.toString() }; client.postToOpsGenie(contentMap); })(current, previous);]]></script><sys_class_name>sys_script</sys_class_name><sys_created_by>admin</sys_created_by><sys_created_on>2016-01-08 08:30:40</sys_created_on><sys_customer_update>true</sys_customer_update><sys_domain>global</sys_domain><sys_domain_path/><sys_id>059e19c64f7c1200ab9d33718110c720</sys_id><sys_mod_count>0</sys_mod_count><sys_name>OpsGenie Create Alert</sys_name><sys_overrides/><sys_package display_value="Global" source="global">global</sys_package><sys_policy/><sys_replace_on_upgrade>false</sys_replace_on_upgrade><sys_scope display_value="Global">global</sys_scope><sys_update_name>sys_script_059e19c64f7c1200ab9d33718110c720</sys_update_name><sys_updated_by>admin</sys_updated_by><sys_updated_on>2016-01-08 08:30:40</sys_updated_on><template/><when>after</when></sys_script><sys_translated_text action="delete_multiple" query="documentkey=059e19c64f7c1200ab9d33718110c720"/></record_update> diff --git a/servicenowv2/OG_SN_Bidirectional_Integration_UpdateSet.xml b/servicenowv2/OG_SN_Bidirectional_Integration_UpdateSet.xml index d6f3a96..a9aaea5 100644 --- a/servicenowv2/OG_SN_Bidirectional_Integration_UpdateSet.xml +++ b/servicenowv2/OG_SN_Bidirectional_Integration_UpdateSet.xml @@ -3064,8 +3064,7 @@ OpsGenie_Client.prototype = { assignedToEmail: assignedToEmail, assignmentGroup: assignmentGroup, workNotes: workNotes, - teams: client.replaceForbiddenCharacters(assignmentGroup), - recipients: assignedToEmail, + responders: assignedToEmail, configurationItem: configurationItem, companyName: companyName, callerName: callerName, diff --git a/solarwinds/triggerActionBody.txt b/solarwinds/triggerActionBody.txt index b67bae6..d5691c9 100644 --- a/solarwinds/triggerActionBody.txt +++ b/solarwinds/triggerActionBody.txt @@ -1,5 +1,5 @@ ## OpsGenie expects the following fields like below, use them without changing names (in both contents) -## you can send alias, teams, recipients and tags to be used in OpsGenie alerts. Notice that these fields start with lowercase in example content do not change it.d +## you can send alias, responders and tags to be used in OpsGenie alerts. Notice that these fields start with lowercase in example content do not change it.d ActionType=Create& alias=${N=Alerting;M=AlertObjectID}-${N=Alerting;M=AlertID}& ObjectID=${N=Alerting;M=AlertObjectID}& @@ -22,11 +22,11 @@ ObjectType=${N=Alerting;M=ObjectType}& Severity=${N=Alerting;M=Severity}& TimeOfDay=${N=Alerting;M=TimeOfDay}& DateTime=${N=Generic;M=DateTime;F=DateTime}& -teams=& +responders=& tags= ## Troubleshooting content, use µ#µ instead of = and §#§ instead of & -## you can send alias, teams, recipients and tags to be used in OpsGenie alerts. Notice that these fields start with lowercase in example content do not change it. +## you can send alias, responders and tags to be used in OpsGenie alerts. Notice that these fields start with lowercase in example content do not change it. ActionTypeµ#µCreate§#§ aliasµ#µ${N=Alerting;M=AlertObjectID}-${N=Alerting;M=AlertID}§#§ @@ -50,5 +50,5 @@ ObjectTypeµ#µ${N=Alerting;M=ObjectType}§#§ Severityµ#µ${N=Alerting;M=Severity}§#§ TimeOfDayµ#µ${N=Alerting;M=TimeOfDay}§#§ DateTimeµ#µ${N=Generic;M=DateTime;F=DateTime}§#§ -teamsµ#µ§#§ +respondersµ#µ§#§ tagsµ#µ diff --git a/vcenter/common/opsgenie-integration.conf b/vcenter/common/opsgenie-integration.conf index 94cdfc0..30551c3 100644 --- a/vcenter/common/opsgenie-integration.conf +++ b/vcenter/common/opsgenie-integration.conf @@ -3,7 +3,7 @@ apiKey= vcenter2opsgenie.logger=warning logPath=C:\opsgenie\vcenter2opsgenie.log #tags= -#teams= +#responders= ####################################### PROXY CONFIGURATION FOR VCENTER############################################ vcenter2opsgenie.http.proxy.enabled=false diff --git a/vcenter/vcenter/vcenter2opsgenie.go b/vcenter/vcenter/vcenter2opsgenie.go index 6d9ec25..77a609d 100644 --- a/vcenter/vcenter/vcenter2opsgenie.go +++ b/vcenter/vcenter/vcenter2opsgenie.go @@ -253,7 +253,7 @@ func http_post() { func parseFlags()map[string]string{ apiKey := flag.String("apiKey","","apiKey") tags := flag.String ("tags","","tags") - teams := flag.String("teams", "", "teams") + responders := flag.String("responders", "", "responders") logPath := flag.String("logPath", "", "LOGPATH") flag.Parse() @@ -268,10 +268,10 @@ func parseFlags()map[string]string{ parameters["tags"] = configParameters ["tags"] } - if *teams != "" { - parameters["teams"] = *teams + if *responders != "" { + parameters["responders"] = *responders } else { - parameters["teams"] = configParameters["teams"] + parameters["responders"] = configParameters["responders"] } if *logPath != "" { diff --git a/vcsa/common/opsgenie-integration.conf b/vcsa/common/opsgenie-integration.conf index 5ac4f75..0280e48 100644 --- a/vcsa/common/opsgenie-integration.conf +++ b/vcsa/common/opsgenie-integration.conf @@ -3,7 +3,7 @@ apiKey= vcsa2opsgenie.logger=warning logPath=/var/log/vcsa2opsgenie.log #tags= -#teams= +#responders= ####################################### PROXY CONFIGURATION FOR VCENTER############################################ vcsa2opsgenie.http.proxy.enabled=false diff --git a/vcsa/vcsa/vcsa2opsgenie.go b/vcsa/vcsa/vcsa2opsgenie.go index 1823108..66caf7c 100644 --- a/vcsa/vcsa/vcsa2opsgenie.go +++ b/vcsa/vcsa/vcsa2opsgenie.go @@ -253,7 +253,7 @@ func http_post() { func parseFlags()map[string]string{ apiKey := flag.String("apiKey","","apiKey") tags := flag.String ("tags","","tags") - teams := flag.String("teams", "", "teams") + responders := flag.String("responders", "", "responders") logPath := flag.String("logPath", "", "LOGPATH") flag.Parse() @@ -268,10 +268,10 @@ func parseFlags()map[string]string{ parameters["tags"] = configParameters ["tags"] } - if *teams != "" { - parameters["teams"] = *teams + if *responders != "" { + parameters["responders"] = *responders } else { - parameters["teams"] = configParameters["teams"] + parameters["responders"] = configParameters["responders"] } if *logPath != "" { diff --git a/zabbix/common/opsgenie-integration.conf.part b/zabbix/common/opsgenie-integration.conf.part index a4a3542..12a75b4 100644 --- a/zabbix/common/opsgenie-integration.conf.part +++ b/zabbix/common/opsgenie-integration.conf.part @@ -4,7 +4,7 @@ #zabbix2opsgenie.logger=warning logPath=/var/log/opsgenie/zabbix2opsgenie.log -#recipients= +#responders= #tags= ####################################### PROXY CONFIGURATION FOR ZABBIX ############################################ diff --git a/zabbix/zabbix/zabbix2opsgenie.go b/zabbix/zabbix/zabbix2opsgenie.go index 0569c9e..4fc6cef 100755 --- a/zabbix/zabbix/zabbix2opsgenie.go +++ b/zabbix/zabbix/zabbix2opsgenie.go @@ -262,8 +262,7 @@ func parseFlags()map[string]string{ eventId := flag.String ("eventId","","EVENT.ID") recoveryEventStatus := flag.String ("recoveryEventStatus","","EVENT.RECOVERY.STATUS") tags := flag.String ("tags","","tags") - recipients := flag.String ("recipients","","recipients") - teams := flag.String("teams","","Teams") + responders := flag.String ("responders","","responders") logPath := flag.String("logPath", "", "LOGPATH") flag.Parse() @@ -289,10 +288,10 @@ func parseFlags()map[string]string{ configParameters["apiKey"] = *apiKey } - if *recipients != ""{ - parameters["recipients"] = *recipients + if *responders != ""{ + parameters["responders"] = *responders }else{ - parameters["recipients"] = configParameters ["recipients"] + parameters["responders"] = configParameters ["responders"] } if *tags != ""{ @@ -301,12 +300,6 @@ func parseFlags()map[string]string{ parameters["tags"] = configParameters ["tags"] } - if *teams != ""{ - parameters["teams"] = *teams - }else{ - parameters["teams"] = configParameters ["teams"] - } - if *logPath != "" { parameters["logPath"] = *logPath } else { diff --git a/zabbixIncoming/common/opsgenie-integration.conf b/zabbixIncoming/common/opsgenie-integration.conf index 433df45..3ea698b 100644 --- a/zabbixIncoming/common/opsgenie-integration.conf +++ b/zabbixIncoming/common/opsgenie-integration.conf @@ -4,7 +4,7 @@ #zabbix2opsgenie.logger=warning logPath = /var/log/opsgenie/zabbix2opsgenie.log -#recipients= +#responders= #tags= ####################################### PROXY CONFIGURATION FOR ZABBIX ############################################ diff --git a/zabbixIncoming/zabbix/zabbix2opsgenie.go b/zabbixIncoming/zabbix/zabbix2opsgenie.go index 8e25546..ccee146 100755 --- a/zabbixIncoming/zabbix/zabbix2opsgenie.go +++ b/zabbixIncoming/zabbix/zabbix2opsgenie.go @@ -261,8 +261,7 @@ func parseFlags() map[string]string { eventId := flag.String("eventId", "", "EVENT.ID") recoveryEventStatus := flag.String("recoveryEventStatus", "", "EVENT.RECOVERY.STATUS") tags := flag.String("tags", "", "tags") - recipients := flag.String("recipients", "", "recipients") - teams := flag.String("teams", "", "Teams") + responders := flag.String("responders", "", "Responders") logPath := flag.String("logPath", "", "LOGPATH") flag.Parse() @@ -288,10 +287,10 @@ func parseFlags() map[string]string { configParameters["apiKey"] = *apiKey } - if *recipients != "" { - parameters["recipients"] = *recipients + if *responders != "" { + parameters["responders"] = *responders } else { - parameters["recipients"] = configParameters ["recipients"] + parameters["responders"] = configParameters ["responders"] } if *tags != "" { @@ -300,12 +299,6 @@ func parseFlags() map[string]string { parameters["tags"] = configParameters ["tags"] } - if *teams != "" { - parameters["teams"] = *teams - } else { - parameters["teams"] = configParameters ["teams"] - } - if *logPath != "" { parameters["logPath"] = *logPath } else { diff --git a/zenoss/common/opsgenie-integration.conf.part b/zenoss/common/opsgenie-integration.conf.part index 1471878..fdd1124 100644 --- a/zenoss/common/opsgenie-integration.conf.part +++ b/zenoss/common/opsgenie-integration.conf.part @@ -3,8 +3,7 @@ zenoss2opsgenie.logger=warning zenoss2opsgenie.timeout=60 logPath=/var/log/opsgenie/zenoss2opsgenie.log -#recipients= -#teams= +#responders= #tags= #if you're using maridKey in your marid server, you can add it as a parameter to viaMaridUrl: &maridKey=your_marid_key diff --git a/zenoss/zenoss/zenoss2opsgenie.go b/zenoss/zenoss/zenoss2opsgenie.go index a4cdc46..6ab1321 100644 --- a/zenoss/zenoss/zenoss2opsgenie.go +++ b/zenoss/zenoss/zenoss2opsgenie.go @@ -306,9 +306,8 @@ func postToOpsGenie() { func parseFlags(){ apiKey := flag.String("apiKey","","Api Key") evid := flag.String("evid","","Event Id") - recipients := flag.String("recipients","","Recipients") + responders := flag.String("responders","","Responders") tags := flag.String("tags","","Tags") - teams := flag.String("teams","","Teams") state := flag.String("eventState", "", "Event State") configloc := flag.String("config", "", "Config File Location") logPath := flag.String("logPath", "", "LOGPATH") @@ -347,10 +346,10 @@ func parseFlags(){ parameters["apiKey"] = configParameters ["apiKey"] } - if *recipients != ""{ - parameters["recipients"] = *recipients + if *responders != ""{ + parameters["responders"] = *responders }else{ - parameters["recipients"] = configParameters ["recipients"] + parameters["responders"] = configParameters ["responders"] } if *tags != ""{ @@ -359,12 +358,6 @@ func parseFlags(){ parameters["tags"] = configParameters ["tags"] } - if *teams != ""{ - parameters["teams"] = *teams - }else{ - parameters["teams"] = configParameters ["teams"] - } - if *logPath != "" { parameters["logPath"] = *logPath } else { diff --git a/zenossIncoming/common/opsgenie-integration.conf b/zenossIncoming/common/opsgenie-integration.conf index 5aec242..458646a 100644 --- a/zenossIncoming/common/opsgenie-integration.conf +++ b/zenossIncoming/common/opsgenie-integration.conf @@ -3,8 +3,7 @@ zenoss2opsgenie.logger = warning zenoss2opsgenie.timeout = 60 logPath = /var/log/opsgenie/zenoss2opsgenie.log -#recipients= -#teams= +#responders= #tags= ####################################### PROXY CONFIGURATION FOR ZENOSS ############################################ diff --git a/zenossIncoming/zenoss/zenoss2opsgenie.go b/zenossIncoming/zenoss/zenoss2opsgenie.go index 2fe8275..c468241 100644 --- a/zenossIncoming/zenoss/zenoss2opsgenie.go +++ b/zenossIncoming/zenoss/zenoss2opsgenie.go @@ -303,9 +303,8 @@ func postToOpsGenie() { func parseFlags() { apiKey := flag.String("apiKey", "", "Api Key") evid := flag.String("evid", "", "Event Id") - recipients := flag.String("recipients", "", "Recipients") + responders := flag.String("responders", "", "Responders") tags := flag.String("tags", "", "Tags") - teams := flag.String("teams", "", "Teams") state := flag.String("eventState", "", "Event State") configloc := flag.String("config", "", "Config File Location") logPath := flag.String("logPath", "", "LOGPATH") @@ -343,10 +342,10 @@ func parseFlags() { parameters["apiKey"] = configParameters ["apiKey"] } - if *recipients != "" { - parameters["recipients"] = *recipients + if *responders != "" { + parameters["responders"] = *responders } else { - parameters["recipients"] = configParameters ["recipients"] + parameters["responders"] = configParameters ["responders"] } if *tags != "" { @@ -355,12 +354,6 @@ func parseFlags() { parameters["tags"] = configParameters ["tags"] } - if *teams != "" { - parameters["teams"] = *teams - } else { - parameters["teams"] = configParameters ["teams"] - } - if *logPath != "" { parameters["logPath"] = *logPath } else {