Pass in Alerta authentication details for Alertmanager to send alerts with

Related-PROD: PROD-35884 PROD-35932 PROD-35958
Change-Id: I2bea5ef751883cd266139539fec1f7bde96a0ea0
diff --git a/docker/swarm/stack/monitoring/alerta.yml b/docker/swarm/stack/monitoring/alerta.yml
index 0470a09..bec608c 100644
--- a/docker/swarm/stack/monitoring/alerta.yml
+++ b/docker/swarm/stack/monitoring/alerta.yml
@@ -27,6 +27,7 @@
                 - ${prometheus:alerta:config_dir}/alerta.conf:/web/config.js
                 - ${prometheus:alerta:config_dir}/alertad.conf:/app/alertad.conf
               environment:
+                ADMIN_KEY: ${_param:alerta_admin_key}
                 ADMIN_USERS: ${_param:alerta_admin_username}
                 ADMIN_PASSWORD_FILE: "/run/secrets/alerta"
                 AUTH_REQUIRED: "True"
diff --git a/prometheus/alertmanager/notification/alerta.yml b/prometheus/alertmanager/notification/alerta.yml
index 2ab3509..729aa26 100644
--- a/prometheus/alertmanager/notification/alerta.yml
+++ b/prometheus/alertmanager/notification/alerta.yml
@@ -16,9 +16,5 @@
             enabled: true
             webhook_configs:
               alerta:
-                url: "http://${_param:alertmanager_notification_alerta_host}:${_param:alertmanager_notification_alerta_port}/api/webhooks/prometheus"
+                url: "http://${_param:alertmanager_notification_alerta_host}:${_param:alertmanager_notification_alerta_port}/api/webhooks/prometheus?api-key=${_param:alerta_admin_key}"
                 send_resolved: true
-                http_config:
-                  basic_auth:
-                    username: "${_param:alerta_admin_username}"
-                    password: "${_param:alerta_admin_password}"