Added related code to sf_notifier SL service
Change-Id: I97deb94d3e69d0452ba93778d11810327fe15a7f
Related-Bug: PROD-24686
diff --git a/defaults/docker_images.yml b/defaults/docker_images.yml
index 5093781..91f8d2c 100644
--- a/defaults/docker_images.yml
+++ b/defaults/docker_images.yml
@@ -34,6 +34,7 @@
docker_image_remote_agent: "${_param:mcp_docker_registry}/openstack-docker/telegraf:${_param:mcp_version}"
docker_image_remote_collector: "${_param:mcp_docker_registry}/openstack-docker/heka:${_param:mcp_version}"
docker_image_remote_storage_adapter: "${_param:mcp_docker_registry}/openstack-docker/remote_storage_adapter:${_param:mcp_version}"
+ docker_image_sf_notifier: "${_param:mcp_docker_registry}/openstack-docker/sf_notifier:${_param:mcp_version}"
##
docker_image_cockroachdb: "${_param:mcp_docker_registry}/mirantis/external/cockroach:v2.1.1"
# keycloak
diff --git a/docker/swarm/stack/monitoring/sf_notifier.yml b/docker/swarm/stack/monitoring/sf_notifier.yml
new file mode 100644
index 0000000..1fb416f
--- /dev/null
+++ b/docker/swarm/stack/monitoring/sf_notifier.yml
@@ -0,0 +1,42 @@
+classes:
+- system.prometheus.sf_notifier.container
+parameters:
+ _param:
+ sf_notifier_workers: 4
+ sf_notifier_buffer_size: 32768
+ docker:
+ client:
+ stack:
+ monitoring:
+ network:
+ monitoring:
+ driver: overlay
+ driver_opts:
+ encrypted: 1
+ service:
+ sf_notifier:
+ networks:
+ - monitoring
+ deploy:
+ replicas: 1
+ labels:
+ com.mirantis.monitoring: "sf-notifier"
+ restart_policy:
+ condition: any
+ labels:
+ com.mirantis.monitoring: "sf-notifier"
+ image: ${_param:docker_image_sf_notifier}
+ ports:
+ - 15018:5000
+ volumes:
+ - ${prometheus:sf_notifier:dir:logs}:/var/log/sf-notifier
+ environment:
+ SF_NOTIFIER_WORKERS: ${_param:sf_notifier_workers}
+ SF_NOTIFIER_BUFFER_SIZE: ${_param:sf_notifier_buffer_size}
+ SF_NOTIFIER_APP_PORT: ${prometheus:sf_notifier:uwsgi:bind_port}
+ SFDC_AUTH_URL: "${_param:sf_notifier_sfdc_auth_url}"
+ SFDC_USERNAME: "${_param:sf_notifier_sfdc_username}"
+ SFDC_PASSWORD: "${_param:sf_notifier_sfdc_password}"
+ SFDC_ORGANIZATION_ID: "${_param:sf_notifier_sfdc_organization_id}"
+ SFDC_ENVIRONMENT_ID: "${_param:sf_notifier_sfdc_environment_id}"
+ SFDC_SANDBOX_ENABLED: ${_param:sf_notifier_sfdc_sandbox_enabled}
diff --git a/prometheus/alertmanager/notification/salesforce.yml b/prometheus/alertmanager/notification/salesforce.yml
new file mode 100644
index 0000000..8beb374
--- /dev/null
+++ b/prometheus/alertmanager/notification/salesforce.yml
@@ -0,0 +1,23 @@
+parameters:
+ _param:
+ alertmanager_notification_salesforce_host: sf_notifier
+ alertmanager_notification_salesforce_port: ${prometheus:sf_notifier:uwsgi:bind_port}
+ prometheus:
+ alertmanager:
+ enabled: true
+ config:
+ route:
+ routes:
+ salesforce:
+ receiver: HTTP-salesforce
+ match_re:
+ - label: route
+ value: '(.*salesforce.*)'
+ continue: true
+ receiver:
+ HTTP-salesforce:
+ enabled: true
+ webhook_configs:
+ salesforce-vip:
+ url: "http://${_param:alertmanager_notification_salesforce_host}:${_param:alertmanager_notification_salesforce_port}/hook"
+ send_resolved: true
diff --git a/prometheus/sf_notifier/container.yml b/prometheus/sf_notifier/container.yml
new file mode 100644
index 0000000..4a2e8f5
--- /dev/null
+++ b/prometheus/sf_notifier/container.yml
@@ -0,0 +1,2 @@
+classes:
+- service.prometheus.sf_notifier.container