Sidekiq Metrics API

Tier: Free, Premium, Ultimate Offering: Self-managed

이 API 엔드포인트를 사용하면 Sidekiq의 현재 상태, 작업, 대기열 및 프로세스에 관한 일부 정보를 검색할 수 있습니다.

현재 대기열 메트릭 가져오기

등록된 모든 대기열 및 그들의 백로그와 대기 시간에 대한 정보를 나열합니다.

GET /sidekiq/queue_metrics
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/sidekiq/queue_metrics"

예시 응답:

{
  "queues": {
    "default": {
      "backlog": 0,
      "latency": 0
    }
  }
}

현재 프로세스 메트릭 가져오기

귀하의 대기열을 처리하기 위해 등록된 모든 Sidekiq 워커에 관한 정보를 나열합니다.

GET /sidekiq/process_metrics 
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/sidekiq/process_metrics"

예시 응답:

{
  "processes": [
    {
      "hostname": "gitlab.example.com",
      "pid": 5649,
      "tag": "gitlab",
      "started_at": "2016-06-14T10:45:07.159-05:00",
      "queues": [
        "post_receive",
        "mailers",
        "archive_repo",
        "system_hook",
        "project_web_hook",
        "gitlab_shell",
        "incoming_email",
        "runner",
        "common",
        "default"
      ],
      "labels": [],
      "concurrency": 25,
      "busy": 0
    }
  ]
}

현재 작업 통계 가져오기

Sidekiq가 수행한 작업에 대한 정보를 나열합니다.

GET /sidekiq/job_stats
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/sidekiq/job_stats"

예시 응답:

{
  "jobs": {
    "processed": 2,
    "failed": 0,
    "enqueued": 0,
    "dead": 0
  }
}

이전에 언급된 모든 메트릭의 합성 응답 가져오기

Sidekiq에 대한 현재 사용 가능한 모든 정보를 나열합니다.

GET /sidekiq/compound_metrics
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/sidekiq/compound_metrics"

예시 응답:

{
  "queues": {
    "default": {
      "backlog": 0,
      "latency": 0
    }
  },
  "processes": [
    {
      "hostname": "gitlab.example.com",
      "pid": 5649,
      "tag": "gitlab",
      "started_at": "2016-06-14T10:45:07.159-05:00",
      "queues": [
        "post_receive",
        "mailers",
        "archive_repo",
        "system_hook",
        "project_web_hook",
        "gitlab_shell",
        "incoming_email",
        "runner",
        "common",
        "default"
      ],
      "labels": [],
      "concurrency": 25,
      "busy": 0
    }
  ],
  "jobs": {
    "processed": 2,
    "failed": 0,
    "enqueued": 0,
    "dead": 0
  }
}