diff --git a/scripts/clmc-service/nginx.conf b/scripts/clmc-service/nginx.conf index 2c4029e3c12c29d669e6561475b424e8e7dd4806..bfdc4641147d52599aa9fec4c1af1d0fcd6e0064 100644 --- a/scripts/clmc-service/nginx.conf +++ b/scripts/clmc-service/nginx.conf @@ -31,6 +31,9 @@ http { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Host $server_name; } + location /clmc-service { + rewrite /clmc-service $scheme://$http_host/clmc-service/ redirect; + } location /clmc-service/ { proxy_pass http://127.0.0.1:9080/; proxy_redirect off; @@ -39,6 +42,9 @@ http { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Host $server_name; } + location /influxdb { + rewrite /influxdb $scheme://$http_host/influxdb/ redirect; + } location /influxdb/ { proxy_pass http://127.0.0.1:8086/; proxy_redirect off; @@ -47,8 +53,20 @@ http { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Host $server_name; } + location /neo4j { + rewrite /neo4j $scheme://$http_host/neo4j/ redirect; + } location /neo4j/ { proxy_pass http://127.0.0.1:7474/; + proxy_redirect $scheme://$http_host/ $scheme://$http_host/neo4j/; # in case a redirect is returned from server + proxy_set_header Host $http_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Host $server_name; + } + location /chronograf/v1 { + rewrite /(.*) /chronograf/$1 break; # since basepath is set to /chronograf, the API is actually using /chronograf/chronograf/v1 + proxy_pass http://127.0.0.1:8888; proxy_redirect off; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; diff --git a/src/service/clmcservice/alertsapi/tests.py b/src/service/clmcservice/alertsapi/tests.py index dd22396a0668642d2fc2b28c7712a20aa933e1e6..5c5b4fa7a9bbfd196a1b3b32bd3d6e7a7bbc46a8 100644 --- a/src/service/clmcservice/alertsapi/tests.py +++ b/src/service/clmcservice/alertsapi/tests.py @@ -301,7 +301,7 @@ def extract_alert_spec_data(alert_spec): for handler_url in trigger.trigger_tpl["action"]["implementation"]: if handler_url == "flame_sfemc": - handler_url = "http://sfemc.localhost/{0}/{1}/{2}/{3}".format(sfc, sfc_instance, policy_id, "trigger_id_{0}".format(version)) + handler_url = "http://sfemc.localhost:8080/sfemc/event/{0}/{1}/{2}".format(sfc, policy_id, "trigger_id_{0}".format(version)) handler_id = "{0}\n{1}\n{2}\n{3}\n{4}".format(sfc, sfc_instance, policy_id, trigger_id, handler_url) handler_id = AlertsConfigurationAPI.get_hash(handler_id) diff --git a/src/service/clmcservice/alertsapi/views.py b/src/service/clmcservice/alertsapi/views.py index 8e481a92d6b59c84929a15ba14596cd10e45eaba..20892c396e5827ccbc413b553a5f9f1a3275ccb9 100644 --- a/src/service/clmcservice/alertsapi/views.py +++ b/src/service/clmcservice/alertsapi/views.py @@ -326,7 +326,7 @@ class AlertsConfigurationAPI(object): # check for flame_sfemc entry, if found replace with sfemc FQDN if http_handler_url == SFEMC: sfemc_fqdn = self.request.registry.settings['sfemc_fqdn'] - http_handler_url = "http://{0}/{1}/{2}/{3}/{4}".format(sfemc_fqdn, sfc, sfc_i, policy_id, trigger_id) + http_handler_url = "http://{0}:8080/sfemc/event/{1}/{2}/{3}".format(sfemc_fqdn, sfc, policy_id, trigger_id) handler_id = "{0}\n{1}\n{2}\n{3}\n{4}".format(sfc, sfc_i, policy_id, event_id, http_handler_url) handler_id = self.get_hash(handler_id)