PageSourceSearch

https://metricshub.com/docs/latest/assets/js/678d3a95.3f4af8f7.js

js metricshub.com collected 2026-09-24 23:40:33 UTC 8,173 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkmetricshub_doc=self.webpackChunkmetricshub_doc||[]).push([["34877"],{89097(e,s,n){n.r(s),n.d(s,{metadata:()=>t,default:()=>p,frontMatter:()=>l,contentTitle:()=>d,toc:()=>a,assets:()=>o});var t=JSON.parse('{"id":"connectors/wbemgendisknt","title":"WMI - Disks","description":"This connector discovers and monitors S.M.A.R.T.-enabled disks that are directly handled by Windows through the WMI service.","source":"@site/docs/connectors/wbemgendisknt.md","sourceDirName":"connectors","slug":"/connectors/wbemgendisknt","permalink":"/docs/latest/connectors/wbemgendisknt","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"WMI - Disks","description":"This connector discovers and monitors S.M.A.R.T.-enabled disks that are directly handled by Windows through the WMI service.","keywords":["metricshub","connector","wbemgendisknt","microsoft windows"],"hide_table_of_contents":true,"displayed_sidebar":"docsSidebar","pagination_prev":null,"pagination_next":null},"sidebar":"docsSidebar"}'),r=n(74848),i=n(28453),c=n(6228);let l={title:"WMI - Disks",description:"This connector discovers and monitors S.M.A.R.T.-enabled disks that are directly handled by Windows through the WMI service.",keywords:["metricshub","connector","wbemgendisknt","microsoft windows"],hide_table_of_contents:!0,displayed_sidebar:"docsSidebar",pagination_prev:null,pagination_next:null},d="WMI - Disks",o={},a=[{value:"Description",id:"description",level:2},{value:"Target",id:"target",level:2},{value:"Prerequisites",id:"prerequisites",level:2},{value:"Examples",id:"examples",level:2},{value:"CLI",id:"cli",level:3},{value:"metricshub.yaml",id:"metricshubyaml",level:3},{value:"Connector Activation Criteria",id:"connector-activation-criteria",level:2},{value:"Metrics",id:"metrics",level:2}];function h(e){let s={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.header,{children:(0,r.jsx)(s.h1,{id:"wmi---disks",children:"WMI - Disks"})}),"\n",(0,r.jsx)(s.h2,{id:"description",children:"Description"}),"\n",(0,r.jsx)(s.p,{children:"This connector discovers and monitors S.M.A.R.T.-enabled disks that are directly handled by Windows through the WMI service."}),"\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.a,{href:"/docs/latest/connectors/tags/hardware",children:(0,r.jsx)(s.code,{children:"hardware"})})," ",(0,r.jsx)(s.a,{href:"/docs/latest/connectors/tags/windows",children:(0,r.jsx)(s.code,{children:"windows"})})]}),"\n",(0,r.jsxs)(s.admonition,{title:"Superseded Connector",type:"warning",children:[(0,r.jsx)(s.p,{children:"This connector is superseded by:"}),(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:(0,r.jsx)(s.a,{href:"/docs/latest/connectors/cpqidedrivearray",children:"CpqIDEDriveArray"})}),"\n",(0,r.jsx)(s.li,{children:(0,r.jsx)(s.a,{href:"/docs/latest/connectors/cpqscsidrivearray",children:"CpqSCSIDriveArray"})}),"\n",(0,r.jsx)(s.li,{children:(0,r.jsx)(s.a,{href:"/docs/latest/connectors/dellstoragemanager",children:"DellStorageManager"})}),"\n",(0,r.jsx)(s.li,{children:(0,r.jsx)(s.a,{href:"/docs/latest/connectors/sunhwmon",children:"SunHwMon"})}),"\n",(0,r.jsx)(s.li,{children:(0,r.jsx)(s.a,{href:"/docs/latest/connectors/winstoragespaces",children:"WinStorageSpaces"})}),"\n"]})]}),"\n",(0,r.jsx)(s.h2,{id:"target",children:"Target"}),"\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:"Typical platform:"})," ",(0,r.jsx)(s.a,{href:"/docs/latest/connectors/platforms/microsoft-windows",children:"Microsoft Windows"})]}),"\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:"Operating system:"})," Microsoft Windows"]}),"\n",(0,r.jsx)(s.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:"Leverages:"})," WMI"]}),"\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:"Technology and protocols:"})," WMI"]}),"\n",(0,r.jsx)(s.h2,{id:"examples",children:"Examples"}),"\n",(0,r.jsx)(s.h3,{id:"cli",children:"CLI"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-batch",children:"metricshub HOSTNAME -t win -c +WBEMGenDiskNT --wmi -u USER\n"})}),"\n",(0,r.jsx)(s.h3,{id:"metricshubyaml",children:"metricshub.yaml"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-yaml",children:"resourceGroups:\n  <RESOURCE_GROUP>:\n    resources:\n      <HOSTNAME-ID>:\n        attributes:\n          host.name: <HOSTNAME> # Change with actual host name\n          host.type: win\n        connectors: [ +WBEMGenDiskNT ] # Optional, to load only this connector\n        protocols:\n          wmi:\n            username: <USERNAME> # Change with actual credentials\n            password: <PASSWORD> # Encrypted using metricshub-encrypt\n"})}),"\n",(0,r.jsx)(s.h2,{id:"connector-activation-criteria",children:"Connector Activation Criteria"}),"\n",(0,r.jsxs)(s.p,{children:["The ",(0,r.jsx)(s.strong,{children:"WMI - Disks"})," connector will be automatically activated, and its status will be reported as OK if all the below criteria are met:"]}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["The device type must be one of: ",(0,r.jsx)(s.strong,{children:"NT"})]}),"\n",(0,r.jsxs)(s.li,{children:["The Windows service ",(0,r.jsx)(s.strong,{children:"WINMGMT"})," is present and running"]}),"\n",(0,r.jsxs)(s.li,{children:["The ",(0,r.jsx)(s.strong,{children:"WMI query"})," below succeeds:","\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["Namespace: ",(0,r.jsx)(s.code,{children:"root\\WMI"})]}),"\n",(0,r.jsxs)(s.li,{children:["Query: ",(0,r.jsx)(s.code,{children:"SELECT InstanceName FROM MSStorageDriver_FailurePredictStatus WHERE Active=TRUE"})]}),"\n",(0,r.jsxs)(s.li,{children:["Result contains: ",(0,r.jsx)(s.code,{children:"\\(^[^M]...\\)\\|\\(^.[^P]..\\)\\|\\(^..[^I].\\)\\|\\(^...[^O]\\)"})," (regex)"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(s.h2,{id:"metrics",children:"Metrics"}),"\n",(0,r.jsx)(c.A,{data:[{type:"disk_controller",metrics:['hw.status{hw.type="disk_controller", state="present"}'],attributes:["controller_number","hw.parent.type","id","model","vendor"]},{type:"physical_disk",metrics:["hw.physical_disk.size",'hw.status{hw.type="physical_disk", state="degraded|failed|ok"}','hw.status{hw.type="physical_disk", state="predicted_failure"}','hw.status{hw.type="physical_disk", state="present"}'],attributes:["hw.parent.id","hw.parent.type","id","name","vendor"]}]})]})}function p(e={}){let{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},6228(e,s,n){n.d(s,{A:()=>i});var t=n(74848),r=n(96540);function i({data:e}){return e&&0!==e.length?(0,t.jsx)("div",{className:"tableWrapper_qs3z",children:(0,t.jsxs)("table",{className:"metricsTable_SMom",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{children:"Type"}),(0,t.jsx)("th",{children:"Collected Metrics"}),(0,t.jsx)("th",{children:"Specific Attributes"})]})}),(0,t.jsx)("tbody",{children:e.map((e,s)=>(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{className:"typeCell_BkqM",children:(0,t.jsx)("strong",{children:e.type})}),(0,t.jsx)("td",{className:"metricsCell_ll3D",children:e.metrics.length>0?e.metrics.map((s,n)=>(0,t.jsxs)(r.Fragment,{children:[(0,t.jsx)("code",{children:s}),n<e.metrics.length-1&&(0,t.jsx)("br",{})]},n)):"-"}),(0,t.jsx)("td",{className:"attributesCell_x8LT",children:e.attributes.length>0?e.attributes.map((s,n)=>(0,t.jsxs)(r.Fragment,{children:[(0,t.jsx)("code",{children:s}),n<e.attributes.length-1&&(0,t.jsx)("br",{})]},n)):"-"})]},s))})]})}):(0,t.jsx)("p",{children:"No specific metrics are collected by this connector."})}},28453(e,s,n){n.d(s,{R:()=>c,x:()=>l});var t=n(96540);let r={},i=t.createContext(r);function c(e){let s=t.useContext(i);return t.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function l(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:c(e.components),t.createElement(i.Provider,{value:s},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.