Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Mon Apr 23, 2018 4:18 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 31 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: HDD Health (S.M.A.R.T.) monitoring script
PostPosted: Sun Feb 20, 2005 2:13 pm 
Offline
Cacti Moderator
User avatar

Joined: Sat May 08, 2004 12:44 pm
Posts: 12149
Location: USA
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.


Attachments:
File comment: script and needed templates.
hddhealth.zip [51.11 KiB]
Downloaded 1884 times
File comment: Sample graph
hdd.png
hdd.png [ 21.25 KiB | Viewed 27435 times ]

_________________

| 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 |


Last edited by BSOD2600 on Sat Feb 25, 2006 1:14 pm, edited 1 time in total.
Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 12, 2005 11:15 pm 
Offline

Joined: Sat Mar 12, 2005 11:14 pm
Posts: 6
Does something like this exist for Linux based systems?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 13, 2005 12:16 am 
Offline
Cacti Moderator
User avatar

Joined: Sat May 08, 2004 12:44 pm
Posts: 12149
Location: USA
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.

_________________

| 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 |


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 14, 2005 3:32 am 
Offline
Cacti User

Joined: Tue Jul 13, 2004 2:57 am
Posts: 56
Location: Norway
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.


I would think commandline tools are more friendly to scripting than GUI tools.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 14, 2005 3:42 am 
Offline
Cacti Moderator
User avatar

Joined: Sat May 08, 2004 12:44 pm
Posts: 12149
Location: USA
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 |


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 25, 2005 6:18 am 
Offline

Joined: Sat Apr 23, 2005 7:48 pm
Posts: 12
It would be very nice to have smartmontools under Linux also working with cacti. Does somebody work on that and also want to share?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 25, 2005 7:14 am 
Offline
Cacti User
User avatar

Joined: Mon Apr 26, 2004 7:18 am
Posts: 68
Location: Switzerland
I guess its not possible, having one script for all different Harddisk types.
each OEM has an different S.M.A.R.T output. which means, you need a individual script for ex. MAXTOR, IBM, HITACHI, SAMSUNG and so on.

tom

_________________
http://www.lounge-radio.com/


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 25, 2005 12:28 pm 
Offline
Cacti Moderator
User avatar

Joined: Sat May 08, 2004 12:44 pm
Posts: 12149
Location: USA
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?

_________________

| 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 |


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 25, 2005 12:41 pm 
Offline
Cacti User
User avatar

Joined: Mon Apr 26, 2004 7:18 am
Posts: 68
Location: Switzerland
BSOD2600 : sorry my fault i'm coming from the linux section ;) where I use smartmontools. it grabs all the information about the S.M.A.R.T Data, and those information differ from each OEM regarding the output report.

_________________
http://www.lounge-radio.com/


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 20, 2006 3:55 pm 
Offline
Cacti User

Joined: Tue Nov 15, 2005 12:14 pm
Posts: 156
Having trouble importing the templates for some reason I am getting unmet dependancies...

Quote:
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]


Quote:
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

Quote:
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


How could I be screwing the import up... it seems pretty easy from your readme. :(

_________________
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


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 20, 2006 4:18 pm 
Offline
Cacti Moderator
User avatar

Joined: Sat May 08, 2004 12:44 pm
Posts: 12149
Location: USA
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 |


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 20, 2006 5:34 pm 
Offline
Cacti User

Joined: Tue Nov 15, 2005 12:14 pm
Posts: 156
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?

_________________
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


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 20, 2006 6:16 pm 
Offline
Cacti Moderator
User avatar

Joined: Sat May 08, 2004 12:44 pm
Posts: 12149
Location: USA
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?

_________________

| 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 |


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 20, 2006 6:27 pm 
Offline
Cacti User

Joined: Tue Nov 15, 2005 12:14 pm
Posts: 156
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.

_________________
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


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 20, 2006 6:29 pm 
Offline
Cacti Moderator
User avatar

Joined: Sat May 08, 2004 12:44 pm
Posts: 12149
Location: USA
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 |


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 31 posts ]  Go to page 1, 2, 3  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: Google [Bot] and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group