@cryptotaxi247 / CoPilot / commits / 208da5ff

Update monitoring alert URL in provision service

Taylor committed Feb 6, 2024 at 14:14 UTC 208da5ffdfa97d5ec43079ee3ffbbb9f6e4733c4
1 file changed +3 -3
backend/app/integrations/monitoring_alert/services/provision.py
+3 -3
@@ -197,13 +197,13 @@ async def provision_wazuh_monitoring_alert(request: ProvisionMonitoringAlertRequ
197 logger.info(f"Invoking provision_wazuh_monitoring_alert with request: {request.dict()}")
198 notification_exists = await check_if_event_notification_exists("SEND TO COPILOT")
199 if not notification_exists:
200 - url_whitelisted = await check_if_url_whitelist_entry_exists(f"http://{os.getenv('SERVER_IP')}:5000/monitoring_alerts/create")
200 + url_whitelisted = await check_if_url_whitelist_entry_exists(f"http://{os.getenv('SERVER_IP')}:5000/monitoring_alert/create")
201 if not url_whitelisted:
202 logger.info("Provisioning URL Whitelist")
203 whitelisted_urls = await build_url_whitelisted_entries(
204 whitelist_url_model=GraylogUrlWhitelistEntryConfig(
205 id=await generate_random_id(),
206 - value=f"http://{os.getenv('SERVER_IP')}:5000/monitoring_alerts/create",
206 + value=f"http://{os.getenv('SERVER_IP')}:5000/monitoring_alert/create",
207 title="SEND TO COPILOT",
208 type="literal",
209 ),
@@ -215,7 +215,7 @@ async def provision_wazuh_monitoring_alert(request: ProvisionMonitoringAlertRequ
215 GraylogAlertWebhookNotificationModel(
216 title="SEND TO COPILOT",
217 description="Send alert to Copilot",
218 - config={"url": f"http://{os.getenv('SERVER_IP')}:5000/monitoring_alerts/create", "type": "http-notification-v1"},
218 + config={"url": f"http://{os.getenv('SERVER_IP')}:5000/monitoring_alert/create", "type": "http-notification-v1"},
219 ),
220 )
221 logger.info(f"SEND TO COPILOT Webhook provisioned with id: {notification_id}")