Skip to content

Commit

Permalink
Merge pull request #104 from opsgenie/nagios-multiserver-conf-changes
Browse files Browse the repository at this point in the history
set nagios server if it is configured in config file
  • Loading branch information
emelkomurcu authored Mar 8, 2024
2 parents 9144511 + f79c9c6 commit 722f1a9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion Nagios/scripts/actionExecutor.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,16 @@ def parse_from_details(key):

def get_url(conf_property, backward_compatibility_url):
url = parse_field(conf_property, True)
if url:
nagios_server = parse_field("nagios_server", False)

if nagios_server and "default" != nagios_server:
scheme = parse_field("scheme", False)
if scheme is None and "http" not in nagios_server:
scheme = "http"
url = urllib.parse.urlunparse(
(scheme, nagios_server, urllib.parse.quote(backward_compatibility_url), None, None, None))
return url
elif url:
return url
else:
# backward compatibility
Expand Down
2 changes: 1 addition & 1 deletion release/oec-builder/oecScriptsVersion.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"JiraServiceDesk": "1.1.4",
"LibreNMS": "1.1.3",
"Marid": "1.1.3",
"Nagios": "1.1.5",
"Nagios": "1.1.6",
"NagiosXI": "1.1.5",
"OEC": "1.1.3",
"OP5": "1.1.3",
Expand Down

0 comments on commit 722f1a9

Please sign in to comment.