In a previous post I already provided a way to add the SMART temperature attributes to Observium, this time we’re going to add the other attributes. We’ll focus on attributes that are worth monitoring,
- Raw_Read_Error_Rate (1)
- Seek_Error_Rate (7)
- Hardware_ECC_Recovered (195)
However, all attributes can be used via the patch below.
First, we’ll need to setup Observium’s Unix-Agent script. Install xinetd on the server you want to monitor. Then, copy the following files to the destination locations on the server,
- scripts/observium_agent to /usr/bin/observium_agent
- scripts/observium_agent_xinetd to /etc/xinetd.d/observium_agent_xinetd (don’t forget to add the IP address of the Observium server to the ACL only_from)
- scripts/agent-local/* to /usr/lib/observium_agent/plugins
- updated Pitt-Pladdy smartctl perl script to /usr/lib/observium_agent/plugins/smart
You will need to activate the Unix-Agent under the device’s settings (in the modules tab), if you have not enabled Unix-Agent globally.
Now the graphing part, download this patch file, and in your Observium root path issue the following command,
observium$ patch -p0 < observium-smart-0.1.patch
WARNING: this changes an Observium file, html/pages/device/apps.inc.php. So, when updating Observium via SVN (or otherwise), this can generate conflicts.
Although the change is minor, be warned 🙂
Some options you can (and should) change,
- in the smart plugin file (on the client), line 25 : the smartctl parameters (and devices)
- smart plugin file, line 26 : the SMART attribute ids you want to graph. This depends on the disk device used, but all IDs from Wikipedia are available for graphing
- you can change the color of the graphs in includes/graphs/application/smart.inc.php, line 9, at the end.
- by default, all SMART attribute ids will be shown in Observium, even if you didn’t add them to the smart plugin file. To let the script know which have been added, you can
- 1) remove the code lines from html/pages/device/apps/smart.inc.php
- 2) install rrd_info via pecl: pecl install rrd this will automate it
- Change RRD storage type (default: GAUGE) in includes/polling/applications/smart.inc.php, line 18. More information is available on the RRD site.
Now the SMART attribute information is available within Observium via the ‘Applications’ tab. However, this is not compatible with the alerting system, since the values are only stored in RRD files, and not in the Observium database.
Example implementation with 3 SMART attributes,