Skip to content

Commit

Permalink
migrate teams and recipients fields to responders
Browse files Browse the repository at this point in the history
  • Loading branch information
emelkomurcu committed May 23, 2019
1 parent c5db2ae commit 98317d1
Show file tree
Hide file tree
Showing 42 changed files with 107 additions and 242 deletions.
15 changes: 4 additions & 11 deletions bmcFootPrintsV11/bmcFootPrintsV11/bmcFootPrints2opsgenie.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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 != "" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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 != "" {
Expand Down
15 changes: 4 additions & 11 deletions bmcFootPrintsV12/bmcFootPrintsV12/bmcFootPrints2opsgenie.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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 != "" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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 != "" {
Expand Down
3 changes: 1 addition & 2 deletions custom-integration-scripts/op5/marid.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
#you can define log levels: warning, debug, info,error
nagios2opsgenie.logger=warning
nagios2opsgenie.timeout= 60
#recipients=<comma_separated_list_of_recipients>
#responders=<comma_separated_list_of_responders>
#tags=<comma_separated_list_of_tags>
#teams=<comma_separated_list_of_teams>

#You can use different nagiosServer values for each of your Nagios servers (see marid configuration below)
nagios_server=default
Expand Down
3 changes: 1 addition & 2 deletions icinga/common/opsgenie-integration.conf.part
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
icinga2opsgenie.logger=warning
icinga2opsgenie.timeout=60
logPath=/var/log/opsgenie/icinga2opsgenie.log
#recipients=<comma_separated_list_of_recipients>
#tags=<comma_separated_list_of_tags>
#teams=<comma_separated_list_of_teams>
#responders=<comma_separated_list_of_responders>

#You can use different icingaServer values for each of your Icinga servers (see marid configuration below)
icinga_server=default
Expand Down
14 changes: 4 additions & 10 deletions icinga/icinga/icinga2opsgenie.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -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 != ""{
Expand All @@ -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
Expand Down
3 changes: 1 addition & 2 deletions icinga2/common/opsgenie-integration.conf.part
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
icinga2opsgenie.logger=warning
icinga2opsgenie.timeout=60
logPath=/var/log/opsgenie/icinga2opsgenie.log
#recipients=<comma_separated_list_of_recipients>
#responders=<comma_separated_list_of_responders>
#tags=<comma_separated_list_of_tags>
#teams=<comma_separated_list_of_teams>

#You can use different icingaServer values for each of your Icinga servers (see marid configuration below)
icinga_server=default
Expand Down
15 changes: 4 additions & 11 deletions icinga2/icinga2/icinga2opsgenie.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -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 != ""{
Expand All @@ -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 {
Expand Down
3 changes: 1 addition & 2 deletions icinga2Incoming/common/opsgenie-integration.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
icinga2opsgenie.logger = warning
icinga2opsgenie.timeout = 60
logPath = /var/log/opsgenie/icinga2opsgenie.log
#recipients=<comma_separated_list_of_recipients>
#responders=<comma_separated_list_of_responders>
#tags=<comma_separated_list_of_tags>
#teams=<comma_separated_list_of_teams>

#You can use different icingaServer values for each of your Icinga servers (see marid configuration below)
icinga_server = default
Expand Down
15 changes: 4 additions & 11 deletions icinga2Incoming/icinga2/icinga2opsgenie.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -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 != "" {
Expand All @@ -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 {
Expand Down
3 changes: 1 addition & 2 deletions icingaIncoming/common/opsgenie-integration.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
icinga2opsgenie.logger = warning
icinga2opsgenie.timeout = 60
logPath = /var/log/opsgenie/icinga2opsgenie.log
#recipients=<comma_separated_list_of_recipients>
#responders=<comma_separated_list_of_responders>
#tags=<comma_separated_list_of_tags>
#teams=<comma_separated_list_of_teams>

#You can use different icingaServer values for each of your Icinga servers (see marid configuration below)
icinga_server = default
Expand Down
15 changes: 4 additions & 11 deletions icingaIncoming/icinga/icinga2opsgenie.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -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 != "" {
Expand All @@ -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 {
Expand Down
3 changes: 1 addition & 2 deletions nagios/common/opsgenie-integration.conf.part
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
nagios2opsgenie.logger=warning
nagios2opsgenie.timeout= 60
logPath=/var/log/opsgenie/nagios2opsgenie.log
#recipients=<comma_separated_list_of_recipients>
#responders=<comma_separated_list_of_responders>
#tags=<comma_separated_list_of_tags>
#teams=<comma_separated_list_of_teams>

#You can use different nagiosServer values for each of your Nagios servers (see marid configuration below)
nagios_server=default
Expand Down
15 changes: 4 additions & 11 deletions nagios/nagios/nagios2opsgenie.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -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 != ""{
Expand Down
3 changes: 1 addition & 2 deletions nagiosIncoming/common/opsgenie-integration.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
nagios2opsgenie.logger = warning
nagios2opsgenie.timeout = 60
logPath = /var/log/opsgenie/nagios2opsgenie.log
#recipients=<comma_separated_list_of_recipients>
#responders=<comma_separated_list_of_responders>
#tags=<comma_separated_list_of_tags>
#teams=<comma_separated_list_of_teams>

#You can use different nagiosServer values for each of your Nagios servers (see marid configuration below)
nagios_server = default
Expand Down
Loading

0 comments on commit 98317d1

Please sign in to comment.