setup monitoring S.M.A.R.T disk proxmox 8 dengan zabbix_agent2

S.M.A.R.T disk adalah mekanisme pengecekan kesehatan disk di proxmox 8 debian 12 atau linux serve pada umum nya , di debian 12 sudah include package aplikasi smartmontools, kita hanya perlu membuat zabbix agent dapat mengeksekusi nya

  • Pastikan server zabbix sudah menggunakan zabbix 6.4 ke atas
  • Install zabbix_agent2
  • download dan update repo zabbix saya menggunakan zabbix 7

# wget https://repo.zabbix.com/zabbix/7.0/debian/pool/main/z/zabbix-release/zabbix-release_7.0-2+debian12_all.deb
# dpkg -i zabbix-release_7.0-2+debian12_all.deb
# apt update

bisa disable dulu zabbix_agent yang sbelum nya sudh terinstall kita akan menggunakan zabbix_agent2

root@cloud-sagalaherang:~# systemctl stop zabbix-agent.service 
root@cloud-sagalaherang:~# systemctl disable zabbix-agent.service 
Synchronizing state of zabbix-agent.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install disable zabbix-agent
Removed "/etc/systemd/system/multi-user.target.wants/zabbix-agent.service".
install zabbix_agent2 sudo dan smartmontools untuk memastikan

root@cloud-sagalaherang:~# apt install zabbix-agent2 sudo smartmontools
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
smartmontools is already the newest version (7.3-pve1).
The following packages were automatically installed and are no longer required:
  bsdmainutils libboost-coroutine1.74.0 libbpf0 libcbor0 libdns-export1110 libicu67 libisc-export1105 libleveldb1d libmpdec3 libopts25 libperl5.32
  libprocps8 libprotobuf23 libpython3.9 libpython3.9-minimal libpython3.9-stdlib libtiff5 liburing1 libwebp6 libzpool4linux perl-modules-5.32
  pve-kernel-5.13 pve-kernel-5.13.19-6-pve pve-kernel-5.15 pve-kernel-5.15.131-1-pve pve-kernel-5.15.83-1-pve pve-kernel-5.15.85-1-pve
  pve-kernel-5.4.128-1-pve python3-ldb python3-talloc python3.9 python3.9-minimal telnet
Use 'apt autoremove' to remove them.
The following NEW packages will be installed:
  sudo zabbix-agent2
The following packages will be upgraded:
  zabbix-agent
1 upgraded, 2 newly installed, 0 to remove and 66 not upgraded.
Need to get 8,220 kB of archives.
After this operation, 23.7 MB of additional disk space will be used.
Get:1 http://ftp.debian.org/debian bookworm/main amd64 sudo amd64 1.9.13p3-1+deb12u1 [1,889 kB]
Get:2 https://repo.zabbix.com/zabbix/7.0/debian bookworm/main amd64 zabbix-agent amd64 1:7.0.0-1+debian12 [731 kB]
Get:3 https://repo.zabbix.com/zabbix/7.0/debian bookworm/main amd64 zabbix-agent2 amd64 1:7.0.0-1+debian12 [5,600 kB]
Fetched 8,220 kB in 3s (2,600 kB/s)        
Reading changelogs... Done
Selecting previously unselected package sudo.
(Reading database ... 129610 files and directories currently installed.)
Preparing to unpack .../sudo_1.9.13p3-1+deb12u1_amd64.deb ...
Unpacking sudo (1.9.13p3-1+deb12u1) ...
Preparing to unpack .../zabbix-agent_1%3a7.0.0-1+debian12_amd64.deb ...
Unpacking zabbix-agent (1:7.0.0-1+debian12) over (1:6.0.14+dfsg-1+b1) ...
dpkg: warning: unable to delete old directory '/var/log/zabbix-agent': Directory not empty
Selecting previously unselected package zabbix-agent2.
Preparing to unpack .../zabbix-agent2_1%3a7.0.0-1+debian12_amd64.deb ...
Unpacking zabbix-agent2 (1:7.0.0-1+debian12) ...
Setting up sudo (1.9.13p3-1+deb12u1) ...
Setting up zabbix-agent2 (1:7.0.0-1+debian12) ...
Created symlink /etc/systemd/system/multi-user.target.wants/zabbix-agent2.service → /lib/systemd/system/zabbix-agent2.service.
Setting up zabbix-agent (1:7.0.0-1+debian12) ...
Installing new version of config file /etc/init.d/zabbix-agent ...
Installing new version of config file /etc/logrotate.d/zabbix-agent ...

Configuration file '/etc/zabbix/zabbix_agentd.conf'
 ==> File on system created by you or by a script.
 ==> File also in package provided by package maintainer.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** zabbix_agentd.conf (Y/I/N/O/D/Z) [default=N] ? 
Processing triggers for man-db (2.11.2-2) ...
Processing triggers for libc-bin (2.36-9+deb12u7) ...
root@cloud-sagalaherang:~# 

nano /etc/zabbix/zabbix_agent2.conf
masukan ip server zabbix atau network nya , save kemudian restart service zabbix_agent2 nya

root@cloud-sagalaherang:~# systemctl restart zabbix-agent2.service

edit sudoers untuk memberikan user zabbix meng eksekusi smartmontools

root@cloud-sagalaherang:~# sudo visudo
tambahkan zabbix ALL=(ALL) NOPASSWD:/usr/sbin/smartctl

save kemudian bisa restart service zabbix_agent2 nya

download template smart by zabbix agent2 ( https://www.zabbix.com/integrations/smart ) kemudian Import template tersebut ke zabbix

kemudian ke monitor -> host tambahkan template smart by zabbix agent2 ke host yang di monitor

tunggu beberapa saat , maka jika kita cek di latest data akan muncul item SMART disk untuk semua disk di host yang kita monitor

No Comments, Be The First!

Your email address will not be published.

Time limit is exhausted. Please reload CAPTCHA.