HDD Health (S.M.A.R.T.) monitoring script
Moderators: Developers, Moderators
HDD Health (S.M.A.R.T.) monitoring script
I wrote a script that takes the data output from HDD Health, a free S.M.A.R.T. monitor for Windows, and outputs it for Cacti. It reads the report file (ex: WDC WD740GD-75FLA1.txt)., which lists the names for the various attributes. Then it reads the data file (ex: WD-WMAKE1359731.hdd). for the updated attribute values. While the report file has values, you'll notice that the file is not updated until closure of the program.
The graphs are pretty boring (as they should be), but with the threshold addition being added into the next version of Cacti, it will play a vital role in monitoring a HD's health and possible failure prediction.
You'll notice the graph will have many values that are empty. This is perfectly normal. This happens because I added all of the SMART attributes from the various hard drive makers at my house. Some have values others don't.
One can add in additional values to be monitored. Just need to add it to the data input method, data templates and graph.
The graphs are pretty boring (as they should be), but with the threshold addition being added into the next version of Cacti, it will play a vital role in monitoring a HD's health and possible failure prediction.
You'll notice the graph will have many values that are empty. This is perfectly normal. This happens because I added all of the SMART attributes from the various hard drive makers at my house. Some have values others don't.
One can add in additional values to be monitored. Just need to add it to the data input method, data templates and graph.
- Attachments
-
- hddhealth.zip
- script and needed templates.
- (51.11 KiB) Downloaded 2015 times
-
- Sample graph
- hdd.png (21.25 KiB) Viewed 29535 times
Last edited by BSOD2600 on Sat Feb 25, 2006 1:14 pm, edited 1 time in total.
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
-
- Posts: 6
- Joined: Sat Mar 12, 2005 11:14 pm
Sure http://smartmontools.sourceforge.net/
I could've written the script around this programs output, but it's commandline based and not as friendly as something GUI driven.
I could've written the script around this programs output, but it's commandline based and not as friendly as something GUI driven.
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
I would think commandline tools are more friendly to scripting than GUI tools.BSOD2600 wrote:Sure http://smartmontools.sourceforge.net/
I could've written the script around this programs output, but it's commandline based and not as friendly as something GUI driven.
Possibly. I still prefer to look at a GUI for the SMART values (and the various other things HDD Health shows) instead of Cacti or the raw text output in the command line.
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Onkel_Tom: That would require a compleatly different script. Since I'm not a linux user, this is not a priority for me.
sumsum: Why do you need seperate scripts? I added most of the common SMART values found in several brands of hard drives I have at my house. Heck, the available values still differ from model to model from the same company.
If you want to add more unique SMART values HDD Health reports, it's fairly easy. What are the other values you want to monitor that it currently does not?
sumsum: Why do you need seperate scripts? I added most of the common SMART values found in several brands of hard drives I have at my house. Heck, the available values still differ from model to model from the same company.
If you want to add more unique SMART values HDD Health reports, it's fairly easy. What are the other values you want to monitor that it currently does not?
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Having trouble importing the templates for some reason I am getting unmet dependancies...
Cacti has imported the following items:
Round Robin Archive
[success] Daily (5 Minute Average) [update]
[success] Weekly (30 Minute Average) [update]
[success] Monthly (2 Hour Average) [update]
[success] Yearly (1 Day Average) [update]
GPRINT Preset
[success] Normal [update]
Data Input Method
[success] Win32 - HDD Health (local) [update]
Data Template
[success] Win32 - HDD Health (local) [update]
+ Found Dependency: (Data Input Method) Win32 - HDD Health (local)
+ Found Dependency: (Data Input Field) RawReadErrorRate
+ Found Dependency: (Data Input Field) StartStopCount
+ Found Dependency: (Data Input Field) SpinUpTime
+ Found Dependency: (Data Input Field) ReallocatedSectorCount
+ Found Dependency: (Data Input Field) SeekErrorRate
+ Found Dependency: (Data Input Field) PowerOnHoursCount
+ Found Dependency: (Data Input Field) SpinRetryCount
+ Found Dependency: (Data Input Field) CalibrationRetryCount
+ Found Dependency: (Data Input Field) PowerCycleCount
+ Found Dependency: (Data Input Field) Temperature
+ Found Dependency: (Data Input Field) ReallocationEventCount
+ Found Dependency: (Data Input Field) CurrentPendingSectorCoun
+ Found Dependency: (Data Input Field) Off-lineScanUncorrectable
+ Found Dependency: (Data Input Field) UltraATACRCErrorCount
+ Found Dependency: (Data Input Field) WriteErrorRate
+ Found Dependency: (Data Input Field) ReadChannelMargin
+ Found Dependency: (Data Input Field) SeekTimePerformance
+ Found Dependency: (Data Input Field) PoweroffRetractCount
+ Unmet Dependency: (Data Input Field)
+ Found Dependency: (Data Input Field) TACounterDetected
+ Found Dependency: (Data Input Field) TACounterIncreased
+ Found Dependency: (Data Input Field) HardwareECCrecovered
+ Found Dependency: (Data Input Field) HDD Data File
+ Found Dependency: (Data Input Field) HDD Report File
Graph Template
[success] Win32 - HDD Health [update]
Cacti has imported the following items:
Round Robin Archive
[success] Daily (5 Minute Average) [update]
[success] Weekly (30 Minute Average) [update]
[success] Monthly (2 Hour Average) [update]
[success] Yearly (1 Day Average) [update]
Data Input Method
[success] Win32 - HDD Health (local) [update]
Data Template
[success] Win32 - HDD Health (local) [update]
+ Found Dependency: (Data Input Method) Win32 - HDD Health (local)
+ Found Dependency: (Data Input Field) RawReadErrorRate
+ Found Dependency: (Data Input Field) StartStopCount
+ Found Dependency: (Data Input Field) SpinUpTime
+ Found Dependency: (Data Input Field) ReallocatedSectorCount
+ Found Dependency: (Data Input Field) SeekErrorRate
+ Found Dependency: (Data Input Field) PowerOnHoursCount
+ Found Dependency: (Data Input Field) SpinRetryCount
+ Found Dependency: (Data Input Field) CalibrationRetryCount
+ Found Dependency: (Data Input Field) PowerCycleCount
+ Found Dependency: (Data Input Field) Temperature
+ Found Dependency: (Data Input Field) ReallocationEventCount
+ Found Dependency: (Data Input Field) CurrentPendingSectorCoun
+ Found Dependency: (Data Input Field) Off-lineScanUncorrectable
+ Found Dependency: (Data Input Field) UltraATACRCErrorCount
+ Found Dependency: (Data Input Field) WriteErrorRate
+ Found Dependency: (Data Input Field) ReadChannelMargin
+ Found Dependency: (Data Input Field) SeekTimePerformance
+ Found Dependency: (Data Input Field) PoweroffRetractCount
+ Unmet Dependency: (Data Input Field)
+ Found Dependency: (Data Input Field) TACounterDetected
+ Found Dependency: (Data Input Field) TACounterIncreased
+ Found Dependency: (Data Input Field) HardwareECCrecovered
+ Found Dependency: (Data Input Field) HDD Data File
+ Found Dependency: (Data Input Field) HDD Report File
How could I be screwing the import up... it seems pretty easy from your readme.Cacti has imported the following items:
Round Robin Archive
[success] Daily (5 Minute Average) [update]
[success] Weekly (30 Minute Average) [update]
[success] Monthly (2 Hour Average) [update]
[success] Yearly (1 Day Average) [update]
Data Input Method
[success] Win32 - HDD Health (remote) [update]
Data Template
[success] Win32 - HDD Health (remote) [update]
+ Found Dependency: (Data Input Method) Win32 - HDD Health (remote)
+ Unmet Dependency: (Data Input Field)
+ Unmet Dependency: (Data Input Field) PoweroffRetractCount
+ Unmet Dependency: (Data Input Field) SeekTimePerformance
+ Unmet Dependency: (Data Input Field) ReadChannelMargin
+ Unmet Dependency: (Data Input Field) WriteErrorRate
+ Unmet Dependency: (Data Input Field) UltraATACRCErrorCount
+ Unmet Dependency: (Data Input Field) Off-lineScanUncorrectable
+ Unmet Dependency: (Data Input Field) CurrentPendingSectorCoun
+ Unmet Dependency: (Data Input Field) ReallocationEventCount
+ Unmet Dependency: (Data Input Field) Temperature
+ Unmet Dependency: (Data Input Field) PowerCycleCount
+ Found Dependency: (Data Input Field) CalibrationRetryCount
+ Unmet Dependency: (Data Input Field) SpinRetryCount
+ Unmet Dependency: (Data Input Field) PowerOnHoursCount
+ Unmet Dependency: (Data Input Field) SeekErrorRate
+ Unmet Dependency: (Data Input Field) ReallocatedSectorCount
+ Unmet Dependency: (Data Input Field) StartStopCount
+ Unmet Dependency: (Data Input Field) SpinUpTime
+ Unmet Dependency: (Data Input Field) RawReadErrorRate
+ Unmet Dependency: (Data Input Field) TACounterDetected
+ Unmet Dependency: (Data Input Field) TACounterIncreased
+ Unmet Dependency: (Data Input Field) HardwareECCrecovered
+ Found Dependency: (Data Input Field) HDD Data File (*.hdd)
+ Found Dependency: (Data Input Field) HDD Report File (*.txt)
+ Found Dependency: (Data Input Field) Remote Computer
[size=75]Cacti - 0.8.6h + patches
PHP - 5.1.2
ZendOptimizer - 2.6.2
FastCGI - 0.6
MySQL - 4.1.15
Cactid - 0.8.6g
rrdtool - 1.2.x
IIS6[/size]
PHP - 5.1.2
ZendOptimizer - 2.6.2
FastCGI - 0.6
MySQL - 4.1.15
Cactid - 0.8.6g
rrdtool - 1.2.x
IIS6[/size]
Looks like you already had the templates imported previously? Try deleting them (data template, graph template and data input methods) and try again. It wouldn't hurt to update your cacti version too to 0.8.6h + patches.
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Upgraded to 0.8.6h +patches...
Deleted and re-imported but the same errors appear. The templates also create the data import methods that you specify in your readme. So those steps are not needed any longer?
Deleted and re-imported but the same errors appear. The templates also create the data import methods that you specify in your readme. So those steps are not needed any longer?
[size=75]Cacti - 0.8.6h + patches
PHP - 5.1.2
ZendOptimizer - 2.6.2
FastCGI - 0.6
MySQL - 4.1.15
Cactid - 0.8.6g
rrdtool - 1.2.x
IIS6[/size]
PHP - 5.1.2
ZendOptimizer - 2.6.2
FastCGI - 0.6
MySQL - 4.1.15
Cactid - 0.8.6g
rrdtool - 1.2.x
IIS6[/size]
Correct, they are not needed.
Not sure why that single Data Input Field in failing though. When you look at the Date template, are all the fields which appear in the sample graph present?
Not sure why that single Data Input Field in failing though. When you look at the Date template, are all the fields which appear in the sample graph present?
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Yeah. Everything looks ok (keeping in mind my limited knowledge of creating templates) once I have imported all the templates but just wondering why the errors even appear.
[size=75]Cacti - 0.8.6h + patches
PHP - 5.1.2
ZendOptimizer - 2.6.2
FastCGI - 0.6
MySQL - 4.1.15
Cactid - 0.8.6g
rrdtool - 1.2.x
IIS6[/size]
PHP - 5.1.2
ZendOptimizer - 2.6.2
FastCGI - 0.6
MySQL - 4.1.15
Cactid - 0.8.6g
rrdtool - 1.2.x
IIS6[/size]
Possibly a cacti 0.8.6g or h bug? Not sure since I created this script/template almost a year ago.
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Who is online
Users browsing this forum: No registered users and 1 guest