Prometheus /api/v1/targets

1 개요[ | ]

Prometheus /api/v1/targets
root@ceaead3fadad:/# curl -s http://localhost:9090/api/v1/targets | jq
{
  "status": "success",
  "data": {
    "activeTargets": [
      {
        "discoveredLabels": {
          "__address__": "localhost:9090",
          "__metrics_path__": "/metrics",
          "__scheme__": "http",
          "job": "prometheus"
        },
        "labels": {
          "instance": "localhost:9090",
          "job": "prometheus"
        },
        "scrapePool": "prometheus",
        "scrapeUrl": "http://localhost:9090/metrics",
        "globalUrl": "http://ceaead3fadad:9090/metrics",
        "lastError": "",
        "lastScrape": "2021-02-18T19:28:35.561649671Z",
        "lastScrapeDuration": 0.003036905,
        "health": "up"
      }
    ],
    "droppedTargets": []
  }
}
root@ceaead3fadad:/# curl -s 'http://localhost:9090/api/v1/targets?state=active' | jq
{
  "status": "success",
  "data": {
    "activeTargets": [
      {
        "discoveredLabels": {
          "__address__": "localhost:9090",
          "__metrics_path__": "/metrics",
          "__scheme__": "http",
          "job": "prometheus"
        },
        "labels": {
          "instance": "localhost:9090",
          "job": "prometheus"
        },
        "scrapePool": "prometheus",
        "scrapeUrl": "http://localhost:9090/metrics",
        "globalUrl": "http://ceaead3fadad:9090/metrics",
        "lastError": "",
        "lastScrape": "2021-02-18T19:32:05.561500345Z",
        "lastScrapeDuration": 0.006084211,
        "health": "up"
      }
    ],
    "droppedTargets": []
  }
}

2 같이 보기[ | ]

3 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}