Monitor logs
Monitor logsΒ allowsΒ youΒ to sendΒ detailed monitorΒ execution logsΒ to externalΒ systemsΒ via webhooks. ThisΒ isΒ usefulΒ for organizationsΒ that wantΒ toΒ centralizeΒ auditing and complianceΒ inΒ theirΒ ownΒ toolsΒ orΒ platforms.
HowΒ ItΒ Works
-
CreateΒ aΒ LogsΒ Integration:
- InΒ theΒ top right corner of the UI, click on the username dropdown and choose API Explorer
- Paste the following graphQL query:
mutation CreateLogsIntegration( $integrationName: String!, $webhookUrl: String!, $headers: [WebhookHeaderInput], ) { createLogsIntegration( integrationName: $integrationName, webhookUrl: $webhookUrl, headers: $headers, ) { logsIntegration { integrationId integrationName webhookUrl } } } - In the Variables section below youβllΒ need to provide:
- AΒ unique nameΒ forΒ theΒ integration
- The webhookΒ URLΒ whereΒ logsΒ should be sent
- (Optional) Custom HTTPΒ headersΒ for authenticationΒ orΒ routing
Sample variables:
{ "integrationName": "My Logs Integration", "webhookUrl": "https://6d2e45f5-333e-444c-111b-7534c02a2ce7.webhook.automation/webhooks", "headers": [{"header_name": "header_value"}] }
-
HTTP Headers:
- HTTP headers should be used if your system requires additional information in order to authenticate or route the request. The header values are encrypted and saved in a credentials store and cannot be retrieved for viewing once they are saved.
-
Receive StructuredΒ WebhookΒ Events:
When a monitorΒ execution concludes, Monte CarloΒ sendsΒ aΒ structured JSONΒ payload to yourΒ webhookΒ URL. This payload includes:- Monitor metadataΒ (ID, type, title, schedule, link to monitor UI)
- ExecutionΒ detailsΒ (start time, status)
Sample payload :
"RequestBody": { "run": { "start_time": "2025-05-13T17:10:29.049226+00:00", "run_id": "d37084ad-ceeb-4940-a48b-037e8d71e67d", "status": "SUCCESS" }, "monitor": { "monitor_id": "a1111111-b222-c666-d444-e55555555555", "monitor_type": "volume", "schedule": "This monitor runs every 10 minute starting at 2023-09-06 00:00:00+00:00", "monitor_url": "https://getmontecarlo.com/monitors/a1111111-b222-c666-d444-e55555555555", "priority": null, "status": "ENABLED", "created_at": "2024-04-17T09:55:44.595694+00:00", "created_by": "[email protected]", "title": "RCA Rule: Volume Rule for ffq_inference" }, "account": { "id": "b1111111-c222-c666-d444-a55555555555" } }
Event Types & Status
- Execution logs are sent for all custom monitors including Validation, Metric, Custom SQL, Comparison, Query Performance and JSON Schema. Legacy custom monitors (Freshness, Volume and Field Quality Rules) are also supported.
- Monitor execution logs are sent at the conclusion of a custom monitor run. The execution run status will be set to one of the following:
- SUCCESS - The monitor execution was successful. The information about whether the execution breached the defined threshold is not available in the monitor execution log.
- FAILED - The monitor execution failed due to faulty SQL syntax, permissions or other causes. To investigate the reason for the failure go to the monitor URL provided in the execution log and click on the Results tab.
- TIMEOUT - Execution results were not available in the allotted monitor runtime and the status was set to timed out.
- CANCELLED - The execution was cancelled (for various reasons, usually due to high cardinality). To investigate the reason for the failure go to the monitor URL provided in the execution log and click on the Results tab.
Managing Integrations
- You can fetch, update, or delete a Logs Integrations viaΒ the GraphQLΒ API functions:
getLogsIntegrationsupdateLogsIntegrationdeleteLogsIntegration
- You can rotate webhook URLs or HTTP headers credentials for security reasons as needed.
