Monitors.pre_resource_action_hook raises SkipResource for any service check monitor that has an empty or missing options.groupby. While this avoids a hard failure on sync, it means these monitors are silently dropped from the destination.
The following service check monitor has no options.groupby, yet it groups by service in the query and syncs successfully once the guard is commented out and the tool is built from source (some fields redacted):
{
"id": xxx,
"org_id": xxx,
"type": "service check",
"name": "XXX",
"message": "XXX",
"query": "\"datadog.agent.up\".over(\"project:XXX\").by(\"service\").last(2).count_by_status()",
"options": {
"thresholds": {
"critical": 1,
"warning": 1,
"ok": 1
},
"notify_audit": false,
"notify_no_data": true,
"no_data_timeframe": 2,
"renotify_interval": 0,
"timeout_h": 0,
"include_tags": false,
"new_group_delay": 0,
"silenced": {}
},
"multi": true,
"created_at": 1763400204000,
"created": "2025-11-17T17:23:24.665593+00:00",
"modified": "2026-06-12T15:40:55.978811+00:00",
"deleted": null,
"priority": 3,
"restricted_roles": null,
"draft_status": "published",
"overall_state_modified": "2025-11-28T18:15:56+00:00",
"overall_state": "OK",
"creator": {
"name": "XXX",
"email": "XXX",
"handle": "XXX,
"id": XX
},
"matching_downtimes": []
}
Monitors.pre_resource_action_hook raises SkipResource for any service check monitor that has an empty or missing options.groupby. While this avoids a hard failure on sync, it means these monitors are silently dropped from the destination.
datadog-sync-cli/datadog_sync/model/monitors.py
Lines 80 to 88 in 8d60e76
The following service check monitor has no options.groupby, yet it groups by service in the query and syncs successfully once the guard is commented out and the tool is built from source (some fields redacted):