「DELLサーバのRAIDを監視してmuninでメール通知」の助けになれば
DELLサーバのRAIDを監視してmuninでメール通知
素晴らしい手順エントリで、最後のオチも良かったのでw
さっきのエントリの途中まで実行し、omreportコマンドが実行出来る様になったら、
[oranie@hogehoge]# omreport storage pdisk controller=0 List of Physical Disks on Controller PERC H700 Integrated (Embedded) Controller PERC H700 Integrated (Embedded) ID : 0:0:0 Status : Ok Name : Physical Disk 0:0:0 State : Online Power Status : Spun Up Bus Protocol : SAS Media : HDD Revision : DS64 Failure Predicted : No Certified : Yes Encryption Capable : No Encrypted : Not Applicable Progress : Not Applicable Mirror Set ID : 0 Capacity : 465.25 GB (499558383616 bytes) Used RAID Disk Space : 465.25 GB (499558383616 bytes) Available RAID Disk Space : 0.00 GB (0 bytes) Hot Spare : No Vendor ID : DELL(tm) Product ID : ST9500430SS Serial No. : 9SP25T9Z Part Number : TH0R734K212330BI02QQA00 Negotiated Speed : 6.00 Gbps Capable Speed : 6.00 Gbps Manufacture Day : 07 Manufacture Week : 46 Manufacture Year : 2010 SAS Address : 5000C50025BE104D ID : 0:0:1 Status : Ok Name : Physical Disk 0:0:1 State : Online Power Status : Spun Up Bus Protocol : SAS Media : HDD Revision : DS64 Failure Predicted : No Certified : Yes Encryption Capable : No Encrypted : Not Applicable Progress : Not Applicable Mirror Set ID : 0 Capacity : 465.25 GB (499558383616 bytes) Used RAID Disk Space : 465.25 GB (499558383616 bytes) Available RAID Disk Space : 0.00 GB (0 bytes) Hot Spare : No Vendor ID : DELL(tm) Product ID : ST9500430SS Serial No. : 9SP27D3J Part Number : TH0R734K212330C100EHA00 Negotiated Speed : 6.00 Gbps Capable Speed : 6.00 Gbps Manufacture Day : 06 Manufacture Week : 48 Manufacture Year : 2010 SAS Address : 5000C50025CC90A9 ID : 0:0:2 Status : Ok Name : Physical Disk 0:0:2 State : Online Power Status : Spun Up Bus Protocol : SAS Media : HDD Revision : DS64 Failure Predicted : No Certified : Yes Encryption Capable : No Encrypted : Not Applicable Progress : Not Applicable Mirror Set ID : 0 Capacity : 465.25 GB (499558383616 bytes) Used RAID Disk Space : 465.25 GB (499558383616 bytes) Available RAID Disk Space : 0.00 GB (0 bytes) Hot Spare : No Vendor ID : DELL(tm) Product ID : ST9500430SS Serial No. : 9SP27YEW Part Number : TH0R734K212330C100E5A00 Negotiated Speed : 6.00 Gbps Capable Speed : 6.00 Gbps Manufacture Day : 06 Manufacture Week : 48 Manufacture Year : 2010 SAS Address : 5000C50025CCA3E5 ID : 0:0:3 Status : Ok Name : Physical Disk 0:0:3 State : Online Power Status : Spun Up Bus Protocol : SAS Media : HDD Revision : DS64 Failure Predicted : No Certified : Yes Encryption Capable : No Encrypted : Not Applicable Progress : Not Applicable Mirror Set ID : 0 Capacity : 465.25 GB (499558383616 bytes) Used RAID Disk Space : 465.25 GB (499558383616 bytes) Available RAID Disk Space : 0.00 GB (0 bytes) Hot Spare : No Vendor ID : DELL(tm) Product ID : ST9500430SS Serial No. : 9SP27X9R Part Number : TH0R734K212330C100ESA00 Negotiated Speed : 6.00 Gbps Capable Speed : 6.00 Gbps Manufacture Day : 06 Manufacture Week : 48 Manufacture Year : 2010 SAS Address : 5000C50025CC84C9
で物理Disk状態が見れて、
[oranie@hogehoge]# omreport storage vdisk controller=0 List of Virtual Disks on Controller PERC H700 Integrated (Embedded) Controller PERC H700 Integrated (Embedded) ID : 0 Status : Ok Name : Virtual Disk 0 State : Ready Encrypted : No Layout : RAID-10 Size : 930.50 GB (999116767232 bytes) Device Name : /dev/sda Bus Protocol : SAS Media : HDD Read Policy : Adaptive Read Ahead Write Policy : Write Back Cache Policy : Not Applicable Stripe Element Size : 64 KB Disk Cache Policy : Disabled
で仮想Disk(Raidね)の状態が見れるので、例えばこれをcronで1分に1回とか適当なディレクトリに
出力しておいて、それをWebサーバで見れるようにして、監視サーバが
http://example.com/pdisk.txt
http://example.com/vdisk.txt
で取得できるようにするとか、sshコマンドで直接叩くとか、NagiosだったらNRPE使うとかで
簡単なOK、NG判定のスクリプトを叩く事で正常性を確認して、NGならメール飛ばすとかでどうですかね?
たとえばこんなのをcronで1時間に1回とか。
https://github.com/oranie/oranie/blob/master/shell/dell_raid_check.sh