{"id":16173,"date":"2025-04-18T22:42:09","date_gmt":"2025-04-18T14:42:09","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/16173.html"},"modified":"2025-04-18T22:42:09","modified_gmt":"2025-04-18T14:42:09","slug":"%e9%92%88%e5%af%b9%e5%8d%95%e5%8f%b0%e6%b5%aa%e6%bd%ae%e6%9c%8d%e5%8a%a1%e5%99%a8%e8%bf%90%e8%a1%8cwindows-server-2019%e5%92%8csql-server%e7%9a%84mes%e7%b3%bb%e7%bb%9f%e5%9c%ba%e6%99%af%e3%80%81","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/16173.html","title":{"rendered":"\u9488\u5bf9\u5355\u53f0\u6d6a\u6f6e\u670d\u52a1\u5668\u8fd0\u884cWindows Server 2019\u548cSQL Server\u7684MES\u7cfb\u7edf\u573a\u666f\u3001\u9ad8\u6548\u80fd\u76d1\u63a7\u7b56\u7565\uff08\u517c\u987e\u8f6f\u786c\u4ef6\u5065\u5eb7\uff09"},"content":{"rendered":"<\/p>\n<p>&#8212;<\/p>\n<p>### **\u4e00\u3001\u76d1\u63a7\u67b6\u6784\u8bbe\u8ba1\u539f\u5219** &#8211; **\u8f7b\u91cf\u5316**&#xff1a;\u4f18\u5148\u4f7f\u7528Windows\u539f\u751f\u5de5\u5177\u548c\u514d\u8d39\u65b9\u6848&#xff0c;\u907f\u514d\u989d\u5916\u8d44\u6e90\u6d88\u8017 &#8211; **\u5173\u952e\u6027\u805a\u7126**&#xff1a;\u4ec5\u76d1\u63a7\u76f4\u63a5\u5f71\u54cdMES\u8fd0\u884c\u7684\u6838\u5fc3\u6307\u6807 &#8211; **\u81ea\u52a8\u5316\u544a\u8b66**&#xff1a;\u5f02\u5e38\u53d1\u751f\u65f6\u4e3b\u52a8\u89e6\u53d1\u901a\u77e5&#xff0c;\u65e0\u9700\u4eba\u5de5\u5de1\u68c0 &#8211; **\u5bb9\u707e\u9884\u5907**&#xff1a;\u5355\u670d\u52a1\u5668\u573a\u666f\u9700\u5f3a\u5316\u5907\u4efd\u4e0e\u5feb\u901f\u6062\u590d\u80fd\u529b<\/p>\n<p>&#8212;<\/p>\n<p>### **\u4e8c\u3001\u786c\u4ef6\u5065\u5eb7\u76d1\u63a7&#xff08;\u6d6a\u6f6e\u670d\u52a1\u5668&#xff09;** #### **1. \u786c\u4ef6\u72b6\u6001\u76d1\u63a7** &#8211; **\u5de5\u5177**&#xff1a;\u6d6a\u6f6e\u670d\u52a1\u5668iBMC\u8fdc\u7a0b\u7ba1\u7406&#xff08;Web\u754c\u9762\u6216IPMI\u547d\u4ee4\u884c&#xff09; \u00a0 &#8211; \u5173\u952e\u6307\u6807&#xff1a; \u00a0 \u00a0 &#8211; \u78c1\u76d8SMART\u72b6\u6001&#xff08;\u91cd\u70b9\u5173\u6ce8&#096;Reallocated Sectors Count&#096;&#xff09; \u00a0 \u00a0 &#8211; RAID\u9635\u5217\u5065\u5eb7\u5ea6&#xff08;\u901a\u8fc7&#096;ipmitool sdr type &#034;Storage&#034;&#096;\u67e5\u8be2&#xff09; \u00a0 \u00a0 &#8211; \u6e29\u5ea6\/\u7535\u538b\u544a\u8b66&#xff08;\u8bbe\u7f6e\u9608\u503c&#xff1a;CPU\u6e29\u5ea6&lt;75\u2103&#xff09; \u00a0 &#8211; \u914d\u7f6e\u90ae\u4ef6\u544a\u8b66&#xff1a;\u5728iBMC\u7ba1\u7406\u754c\u9762\u8bbe\u7f6e\u9608\u503c\u89e6\u53d1\u90ae\u4ef6\u901a\u77e5<\/p>\n<p>#### **2. \u5b58\u50a8\u5065\u5eb7** &#8211; **\u811a\u672c\u76d1\u63a7&#xff08;PowerShell&#xff09;**&#xff1a; \u00a0 &#096;&#096;&#096;powershell \u00a0 # \u68c0\u67e5\u7269\u7406\u78c1\u76d8\u5065\u5eb7\u72b6\u6001&#xff08;\u9700iBMC SNMP\u652f\u6301&#xff09; \u00a0 $diskHealth &#061; Get-WmiObject -Query &#034;SELECT Status FROM Win32_DiskDrive&#034;\u00a0 \u00a0 if ($diskHealth.Status -ne &#034;OK&#034;) { \u00a0 \u00a0 Send-MailMessage -To &#034;admin&#064;example.com&#034; -Subject &#034;\u78c1\u76d8\u786c\u4ef6\u6545\u969c&#034; -Body &#034;\u7269\u7406\u78c1\u76d8\u72b6\u6001\u5f02\u5e38&#xff1a;$($diskHealth.Status)&#034; \u00a0 } \u00a0 &#096;&#096;&#096;<\/p>\n<p>&#8212;<\/p>\n<p>### **\u4e09\u3001\u64cd\u4f5c\u7cfb\u7edf\u76d1\u63a7&#xff08;Windows Server 2019&#xff09;** #### **1. \u6027\u80fd\u57fa\u7ebf\u76d1\u63a7** &#8211; **\u5de5\u5177**&#xff1a;\u6027\u80fd\u76d1\u89c6\u5668&#xff08;PerfMon&#xff09; \u00a0 &#8211; \u521b\u5efa\u6570\u636e\u6536\u96c6\u5668\u96c6&#xff0c;\u5305\u542b\u4ee5\u4e0b\u8ba1\u6570\u5668&#xff1a; \u00a0 \u00a0 &#8211; &#096;Processor(_Total)\\\\% Processor Time&#096;&#xff08;\u9608\u503c&#xff1a;\u6301\u7eed&gt;85%\u544a\u8b66&#xff09; \u00a0 \u00a0 &#8211; &#096;Memory\\\\Available MBytes&#096;&#xff08;\u9608\u503c&#xff1a;&lt;10%\u603b\u5185\u5b58&#xff09; \u00a0 \u00a0 &#8211; &#096;LogicalDisk(C:)\\\\% Free Space&#096;&#xff08;\u9608\u503c&#xff1a;&lt;15%\u65f6\u544a\u8b66&#xff09; \u00a0 \u00a0 &#8211; &#096;PhysicalDisk(_Total)\\\\Avg. Disk sec\/Read&#096;&#xff08;\u9608\u503c&#xff1a;&gt;20ms\u544a\u8b66&#xff09;<\/p>\n<p>&#8211; **\u914d\u7f6e\u65b9\u6cd5**&#xff1a; \u00a0 1. \u8fd0\u884c&#096;perfmon&#096; \u2192 \u6570\u636e\u6536\u96c6\u5668\u96c6 \u2192 \u7528\u6237\u5b9a\u4e49 \u2192 \u65b0\u5efa \u00a0 2. \u6dfb\u52a0\u4e0a\u8ff0\u8ba1\u6570\u5668&#xff0c;\u8bbe\u7f6e1\u5206\u949f\u91c7\u6837\u95f4\u9694 \u00a0 3. \u53f3\u952e\u5c5e\u6027 \u2192 \u8ba1\u5212\u4efb\u52a1&#xff1a;\u6bcf\u5929\u751f\u6210\u62a5\u544a\u5e76\u4fdd\u5b58\u5230&#096;D:\\\\PerfLogs&#096;<\/p>\n<p>#### **2. \u5173\u952e\u4e8b\u4ef6\u65e5\u5fd7\u76d1\u63a7** &#8211; **\u5de5\u5177**&#xff1a;\u4e8b\u4ef6\u67e5\u770b\u5668 &#043; \u8ba1\u5212\u4efb\u52a1\u544a\u8b66 \u00a0 &#8211; \u91cd\u70b9\u5173\u6ce8\u4e8b\u4ef6ID&#xff1a; \u00a0 \u00a0 | \u4e8b\u4ef6ID | \u542b\u4e49 | \u54cd\u5e94\u52a8\u4f5c | \u00a0 \u00a0 |&#8212;&#8212;&#8211;|&#8212;&#8212;|&#8212;&#8212;&#8212;-| \u00a0 \u00a0 | 41 \u00a0 \u00a0 | \u610f\u5916\u91cd\u542f | \u68c0\u67e5UPS\u7535\u6e90\u65e5\u5fd7 | \u00a0 \u00a0 | 1001 \u00a0 | \u84dd\u5c4f\u8bb0\u5f55 | \u5206\u6790dump\u6587\u4ef6 | \u00a0 \u00a0 | 2019 \u00a0 | \u5185\u5b58\u786c\u9519\u8bef | \u8fd0\u884c&#096;mdsched&#096;\u5185\u5b58\u68c0\u6d4b | \u00a0 \u00a0 | 51 \u00a0 \u00a0 | \u78c1\u76d8\u5199\u5165\u5ef6\u8fdf | \u68c0\u67e5\u78c1\u76d8\u5065\u5eb7\u5ea6 |<\/p>\n<p>&#8211; **\u81ea\u52a8\u5316\u544a\u8b66\u811a\u672c**&#xff08;\u4fdd\u5b58\u4e3a&#096;event_alert.bat&#096;&#xff09;&#xff1a; \u00a0 &#096;&#096;&#096;bat \u00a0 &#064;echo off \u00a0 eventquery.vbs \/L System \/R 100 \/FI &#034;ID eq 41 or ID eq 51&#034; &gt; last_events.txt \u00a0 findstr \/C:&#034;41&#034; last_events.txt &amp;&amp; powershell -Command &#034;Send-MailMessage -To &#039;admin&#064;example.com&#039; -Subject &#039;\u7cfb\u7edf\u5f02\u5e38\u91cd\u542f&#039; -Body &#039;\u68c0\u6d4b\u5230\u610f\u5916\u5173\u673a\u4e8b\u4ef6&#xff0c;\u8bf7\u7acb\u5373\u68c0\u67e5&#xff01;&#039;&#034; \u00a0 &#096;&#096;&#096;<\/p>\n<p>&#8212;<\/p>\n<p>### **\u56db\u3001SQL Server\u4e13\u9879\u76d1\u63a7** #### **1. \u57fa\u7840\u6027\u80fd\u6307\u6807** &#8211; **\u5de5\u5177**&#xff1a;SQL Server Management Studio (SSMS) \u5185\u7f6e\u62a5\u8868 \u00a0 &#8211; \u6bcf\u65e5\u68c0\u67e5&#xff1a; \u00a0 \u00a0 &#8211; **\u62a5\u8868** \u2192 &#096;Dashboard&#096; \u2192 \u67e5\u770b\u7b49\u5f85\u7c7b\u578b&#xff08;\u91cd\u70b9\u76d1\u63a7&#096;PAGEIOLATCH_*&#096;&#xff09; \u00a0 \u00a0 &#8211; &#096;Disk Usage&#096; \u2192 \u68c0\u67e5\u4e8b\u52a1\u65e5\u5fd7\u6587\u4ef6\u589e\u957f\u60c5\u51b5 \u00a0 &#8211; \u5173\u952e\u8ba1\u6570\u5668&#xff1a; \u00a0 \u00a0 &#8211; &#096;SQLServer:Buffer Manager\\\\Page life expectancy&#096;&#xff08;\u9608\u503c&#xff1a;&lt;300\u79d2\u544a\u8b66&#xff09; \u00a0 \u00a0 &#8211; &#096;SQLServer:SQL Statistics\\\\Batch Requests\/sec&#096;&#xff08;\u5bf9\u6bd4\u57fa\u7ebf\u6ce2\u52a8&gt;50%\u9700\u6392\u67e5&#xff09;<\/p>\n<p>#### **2. \u6162\u67e5\u8be2\u4e0e\u6b7b\u9501\u76d1\u63a7** &#8211; **\u542f\u7528\u8ddf\u8e2a**&#xff1a; \u00a0 &#096;&#096;&#096;sql \u00a0 &#8212; \u5f00\u542f\u6b7b\u9501\u8ddf\u8e2a \u00a0 DBCC TRACEON(1222, -1) \u00a0 &#8212; \u8bb0\u5f55\u6162\u67e5\u8be2&#xff08;&gt;5\u79d2&#xff09; \u00a0 EXEC sp_configure &#039;show advanced options&#039;, 1 \u00a0 RECONFIGURE \u00a0 EXEC sp_configure &#039;cost threshold for parallelism&#039;, 5 \u00a0 RECONFIGURE \u00a0 &#096;&#096;&#096;<\/p>\n<p>&#8211; **\u65e5\u5fd7\u5206\u6790\u811a\u672c**&#xff1a; \u00a0 &#096;&#096;&#096;powershell \u00a0 # \u68c0\u67e5SQL\u9519\u8bef\u65e5\u5fd7\u4e2d\u7684\u6b7b\u9501 \u00a0 $logPath &#061; &#034;C:\\\\Program Files\\\\Microsoft SQL Server\\\\MSSQL15.MSSQLSERVER\\\\MSSQL\\\\Log\\\\ERRORLOG&#034; \u00a0 Select-String -Path $logPath -Pattern &#034;deadlock victim&#034; | ForEach-Object { \u00a0 \u00a0 Send-MailMessage -To &#034;dba&#064;example.com&#034; -Subject &#034;SQL\u6b7b\u9501\u544a\u8b66&#034; -Body $_.Line \u00a0 } \u00a0 &#096;&#096;&#096;<\/p>\n<p>&#8212;<\/p>\n<p>### **\u4e94\u3001MES\u5e94\u7528\u5c42\u76d1\u63a7** #### **1. \u8fdb\u7a0b\u4e0e\u670d\u52a1\u76d1\u63a7** &#8211; **\u5173\u952e\u670d\u52a1**&#xff1a; \u00a0 &#8211; MES\u4e3b\u670d\u52a1&#xff08;\u6839\u636e\u5b9e\u9645\u670d\u52a1\u540d\u8bbe\u7f6e\u76d1\u63a7&#xff09; \u00a0 &#8211; IIS\/WCF\u4f9d\u8d56\u670d\u52a1&#xff08;\u5982&#096;W3SVC&#096;\u3001&#096;NetTcpPortSharing&#096;&#xff09;<\/p>\n<p>&#8211; **PowerShell\u5b88\u62a4\u811a\u672c**&#xff08;\u4fdd\u5b58\u4e3a&#096;service_watch.ps1&#096;&#xff09;&#xff1a; \u00a0 &#096;&#096;&#096;powershell \u00a0 $criticalServices &#061; &#064;(&#034;MESService&#034;, &#034;MSSQLSERVER&#034;, &#034;W3SVC&#034;) \u00a0 foreach ($service in $criticalServices) { \u00a0 \u00a0 $status &#061; (Get-Service -Name $service).Status \u00a0 \u00a0 if ($status -ne &#034;Running&#034;) { \u00a0 \u00a0 \u00a0 Start-Service $service -ErrorAction SilentlyContinue \u00a0 \u00a0 \u00a0 Send-MailMessage -To &#034;admin&#064;example.com&#034; -Subject &#034;\u670d\u52a1\u5f02\u5e38&#034; -Body &#034;$service \u670d\u52a1\u505c\u6b62&#xff0c;\u5df2\u5c1d\u8bd5\u91cd\u542f&#xff01;\u72b6\u6001&#xff1a;$status&#034; \u00a0 \u00a0 } \u00a0 } \u00a0 &#096;&#096;&#096; \u00a0 &#8211; \u521b\u5efa\u8ba1\u5212\u4efb\u52a1\u6bcf5\u5206\u949f\u6267\u884c\u4e00\u6b21&#xff1a; \u00a0 \u00a0 &#096;&#096;&#096;bat \u00a0 \u00a0 schtasks \/create \/tn &#034;MES\u670d\u52a1\u76d1\u63a7&#034; \/tr &#034;powershell -File C:\\\\Scripts\\\\service_watch.ps1&#034; \/sc minute \/mo 5 \/ru SYSTEM \u00a0 \u00a0 &#096;&#096;&#096;<\/p>\n<p>#### **2. \u5e94\u7528\u65e5\u5fd7\u76d1\u63a7** &#8211; **\u65e5\u5fd7\u8def\u5f84**&#xff08;\u793a\u4f8b&#xff09;&#xff1a; \u00a0 &#8211; &#096;C:\\\\MES\\\\Logs\\\\App*.log&#096; \u00a0 &#8211; \u76d1\u63a7\u5173\u952e\u8bcd&#xff1a;&#096;ERROR&#096;\u3001&#096;Timeout&#096;\u3001&#096;Connection refused&#096;<\/p>\n<p>&#8211; **\u5b9e\u65f6\u76d1\u63a7\u811a\u672c**&#xff1a; \u00a0 &#096;&#096;&#096;powershell \u00a0 Get-Content -Path &#034;C:\\\\MES\\\\Logs\\\\App.log&#034; -Wait | Select-String -Pattern &#034;ERROR&#034; | ForEach-Object { \u00a0 \u00a0 Send-MailMessage -To &#034;dev&#064;example.com&#034; -Subject &#034;MES\u5e94\u7528\u9519\u8bef&#034; -Body $_.Line \u00a0 } \u00a0 &#096;&#096;&#096;<\/p>\n<p>&#8212;<\/p>\n<p>### **\u516d\u3001\u5907\u4efd\u4e0e\u6062\u590d\u7b56\u7565** #### **1. \u6570\u636e\u5907\u4efd\u65b9\u6848** | \u5907\u4efd\u7c7b\u578b \u00a0 \u00a0 \u00a0 | \u9891\u7387 \u00a0 \u00a0 \u00a0 | \u5de5\u5177 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0| \u5b58\u50a8\u4f4d\u7f6e \u00a0 \u00a0 \u00a0 | |&#8212;&#8212;&#8212;&#8212;&#8212;-|&#8212;&#8212;&#8212;&#8212;|&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;|&#8212;&#8212;&#8212;&#8212;&#8212;-| | SQL\u5b8c\u5168\u5907\u4efd \u00a0 \u00a0| \u6bcf\u65e52:00 AM | SQL Server\u7ef4\u62a4\u8ba1\u5212 \u00a0| \u5916\u90e8USB\u786c\u76d8 &#043; NAS | | \u4e8b\u52a1\u65e5\u5fd7\u5907\u4efd \u00a0 | \u6bcf\u5c0f\u65f6\u4e00\u6b21 | &#096;BACKUP LOG&#096;\u547d\u4ee4 \u00a0 \u00a0| NAS \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0| | \u7cfb\u7edf\u955c\u50cf\u5907\u4efd \u00a0 | \u6bcf\u5468\u65e51:00 AM | Windows Server Backup | \u5916\u7f6e\u786c\u76d8 \u00a0 \u00a0 \u00a0 |<\/p>\n<p>#### **2. \u5feb\u901f\u6062\u590d\u6d4b\u8bd5** &#8211; **\u5b63\u5ea6\u6f14\u7ec3\u6b65\u9aa4**&#xff1a; \u00a0 1. \u4ece\u5907\u4efd\u6062\u590dSQL\u6570\u636e\u5e93\u5230\u6d4b\u8bd5\u5b9e\u4f8b \u00a0 2. \u4f7f\u7528&#096;DBCC CHECKDB&#096;\u9a8c\u8bc1\u6570\u636e\u4e00\u81f4\u6027 \u00a0 3. \u8bb0\u5f55\u6062\u590d\u65f6\u95f4\u76ee\u6807&#xff08;RTO&#xff09;\u5e76\u4f18\u5316\u6d41\u7a0b<\/p>\n<p>&#8212;<\/p>\n<p>### **\u4e03\u3001\u544a\u8b66\u901a\u77e5\u6574\u5408** #### **\u7edf\u4e00\u544a\u8b66\u5e73\u53f0\u642d\u5efa** &#8211; **\u65b9\u6848**&#xff1a;\u4f7f\u7528\u514d\u8d39\u7248**Prometheus &#043; Alertmanager**&#xff1a; \u00a0 1. \u90e8\u7f72&#096;windows_exporter&#096;\u91c7\u96c6\u6307\u6807 \u00a0 2. \u914d\u7f6e\u544a\u8b66\u89c4\u5219\u793a\u4f8b&#xff1a; \u00a0 \u00a0 \u00a0&#096;&#096;&#096;yaml \u00a0 \u00a0 \u00a0groups: \u00a0 \u00a0 \u00a0&#8211; name: MES\u76d1\u63a7 \u00a0 \u00a0 \u00a0 \u00a0rules: \u00a0 \u00a0 \u00a0 \u00a0&#8211; alert: \u9ad8CPU\u4f7f\u7528\u7387 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0expr: 100 &#8211; (avg by(instance)(rate(windows_cpu_time_total{mode&#061;&#034;idle&#034;}[5m])) * 100) &gt; 85 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0for: 5m \u00a0 \u00a0 \u00a0 \u00a0 \u00a0labels: \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0severity: critical \u00a0 \u00a0 \u00a0 \u00a0 \u00a0annotations: \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0summary: &#034;CPU\u8fc7\u8f7d ({{ $value }}%)&#034; \u00a0 \u00a0 \u00a0&#096;&#096;&#096; \u00a0 3. \u96c6\u6210\u90ae\u4ef6\/\u4f01\u4e1a\u5fae\u4fe1\u901a\u77e5<\/p>\n<p>&#8212;<\/p>\n<p>### **\u516b\u3001\u7ef4\u62a4\u8ba1\u5212\u8868** | \u4efb\u52a1 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0| \u9891\u7387 \u00a0 \u00a0 | \u6267\u884c\u65b9\u5f0f \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0| |&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;|&#8212;&#8212;&#8212;-|&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;| | \u6e05\u7406\u4e34\u65f6\u6587\u4ef6 \u00a0 \u00a0 \u00a0 \u00a0| \u6bcf\u5468\u4e00 \u00a0 | &#096;cleanmgr \/sagerun:1&#096; | | \u66f4\u65b0Windows\u8865\u4e01 \u00a0 \u00a0 | \u6bcf\u6708\u7b2c\u4e8c\u5468 | WSUS\u81ea\u52a8\u5ba1\u6279 \u00a0 \u00a0 \u00a0 | | \u68c0\u67e5\u5907\u4efd\u5b8c\u6574\u6027 \u00a0 \u00a0 \u00a0| \u6bcf\u5468\u4e94 \u00a0 | \u624b\u52a8\u9a8c\u8bc13\u4e2a\u968f\u673a\u5907\u4efd | | \u91cd\u542f\u670d\u52a1\u5668&#xff08;\u53ef\u9009&#xff09; \u00a0| \u6bcf\u5b63\u5ea6 \u00a0 | \u7ef4\u62a4\u7a97\u53e3\u671f\u624b\u52a8\u6267\u884c |<\/p>\n<p>&#8212;<\/p>\n<p>### **\u5b9e\u65bd\u6210\u672c\u5bf9\u6bd4** | \u65b9\u6848 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0| \u6210\u672c \u00a0 | \u5b9e\u65bd\u96be\u5ea6 | \u9002\u5408\u573a\u666f \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 | |&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;|&#8212;&#8212;&#8211;|&#8212;&#8212;&#8212;-|&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;| | \u7eafPowerShell\u811a\u672c \u00a0 \u00a0| 0\u5143 \u00a0 \u00a0| \u2605\u2605\u2606\u2606\u2606 \u00a0 | \u7d27\u6025\u76d1\u63a7\u9700\u6c42 \u00a0 \u00a0 \u00a0 | | Prometheus &#043; Grafana| 0\u5143 \u00a0 \u00a0| \u2605\u2605\u2605\u2606\u2606 \u00a0 | \u957f\u671f\u53ef\u89c6\u5316\u76d1\u63a7 \u00a0 \u00a0 | | SolarWinds SAM\u8bd5\u7528\u7248| \u514d\u8d3930\u5929| \u2605\u2605\u2606\u2606\u2606 \u00a0 | \u77ed\u671f\u6df1\u5ea6\u76d1\u63a7\u4f53\u9a8c \u00a0 |<\/p>\n<p>**\u63a8\u8350\u9009\u62e9**&#xff1a;\u5148\u7528PowerShell\u811a\u672c\u5b9e\u73b0\u6838\u5fc3\u76d1\u63a7&#xff08;30\u5206\u949f\u90e8\u7f72&#xff09;&#xff0c;\u540c\u65f6\u9010\u6b65\u642d\u5efaPrometheus\u5b9e\u73b0\u5386\u53f2\u6570\u636e\u5206\u6790&#xff0c;\u5f62\u6210\u5b8c\u6574\u76d1\u63a7\u95ed\u73af\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb977\u6b21\uff0c\u70b9\u8d5e17\u6b21\uff0c\u6536\u85cf18\u6b21\u3002findstr \/C:&quot;41&quot; last_events.txt &amp;&amp; powershell -Command &quot;Send-MailMessage -To \\&#8217;admin@example.com\\&#8217; -Subject \\&#8217;\u7cfb\u7edf\u5f02\u5e38\u91cd\u542f\\&#8217; -Body \\&#8217;\u68c0\u6d4b\u5230\u610f\u5916\u5173\u673a\u4e8b\u4ef6\uff0c\u8bf7\u7acb\u5373\u68c0\u67e5\uff01Send-MailMessage -To &quot;admin@example.com&quot; -Subject &quot;\u78c1\u76d8\u786c\u4ef6\u6545\u969c&quot; -Body &quot;\u7269\u7406\u78c1\u76d8\u72b6\u6001\u5f02\u5e38\uff1a$($diskHealth.Status)&quot;\u72b6\u6001\uff1a$status&quot;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[149,43,44],"topic":[],"class_list":["post-16173","post","type-post","status-publish","format-standard","hentry","category-server","tag-windows","tag-43","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u9488\u5bf9\u5355\u53f0\u6d6a\u6f6e\u670d\u52a1\u5668\u8fd0\u884cWindows Server 2019\u548cSQL Server\u7684MES\u7cfb\u7edf\u573a\u666f\u3001\u9ad8\u6548\u80fd\u76d1\u63a7\u7b56\u7565\uff08\u517c\u987e\u8f6f\u786c\u4ef6\u5065\u5eb7\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/16173.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u9488\u5bf9\u5355\u53f0\u6d6a\u6f6e\u670d\u52a1\u5668\u8fd0\u884cWindows Server 2019\u548cSQL Server\u7684MES\u7cfb\u7edf\u573a\u666f\u3001\u9ad8\u6548\u80fd\u76d1\u63a7\u7b56\u7565\uff08\u517c\u987e\u8f6f\u786c\u4ef6\u5065\u5eb7\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb977\u6b21\uff0c\u70b9\u8d5e17\u6b21\uff0c\u6536\u85cf18\u6b21\u3002findstr \/C:&quot;41&quot; last_events.txt &amp;&amp; powershell -Command &quot;Send-MailMessage -To &#039;admin@example.com&#039; -Subject &#039;\u7cfb\u7edf\u5f02\u5e38\u91cd\u542f&#039; -Body &#039;\u68c0\u6d4b\u5230\u610f\u5916\u5173\u673a\u4e8b\u4ef6\uff0c\u8bf7\u7acb\u5373\u68c0\u67e5\uff01Send-MailMessage -To &quot;admin@example.com&quot; -Subject &quot;\u78c1\u76d8\u786c\u4ef6\u6545\u969c&quot; -Body &quot;\u7269\u7406\u78c1\u76d8\u72b6\u6001\u5f02\u5e38\uff1a$($diskHealth.Status)&quot;\u72b6\u6001\uff1a$status&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/16173.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-18T14:42:09+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/16173.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/16173.html\",\"name\":\"\u9488\u5bf9\u5355\u53f0\u6d6a\u6f6e\u670d\u52a1\u5668\u8fd0\u884cWindows Server 2019\u548cSQL Server\u7684MES\u7cfb\u7edf\u573a\u666f\u3001\u9ad8\u6548\u80fd\u76d1\u63a7\u7b56\u7565\uff08\u517c\u987e\u8f6f\u786c\u4ef6\u5065\u5eb7\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-18T14:42:09+00:00\",\"dateModified\":\"2025-04-18T14:42:09+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/16173.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/16173.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/16173.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u9488\u5bf9\u5355\u53f0\u6d6a\u6f6e\u670d\u52a1\u5668\u8fd0\u884cWindows Server 2019\u548cSQL Server\u7684MES\u7cfb\u7edf\u573a\u666f\u3001\u9ad8\u6548\u80fd\u76d1\u63a7\u7b56\u7565\uff08\u517c\u987e\u8f6f\u786c\u4ef6\u5065\u5eb7\uff09\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u9488\u5bf9\u5355\u53f0\u6d6a\u6f6e\u670d\u52a1\u5668\u8fd0\u884cWindows Server 2019\u548cSQL Server\u7684MES\u7cfb\u7edf\u573a\u666f\u3001\u9ad8\u6548\u80fd\u76d1\u63a7\u7b56\u7565\uff08\u517c\u987e\u8f6f\u786c\u4ef6\u5065\u5eb7\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/16173.html","og_locale":"zh_CN","og_type":"article","og_title":"\u9488\u5bf9\u5355\u53f0\u6d6a\u6f6e\u670d\u52a1\u5668\u8fd0\u884cWindows Server 2019\u548cSQL Server\u7684MES\u7cfb\u7edf\u573a\u666f\u3001\u9ad8\u6548\u80fd\u76d1\u63a7\u7b56\u7565\uff08\u517c\u987e\u8f6f\u786c\u4ef6\u5065\u5eb7\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb977\u6b21\uff0c\u70b9\u8d5e17\u6b21\uff0c\u6536\u85cf18\u6b21\u3002findstr \/C:&quot;41&quot; last_events.txt &amp;&amp; powershell -Command &quot;Send-MailMessage -To 'admin@example.com' -Subject '\u7cfb\u7edf\u5f02\u5e38\u91cd\u542f' -Body '\u68c0\u6d4b\u5230\u610f\u5916\u5173\u673a\u4e8b\u4ef6\uff0c\u8bf7\u7acb\u5373\u68c0\u67e5\uff01Send-MailMessage -To &quot;admin@example.com&quot; -Subject &quot;\u78c1\u76d8\u786c\u4ef6\u6545\u969c&quot; -Body &quot;\u7269\u7406\u78c1\u76d8\u72b6\u6001\u5f02\u5e38\uff1a$($diskHealth.Status)&quot;\u72b6\u6001\uff1a$status&quot;","og_url":"https:\/\/www.wsisp.com\/helps\/16173.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-18T14:42:09+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/16173.html","url":"https:\/\/www.wsisp.com\/helps\/16173.html","name":"\u9488\u5bf9\u5355\u53f0\u6d6a\u6f6e\u670d\u52a1\u5668\u8fd0\u884cWindows Server 2019\u548cSQL Server\u7684MES\u7cfb\u7edf\u573a\u666f\u3001\u9ad8\u6548\u80fd\u76d1\u63a7\u7b56\u7565\uff08\u517c\u987e\u8f6f\u786c\u4ef6\u5065\u5eb7\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-18T14:42:09+00:00","dateModified":"2025-04-18T14:42:09+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/16173.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/16173.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/16173.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u9488\u5bf9\u5355\u53f0\u6d6a\u6f6e\u670d\u52a1\u5668\u8fd0\u884cWindows Server 2019\u548cSQL Server\u7684MES\u7cfb\u7edf\u573a\u666f\u3001\u9ad8\u6548\u80fd\u76d1\u63a7\u7b56\u7565\uff08\u517c\u987e\u8f6f\u786c\u4ef6\u5065\u5eb7\uff09"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/16173","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=16173"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/16173\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=16173"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=16173"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=16173"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=16173"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}