Starting with cagent 1.1.4 S.M.A.R.T monitoring of hard disk is supported. It's disabled by default and you must enable it manually. Cagent relies on the external tool
smartctl wich is part of the smartmontools. To use smart monitoring with cagent and cloudradar you must install the smartmontools manually before enabling it. Smartmontools version 7 are required. None of the Linux distributions provide it yet, but installing them manually is easy. See below.
Download the most recent version from here https://sourceforge.net/projects/smartmontools/files/smartmontools/7.0/
If you don't plan to use the smartmontools outside of cagent and the cloudradar monitoring, you can skip the installation of smartd and the documentation.
It's recommended to update the drive database after the installation.
cd C:\Program Files\smartmontools\bin>cd C:\Program Files\smartmontools\bin>update-smart-drivedb.exe
Now open the cagent configuration file
C:\Program Files\cagent\cagent.conf with an editor and change the existing lines to
C:\Program Files\cagent\cagent.conf# Enable S.M.A.R.T monitoring of hard diskssmart_monitoring = true# Path to a smartctl binary (smartctl.exe on windows) version >= 7# See https://docs.cloudradar.io/configuring-hosts/installing-agents/troubleshoot-s.m.a.r.t-monitoring# smartctl = "/usr/local/bin/smartctl"smartctl = "C:\\Program Files\\smartmontools\\bin\\smartctl.exe"
The included version of smartmontools 6.X is outdated and cagent cannot use it do enable SMART monitoring. You need at least smartmontools 7. RPMs for CentOS and RedHat are available but they are not included it any repository yet.
Download the latest version of smartmontools from the CentOS Community Build System or follow these instructions.
curl -L -O https://cbs.centos.org/kojifiles/packages/smartmontools/7.0/3.el7/x86_64/smartmontools-7.0-3.el7.x86_64.rpmrpm -U smartmontools-7.0-3.el7.x86_64.rpm
/sbin/smartctl and you can use it with cagent by adding the following lines to
/etc/cagent/cagent.conf# Enable S.M.A.R.T monitoring of hard diskssmart_monitoring = truesmartctl = "/sbin/smartctl"
Restart the agent with
systemctl restart cagent after any change to the config file.
Unfortunately even the most recent versions of Ubuntu and Debian don't ship smatmontools 7. Smartmontools 6.5 are not compatible with cagent.
The developers of the smartmontools provide up to date pre-compiled static binaries which can be installed easily.
curl -L -sS https://647-105252244-gh.circle-artifacts.com/0/builds/smartmontools-linux-x86_64-static-7.0-r4883.tar.gz|\tar xzfv - -C /update-smart-drivedb
You now have
smartctl installed under
/usr/local/sbin which does not interfere or conflict with a version you might have installed with the package manager.
Open the cagent config file
/etc/cagent/cagent.conf and change the already present lines for smart monitoring to
/etc/cagent/cagent.conf# Enable S.M.A.R.T monitoring of hard diskssmart_monitoring = true# Path to a smartctl binary (smartctl.exe on windows) version >= 7# See https://docs.cloudradar.io/configuring-hosts/installing-agents/troubleshoot-s.m.a.r.t-monitoringsmartctl = "/usr/local/sbin/smartctl"# smartctl = "C:\\Program Files\\smartmontools\\bin\\smartctl.exe"
A recent version is available via homebrew.
brew install smartmontools
curl -sS -L https://sourceforge.net/projects/smartmontools/files/smartmontools/7.0/smartmontools-7.0.tar.gz/download > smartmontools-7.0.tar.gztar xzf smartmontools-7.0.tar.gzyum install gcc-c++ make./configure --without-cxx11-optionln -s /usr/local/sbin/smartctl /usr/sbin/