Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Service-check monitors with empty options.groupby are silently skipped, causing incomplete migrations

Đang mở
#597 1 bình luận 1 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
55/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
python
Lĩnh vực
cli

Hướng nghiên cứu

Bắt đầu trong datadog_sync/model/monitors.py tại các dòng 80-88 và kiểm tra cách pre_resource_action_hook xử lý các service check monitor bị thiếu hoặc có options.groupby rỗng. Tái hiện quá trình migration với monitor mẫu, sau đó xác minh rằng các monitor như vậy không còn bị bỏ qua một cách âm thầm và được chuyển thành công.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

https://github.com/DataDog/datadog-sync-cli/blob/8d60e76de196adf61463e453a4d8a33df296b795/datadog_sync/model/monitors.py#L80-L88

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": []
}
Ngôn ngữ chính
Python
Star
79
Fork
26
Merge trung bình
21 giờ 8 phút
Pull request đã merge (30 ngày)
30

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của DataDog/datadog-sync-cli

Tất cả issue của DataDog/datadog-sync-cli

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.