Monitor logs
Monitor logs allows you to send detailed custom 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:
getLogsIntegrations
updateLogsIntegration
deleteLogsIntegration
- You can rotate webhook URLs or HTTP headers credentials for security reasons as needed.
Updated about 12 hours ago