{"id":7005,"date":"2025-07-30T15:26:56","date_gmt":"2025-07-30T06:26:56","guid":{"rendered":"https:\/\/blog.smartlight.co.jp\/?p=7005"},"modified":"2025-07-30T15:26:57","modified_gmt":"2025-07-30T06:26:57","slug":"grafana%e3%81%a7windows%e3%81%aecpu%e4%bd%bf%e7%94%a8%e7%8e%87%e3%82%92%e5%8f%af%e8%a6%96%e5%8c%96%e3%81%99%e3%82%8b%ef%bc%88prometheus-windows-exporter%ef%bc%89","status":"publish","type":"post","link":"https:\/\/blog.smartlight.co.jp\/?p=7005","title":{"rendered":"Grafana\u3067Windows\u306eCPU\u4f7f\u7528\u7387\u3092\u53ef\u8996\u5316\u3059\u308b\uff08Prometheus + windows exporter\uff09"},"content":{"rendered":"\n<p>\u4eca\u56de\u306fGrafana\u3067Windows\u306eCPU\u4f7f\u7528\u7387\u3092\u53ef\u8996\u5316\u3057\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u4f7f\u3046\u3082\u306e<\/h3>\n\n\n\n<p>\u4eca\u56de\u4f7f\u3046\u4e3b\u306a\u69cb\u6210\u306f\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3067\u3059\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Grafana<\/strong>\uff1a\u53ef\u8996\u5316\u30c4\u30fc\u30eb<\/li>\n\n\n\n<li><strong>Prometheus<\/strong>\uff1a\u6642\u7cfb\u5217\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9<\/li>\n\n\n\n<li><strong>windows_exporter<\/strong>\uff1aWindows\u306e\u5404\u7a2e\u30e1\u30c8\u30ea\u30af\u30b9\u3092Prometheus\u5411\u3051\u306b\u30a8\u30af\u30b9\u30dd\u30fc\u30c8<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Grafana\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n\n\n\n<p>\u516c\u5f0f\u30b5\u30a4\u30c8\u306b\u30a2\u30af\u30bb\u30b9:<br><a>https:\/\/grafana.com\/grafana\/download<\/a><\/p>\n\n\n\n<p>\u300cWindows\u300d\u3092\u9078\u629e\u3002<\/p>\n\n\n\n<p>\u300cDownload the Installer\u300d\u3092\u30af\u30ea\u30c3\u30af\u3002<\/p>\n\n\n\n<p>\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f <code>.msi<\/code> \u30d5\u30a1\u30a4\u30eb\u3092\u30c0\u30d6\u30eb\u30af\u30ea\u30c3\u30af\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002<\/p>\n\n\n\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5b8c\u4e86\u3059\u308b\u3068\u3001Grafana\u306f\u81ea\u52d5\u3067Windows\u30b5\u30fc\u30d3\u30b9\u3068\u3057\u3066\u767b\u9332\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u8d77\u52d5\u306b\u6210\u529f\u3057\u305f\u3089\u3001\u4ee5\u4e0b\u3092\u30d6\u30e9\u30a6\u30b6\u306b\u5165\u529b\u3057\u3066GUI\u3092\u958b\u3051\u307e\u3059\u3002<\/p>\n\n\n\n<p>http:\/\/localhost:3000<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Prometheus\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n\n\n\n<p> \u4ee5\u4e0b\u306ePrometheus\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u30da\u30fc\u30b8\u3078\u30a2\u30af\u30bb\u30b9<\/p>\n\n\n\n<p><a href=\"https:\/\/prometheus.io\/download\/#prometheus\">https:\/\/prometheus.io\/download\/#prometheus<\/a><\/p>\n\n\n\n<p>\u300c<strong>Windows amd64<\/strong>\u300d\u7248\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9 \u2192 zip\u30d5\u30a1\u30a4\u30eb\u3092\u89e3\u51cd<\/p>\n\n\n\n<p><code>prometheus.exe<\/code> \u3092\u30c0\u30d6\u30eb\u30af\u30ea\u30c3\u30af\u3057\u3066\u8d77\u52d5<br>\u2192 <code>http:\/\/localhost:9090<\/code> \u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u305f\u3089\u6210\u529f\u3067\u3059<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">windows exporter\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n\n\n\n<p>GitHub\u516c\u5f0f\u30da\u30fc\u30b8 \u2192 <a class=\"\" href=\"https:\/\/github.com\/prometheus-community\/windows_exporter\/releases\">windows_exporter releases<\/a><\/p>\n\n\n\n<p>\u4f8b\uff1a<code>windows_exporter-&lt;version&gt;-amd64.exe<\/code> \u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/p>\n\n\n\n<p>\u3053\u3061\u3089\u3082<code>http:\/\/localhost:9182\/metrics<\/code> \u3067Windows\u306e\u60c5\u5831\u304c\u78ba\u8a8d\u3067\u304d\u308c\u3070\u6210\u529f\u3067\u3059<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u7de8\u96c6\u30fb\u8ffd\u8a18\u3059\u308b <code>prometheus.yml<\/code><\/h3>\n\n\n\n<p>\u6b21\u306b<code>prometheus.yml<\/code>\u3092\u30e1\u30e2\u5e33\u3067\u958b\u304d\u4ee5\u4e0b\u3092\u8ffd\u8a18\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p><br>scrape_configs:<br>  &#8211; job_name: &#8220;prometheus&#8221;<br>    static_configs:<br>      &#8211; targets: [&#8220;localhost:9090&#8221;]<br>        labels:<br>          app: &#8220;prometheus&#8221;<br><br>  &#8211; job_name: &#8220;windows&#8221;<br>    static_configs:<br>      &#8211; targets: [&#8220;localhost:9182&#8221;]<br>        labels:<br>          app: &#8220;windows&#8221;<br><\/p>\n\n\n\n<p>\u3053\u308c\u3067\u4fdd\u5b58\u3057\u3066Prometheus \u3092\u518d\u8d77\u52d5\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30d6\u30e9\u30a6\u30b6\u3067 <code>http:\/\/localhost:9090\/targets<\/code> \u3092\u958b\u304d\u3001<code>windows<\/code> \u3068\u3044\u3046 job \u306b <code>UP<\/code>\u3068\u306a\u3063\u3066\u3044\u308c\u3070\u5b8c\u4e86\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Grafana\u3067Prometheus\u3092\u30c7\u30fc\u30bf\u30bd\u30fc\u30b9\u3068\u3057\u3066\u8ffd\u52a0<\/h3>\n\n\n\n<p>Grafana\u306b\u30ed\u30b0\u30a4\u30f3\u3057\u3001\u5de6\u306e\u30e1\u30cb\u30e5\u30fc\u30db\u30fc\u30e0\u304b\u3089\u30c7\u30fc\u30bf\u30bd\u30fc\u30b9\u306e\u8ffd\u52a0\u3092\u62bc\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>Prometheus \u3092\u9078\u3073\u3001<code>http:\/\/localhost:9090<\/code> \u306a\u3069\u9069\u5207\u306aURL\u3092\u5165\u529b\u3057<\/p>\n\n\n\n<p>[Save &amp; test] \u30dc\u30bf\u30f3\u3092\u62bc\u3057\u3066exporter\u3092\u958b\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3059\u308b\u3068\u305d\u3053\u306bMetric\u3092\u9078\u629e\u3059\u308b\u5834\u6240\u304c\u3042\u308b\u305f\u3081\u5165\u529b\u3057\u307e\u3059\u3002\u4eca\u56de\u306fCPU\u4f7f\u7528\u7387\u3092\u898b\u305f\u3044\u306e\u3067\u300cwindows_cpu_time_total\u300d\u3068\u5165\u308c\u3001Run query\u30dc\u30bf\u30f3\u3067\u60c5\u5831\u304c\u8868\u793a\u3055\u308c\u307e\u3057\u305f\u3002\u203b\u65e5\u672c\u8a9e\u8868\u8a18\u306b\u3057\u3066\u3044\u308b\u5834\u5408\u306f\u30af\u30a8\u30ea\u691c\u67fb\u3068\u3044\u3046\u30dc\u30bf\u30f3\u8868\u8a18\u3067\u3057\u305f\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1025\" height=\"422\" src=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2025\/07\/image-42.png\" alt=\"\" class=\"wp-image-7018\" style=\"width:573px;height:auto\" srcset=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2025\/07\/image-42.png 1025w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2025\/07\/image-42-300x124.png 300w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2025\/07\/image-42-768x316.png 768w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2025\/07\/image-42.png 856w\" sizes=\"auto, (max-width: 1025px) 100vw, 1025px\" \/><\/figure>\n\n\n\n<p>\u3053\u308c\u306f\u6298\u308c\u7dda\u30b0\u30e9\u30d5\u3067\u3059\u304c\u68d2\u30b0\u30e9\u30d5\u306a\u3069\u306e\u4ed6\u306e\u30b0\u30e9\u30d5\u306b\u5909\u3048\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u307e\u3068\u3081<\/h2>\n\n\n\n<p>Prometheus + windows_exporter + Grafana \u306e\u7d44\u307f\u5408\u308f\u305b\u3067\u3001\u7c21\u5358\u306bWindows\u30de\u30b7\u30f3\u306eCPU\u4f7f\u7528\u7387\u3092\u53ef\u8996\u5316\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3057\u305f\u3002\u81ea\u5b85\u30b5\u30fc\u30d0\u30fc\u3084\u793e\u5185PC\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u76e3\u8996\u306b\u5f79\u7acb\u3064\u69cb\u6210\u3060\u3068\u8003\u3048\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u56de\u306fGrafana\u3067Windows\u306eCPU\u4f7f\u7528\u7387\u3092\u53ef\u8996\u5316\u3057\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002 \u4f7f\u3046\u3082\u306e \u4eca\u56de\u4f7f\u3046\u4e3b\u306a\u69cb\u6210\u306f\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3067\u3059\uff1a Grafana\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb \u516c\u5f0f\u30b5\u30a4\u30c8\u306b\u30a2\u30af\u30bb\u30b9:https:\/\/grafana.com<\/p>\n","protected":false},"author":22,"featured_media":7007,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jin_ogp_image_url":"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2025\/07\/thumbnails-ogp-7005.png","_jin_last_featured_id":7007,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3],"tags":[],"class_list":["post-7005","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-intern"],"jetpack_featured_media_url":"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2025\/07\/thumbnails-featured-7005.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/blog.smartlight.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/7005","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.smartlight.co.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.smartlight.co.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.smartlight.co.jp\/index.php?rest_route=\/wp\/v2\/users\/22"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.smartlight.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7005"}],"version-history":[{"count":2,"href":"https:\/\/blog.smartlight.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/7005\/revisions"}],"predecessor-version":[{"id":7023,"href":"https:\/\/blog.smartlight.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/7005\/revisions\/7023"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.smartlight.co.jp\/index.php?rest_route=\/wp\/v2\/media\/7007"}],"wp:attachment":[{"href":"https:\/\/blog.smartlight.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7005"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.smartlight.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7005"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.smartlight.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7005"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}