{"id":454,"date":"2020-05-08T16:34:14","date_gmt":"2020-05-08T08:34:14","guid":{"rendered":"http:\/\/opensource.dwins.com\/?p=454"},"modified":"2020-05-08T16:35:48","modified_gmt":"2020-05-08T08:35:48","slug":"wmi_exporter-%e7%9a%84%e8%aa%aa%e6%98%8e%e5%8f%8a%e5%ae%89%e8%a3%9d%e8%a8%ad%e5%ae%9a","status":"publish","type":"post","link":"https:\/\/opensource.dwins.com\/?p=454","title":{"rendered":"wmi_exporter \u7684\u8aaa\u660e\u53ca\u5b89\u88dd\u8a2d\u5b9a"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Wmi_exporter \u8aaa\u660e<\/h2>\n\n\n\n<blockquote class=\"wp-block-quote\"><p> \u5728Windows \u7cfb\u7d71\u4e4b\u4e2d\u6536\u96c6\u4e00\u7cfb\u5217\u7684\u91cf\u6e2c\u6307\u6a19\u503c, \u5982: \u7cfb\u7d71\u7684\u8cc7\u6e90\u3001AD\u3001HyperV\u3001IIS\u3001.NET\u3001\u7528\u6236\u3001SQL server\u3001MSMQ\u3001TCP \u9023\u7dda\u2026\u7b49, \u8a73\u7d30\u5982\u4e0b\u8868\u7684\u6536\u96c6\u5668\u6e05\u55ae\u3002\u4e26\u5c07\u9019\u4e9b\u91cf\u6e2c\u503c\u56de\u5831\u7d66 Prometheus\u505a\u70ba\u5132\u5b58\u8a18\u9304\u3002\u9019\u4e9b\u91cf\u6e2c\u503c\u6709\u90e8\u4efd\u662f\u9810\u8a2d\u6253\u958b\uff0c\u53ef\u4ee5\u6309\u5be6\u969b\u7684\u9700\u8981\u4f86\u95dc\u9589\u6216\u662f\u958b\u555f, \u6240\u4ee5\u4f7f\u7528wmi_exporter \u505a\u70ba\u8cc7\u6599\u6536\u96c6\u5668\u6642\uff0c\u53ea\u9700\u4e00\u500b\u6536\u96c6\u5668\u5c31\u53ef\u4ee5\u540c\u6642\u6536\u96c6\u591a\u500b\u91cf\u6e2c\u503c\u7684\u7dad\u5ea6\u3002\u65b9\u6cd5\u5982\u4e0b\u8aaa\u660e\u3002 <\/p><\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Wmi_exporter \u5b89\u88dd\u53ca\u8a2d\u5b9a<\/strong><\/h2>\n\n\n\n<ul><li>master\u4e0b\u8f09\u9ede: <a href=\"https:\/\/github.com\/martinlindhe\/wmi_exporter\">https:\/\/github.com\/martinlindhe\/wmi_exporter<\/a><\/li><li>exe &amp; msi \u4e0b\u8f09\u9ede: <a href=\"https:\/\/github.com\/martinlindhe\/wmi_exporter\/releases\">https:\/\/github.com\/martinlindhe\/wmi_exporter\/releases<\/a><\/li><li>Exe : <a href=\"https:\/\/github.com\/martinlindhe\/wmi_exporter\/releases\/download\/v0.11.1\/wmi_exporter-0.11.1-amd64.exe\">wmi_exporter-0.11.1-amd64.exe<\/a> , Msi : <a href=\"https:\/\/github.com\/martinlindhe\/wmi_exporter\/releases\/download\/v0.11.1\/wmi_exporter-0.11.1-amd64.msi\">wmi_exporter-0.11.1-amd64.msi<\/a><\/li><\/ul>\n\n\n\n<p>\u4f7f\u7528exe \u65b9\u5f0f\u57f7\u884c\u6642, \u7528 wmi_exporter.exe \/? \u4f86\u67e5\u95b1\u53c3\u6578, \u4f7f\u7528msi \u5b89\u88dd\u6210\u201d\u670d\u52d9\u201d\u6642, \u82e5\u4e0d\u5e36\u53c3\u6578\u6642\u4ee5\u9810\u8a2d\u7684\u6536\u96c6\u5668\u6e05\u55ae\u548cPort\u70ba\u56de\u61c9\u3002\u6700\u7c21\u55ae\u7684\u65b9\u6cd5\u662f\u76f4\u63a5\u4f7f\u7528msi \u4e26\u4ee5\u9810\u8a2d\u503c\u5b89\u88dd\u6210&#8221;\u670d\u52d9&#8221;, \u5728\u5b89\u88dd\u5b8c\u6210\u5f8c\u53ef\u4ee5\u5728\u5b89\u88dd\u7684\u4e3b\u6a5f\u4e0a\u958b\u555f\u700f\u89bd\u5668 http:\/\/localhost:9182\/metrics, \u4f86\u6aa2\u67e5\u5373\u53ef\u770b\u5230\u56de\u50b3\u7684\u8cc7\u6599\u503c\u3002\u53ef\u4f7f\u7528\u7684\u53c3\u6578\u70ba\u4e0b\u8868:<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table class=\"\"><tbody><tr><td>Name<\/td><td>Description<\/td><\/tr><tr><td>ENABLED_COLLECTORS<\/td><td>\u5982\u540c\u547d\u4ee4\u5217\u7684 &nbsp;&#8211;collectors.enabled&nbsp;\u53c3\u6578, \u591a\u500b\u6536\u96c6\u5668\u6642\u7528\u9017\u865f\u5206\u9694. \u5982\u4e0b\u4f8b\u53e5<\/td><\/tr><tr><td>LISTEN_ADDR<\/td><td>\u7d81\u5b9a\u7684IP\u4f4d\u5740. \u9810\u8a2d\u70ba0.0.0.0<\/td><\/tr><tr><td>LISTEN_PORT<\/td><td>\u7d81\u5b9a\u7684\u7aef\u53e3\u57e0. \u9810\u8a2d\u70ba9182.<\/td><\/tr><tr><td>METRICS_PATH<\/td><td>\u91cf\u6e2c\u503c\u8def\u5f91.\u9810\u8a2d\u503c\u70ba&nbsp;\/metrics<\/td><\/tr><tr><td>TEXTFILE_DIR<\/td><td>\u5982\u540c\u547d\u4ee4\u5217\u7684&nbsp;&#8211;collector.textfile.directory&nbsp;\u53c3\u6578, \u91cf\u6e2c\u503c\u4e2d\u82e5\u8981\u4f7f\u7528\u6587\u5b57\u6a94\u6642\u7684\u76ee\u9304\u6307\u5411\u3002<\/td><\/tr><tr><td>EXTRA_FLAGS<\/td><td>Allows passing full CLI flags. Defaults to an empty string.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u4f8b\u53e5<\/h2>\n\n\n\n<ol><li> \u53ea\u8981\u56de\u61c9 os &amp; iis \u7684 metrics \u4e26\u4e14\u7aef\u53e3\u70ba 5000(\u9810\u8a2d\u70ba9182)  &gt;&gt; msiexec \/i wmi_exporter-0.7.0-amd64.msi ENABLED_COLLECTORS=os,iis LISTEN_PORT=5000<\/li><li>\u542bhyperV &gt;&gt; msiexec \/i wmi_exporter-0.7.0-amd64.msi&nbsp;ENABLED_COLLECTORS=os,cpu,cs,hyperv,logical_disk,memory,net,service,system <ul><li>\u76f8\u7b49\u65bc\u547d\u4ee4\u5217 &gt;&gt; .\\wmi_exporter.exe &#8211;collectors.enabled &#8220;os,cpu,cs,hyperv,logical_disk,memory,net,service,system\u201c<\/li><\/ul><\/li><\/ol>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u6536\u96c6\u5668\u6e05\u55ae(collectors)<\/strong><\/h2>\n\n\n\n<p>\u9810\u8a2d\u6536\u96c6\u5668<\/p>\n\n\n<table width=\"588\">\n<tbody>\n<tr>\n<td width=\"115\">Name<\/td>\n<td width=\"376\">Description<\/td>\n<td width=\"97\">Enabled by default<\/td>\n<\/tr>\n<tr>\n<td width=\"115\"><a href=\"https:\/\/github.com\/martinlindhe\/wmi_exporter\/blob\/master\/docs\/collector.cpu.md\">cpu<\/a><\/td>\n<td width=\"376\">CPU \u4f7f\u7528\u91cf: \u983b\u7387\u53ca\u4f7f\u7528\u7387<\/td>\n<td width=\"97\">\u2713<\/td>\n<\/tr>\n<tr>\n<td width=\"115\"><a href=\"https:\/\/github.com\/martinlindhe\/wmi_exporter\/blob\/master\/docs\/collector.cs.md\">cs<\/a><\/td>\n<td width=\"376\">\u7cfb\u7d71CPU\u6578\u91cf, \u5be6\u969b\u8a18\u61b6\u9ad4\u5bb9\u91cf<\/td>\n<td width=\"97\">\u2713<\/td>\n<\/tr>\n<tr>\n<td width=\"115\"><a href=\"https:\/\/github.com\/martinlindhe\/wmi_exporter\/blob\/master\/docs\/collector.logical_disk.md\">logical_disk<\/a><\/td>\n<td width=\"376\">\u786c\u789f\u7684\u5bb9\u91cf\u5927\u5c0f, \u4f11\u606f\u79d2\u6578, \u8b80\u5beb\u6642\u9593,<\/td>\n<td width=\"97\">\u2713<\/td>\n<\/tr>\n<tr>\n<td width=\"115\"><a href=\"https:\/\/github.com\/martinlindhe\/wmi_exporter\/blob\/master\/docs\/collector.net.md\">net<\/a><\/td>\n<td width=\"376\">\u5404\u500b\u7db2\u8def\u4ecb\u9762\u7684\u6536\u9001\u50b3\u8f38\u91cf, \u754c\u9762\u898f\u683c\u4ee5\u53ca\u5176\u5b83\u7d71\u8a08\u91cf<\/td>\n<td width=\"97\">\u2713<\/td>\n<\/tr>\n<tr>\n<td width=\"115\"><a href=\"https:\/\/github.com\/martinlindhe\/wmi_exporter\/blob\/master\/docs\/collector.os.md\">os<\/a><\/td>\n<td width=\"376\">OS metrics (memory, processes, users)<br>\u4f5c\u696d\u7cfb\u7d71\u7684\u91cf\u6e2c\u503c, \u5982: paging, users, virtual memory, \u2026<\/td>\n<td width=\"97\">\u2713<\/td>\n<\/tr>\n<tr>\n<td width=\"115\"><a href=\"https:\/\/github.com\/martinlindhe\/wmi_exporter\/blob\/master\/docs\/collector.service.md\">service<\/a><\/td>\n<td width=\"376\">\u7cfb\u7d71\u670d\u52d9\u7684\u76ee\u524d, \u555f\u52d5\u72c0\u614b<\/td>\n<td width=\"97\">\u2713<\/td>\n<\/tr>\n<tr>\n<td width=\"115\"><a href=\"https:\/\/github.com\/martinlindhe\/wmi_exporter\/blob\/master\/docs\/collector.system.md\">system<\/a><\/td>\n<td width=\"376\">System calls, contact switch, system queue, \u7cfb\u7d71\u555f\u52d5\u6642\u9593, \u7dda\u7a0b<\/td>\n<td width=\"97\">\u2713<\/td>\n<\/tr>\n<tr>\n<td width=\"115\"><a href=\"https:\/\/github.com\/martinlindhe\/wmi_exporter\/blob\/master\/docs\/collector.textfile.md\">textfile<\/a><\/td>\n<td width=\"376\">Read prometheus metrics from a text file<\/td>\n<td width=\"97\">\u2713<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\n\n<p>\u5176\u5b83\u6536\u96c6\u5668<\/p>\n\n\n<table width=\"863\">\n<tbody>\n<tr>\n<td width=\"115\">Name<\/td>\n<td width=\"298\">Description<\/td>\n<td width=\"97\">Name<\/td>\n<td width=\"353\">Description<\/td>\n<\/tr>\n<tr>\n<td width=\"115\"><span style=\"color: #ff0000;\"><a style=\"color: #ff0000;\" href=\"https:\/\/github.com\/martinlindhe\/wmi_exporter\/blob\/master\/docs\/collector.ad.md\">ad<\/a><\/span><\/td>\n<td width=\"298\">Active Directory \u7db2\u57df\u670d\u52d9<\/td>\n<td width=\"97\"><a href=\"https:\/\/github.com\/martinlindhe\/wmi_exporter\/blob\/master\/docs\/collector.netframework_clrjit.md\">netframework_clrjit<\/a><\/td>\n<td width=\"353\">.NET Framework JIT metrics<\/td>\n<\/tr>\n<tr>\n<td width=\"115\"><a href=\"https:\/\/github.com\/martinlindhe\/wmi_exporter\/blob\/master\/docs\/collector.adfs.md\">adfs<\/a><\/td>\n<td width=\"298\">Active Directory \u540c\u76df\u670d\u52d9<\/td>\n<td width=\"97\"><a href=\"https:\/\/github.com\/martinlindhe\/wmi_exporter\/blob\/master\/docs\/collector.netframework_clrloading.md\">netframework_clrloading<\/a><\/td>\n<td width=\"353\">.NET Framework CLR Loading metrics<\/td>\n<\/tr>\n<tr>\n<td width=\"115\"><a href=\"https:\/\/github.com\/martinlindhe\/wmi_exporter\/blob\/master\/docs\/collector.container.md\">container<\/a><\/td>\n<td width=\"298\">\u5bb9\u5668<\/td>\n<td width=\"97\"><a href=\"https:\/\/github.com\/martinlindhe\/wmi_exporter\/blob\/master\/docs\/collector.netframework_clrlocksandthreads.md\">netframework_clrlocksandthreads<\/a><\/td>\n<td width=\"353\">.NET Framework locks and metrics threads<\/td>\n<\/tr>\n<tr>\n<td width=\"115\"><span style=\"color: #ff0000;\"><a style=\"color: #ff0000;\" href=\"https:\/\/github.com\/martinlindhe\/wmi_exporter\/blob\/master\/docs\/collector.dns.md\">dns<\/a><\/span><\/td>\n<td width=\"298\">DNS Server<\/td>\n<td width=\"97\"><a href=\"https:\/\/github.com\/martinlindhe\/wmi_exporter\/blob\/master\/docs\/collector.netframework_clrmemory.md\">netframework_clrmemory<\/a><\/td>\n<td width=\"353\">.NET Framework Memory metrics<\/td>\n<\/tr>\n<tr>\n<td width=\"115\"><a href=\"https:\/\/github.com\/martinlindhe\/wmi_exporter\/blob\/master\/docs\/collector.hyperv.md\">hyperv<\/a><\/td>\n<td width=\"298\">Hyper-V hosts<\/td>\n<td width=\"97\"><a href=\"https:\/\/github.com\/martinlindhe\/wmi_exporter\/blob\/master\/docs\/collector.netframework_clrremoting.md\">netframework_clrremoting<\/a><\/td>\n<td width=\"353\">.NET Framework Remoting metrics<\/td>\n<\/tr>\n<tr>\n<td width=\"115\"><span style=\"color: #ff0000;\"><a style=\"color: #ff0000;\" href=\"https:\/\/github.com\/martinlindhe\/wmi_exporter\/blob\/master\/docs\/collector.iis.md\">iis<\/a><\/span><\/td>\n<td width=\"298\">IIS sites and applications<\/td>\n<td width=\"97\"><a href=\"https:\/\/github.com\/martinlindhe\/wmi_exporter\/blob\/master\/docs\/collector.netframework_clrsecurity.md\">netframework_clrsecurity<\/a><\/td>\n<td width=\"353\">.NET Framework Security Check metrics<\/td>\n<\/tr>\n<tr>\n<td width=\"115\"><a href=\"https:\/\/github.com\/martinlindhe\/wmi_exporter\/blob\/master\/docs\/collector.logon.md\">logon<\/a><\/td>\n<td width=\"298\">User logon sessions<\/td>\n<td width=\"97\"><a href=\"https:\/\/github.com\/martinlindhe\/wmi_exporter\/blob\/master\/docs\/collector.process.md\">process<\/a><\/td>\n<td width=\"353\">Per-process metrics<\/td>\n<\/tr>\n<tr>\n<td width=\"115\"><a href=\"https:\/\/github.com\/martinlindhe\/wmi_exporter\/blob\/master\/docs\/collector.memory.md\">memory<\/a><\/td>\n<td width=\"298\">Memory usage metrics<\/td>\n<td width=\"97\"><a href=\"https:\/\/github.com\/martinlindhe\/wmi_exporter\/blob\/master\/docs\/collector.remote_fx.md\">remote_fx<\/a><\/td>\n<td width=\"353\">RemoteFX protocol (RDP) metrics<\/td>\n<\/tr>\n<tr>\n<td width=\"115\"><span style=\"color: #ff0000;\"><a style=\"color: #ff0000;\" href=\"https:\/\/github.com\/martinlindhe\/wmi_exporter\/blob\/master\/docs\/collector.msmq.md\">msmq<\/a><\/span><\/td>\n<td width=\"298\">MSMQ queues<\/td>\n<td width=\"97\"><a href=\"https:\/\/github.com\/martinlindhe\/wmi_exporter\/blob\/master\/docs\/collector.tcp.md\">tcp<\/a><\/td>\n<td width=\"353\">TCP connections<\/td>\n<\/tr>\n<tr>\n<td width=\"115\"><span style=\"color: #ff0000;\"><a style=\"color: #ff0000;\" href=\"https:\/\/github.com\/martinlindhe\/wmi_exporter\/blob\/master\/docs\/collector.mssql.md\">mssql<\/a><\/span><\/td>\n<td width=\"298\"><a href=\"https:\/\/docs.microsoft.com\/en-us\/sql\/relational-databases\/performance-monitor\/use-sql-server-objects#SQLServerPOs\">SQL Server Performance Objects&nbsp;metrics<\/a><\/td>\n<td width=\"97\"><a href=\"https:\/\/github.com\/martinlindhe\/wmi_exporter\/blob\/master\/docs\/collector.thermalzone.md\">thermalzone<\/a><\/td>\n<td width=\"353\">Thermal information<\/td>\n<\/tr>\n<tr>\n<td width=\"115\"><a href=\"https:\/\/github.com\/martinlindhe\/wmi_exporter\/blob\/master\/docs\/collector.netframework_clrexceptions.md\">netframework_clrexceptions<\/a><\/td>\n<td width=\"298\">.NET Framework CLR Exceptions<\/td>\n<td width=\"97\"><span style=\"color: #ff0000;\"><a style=\"color: #ff0000;\" href=\"https:\/\/github.com\/martinlindhe\/wmi_exporter\/blob\/master\/docs\/collector.terminal_services.md\">terminal_services<\/a><\/span><\/td>\n<td width=\"353\">Terminal services (RDS)<\/td>\n<\/tr>\n<tr>\n<td width=\"115\"><a href=\"https:\/\/github.com\/martinlindhe\/wmi_exporter\/blob\/master\/docs\/collector.netframework_clrinterop.md\">netframework_clrinterop<\/a><\/td>\n<td width=\"298\">.NET Framework Interop Metrics<\/td>\n<td width=\"97\"><a href=\"https:\/\/github.com\/martinlindhe\/wmi_exporter\/blob\/master\/docs\/collector.vmware.md\">vmware<\/a><\/td>\n<td width=\"353\">Performance counters installed by the Vmware Guest agent<\/td>\n<\/tr>\n<\/tbody>\n<\/table>","protected":false},"excerpt":{"rendered":"<p>Wmi_exporter \u8aaa\u660e \u5728Windows \u7cfb\u7d71\u4e4b\u4e2d\u6536\u96c6\u4e00\u7cfb\u5217\u7684\u91cf\u6e2c\u6307\u6a19\u503c, \u5982: \u7cfb\u7d71\u7684\u8cc7\u6e90\u3001AD\u3001H &#8230; <a title=\"wmi_exporter \u7684\u8aaa\u660e\u53ca\u5b89\u88dd\u8a2d\u5b9a\" class=\"read-more\" href=\"https:\/\/opensource.dwins.com\/?p=454\">\u95b1\u8b80\u66f4\u591a <span class=\"screen-reader-text\">wmi_exporter \u7684\u8aaa\u660e\u53ca\u5b89\u88dd\u8a2d\u5b9a<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[8],"tags":[24],"_links":{"self":[{"href":"https:\/\/opensource.dwins.com\/index.php?rest_route=\/wp\/v2\/posts\/454"}],"collection":[{"href":"https:\/\/opensource.dwins.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/opensource.dwins.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/opensource.dwins.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/opensource.dwins.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=454"}],"version-history":[{"count":3,"href":"https:\/\/opensource.dwins.com\/index.php?rest_route=\/wp\/v2\/posts\/454\/revisions"}],"predecessor-version":[{"id":457,"href":"https:\/\/opensource.dwins.com\/index.php?rest_route=\/wp\/v2\/posts\/454\/revisions\/457"}],"wp:attachment":[{"href":"https:\/\/opensource.dwins.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=454"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/opensource.dwins.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=454"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/opensource.dwins.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=454"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}