Zabbix template for monitoring disk attributes
GNU General Public License v3.0
37
stars
14
forks
source link
Zabbix smartmonitor storage
Installing for windows
Requirements:
- OS: Windows 7, 2008R2 and later
- PowerShell: 5.1 and later
- Zabbix-agent: 4.0 and later
- Smartmontools: 7.1 and later
Get utils smartmontools
Check correct versions PowerShell: (Execute in PowerShell!) (Requirements!)
Get-Host|Select-Object Version
Copy powershell script:
- github/smartctl-storage-discovery.ps1 in C:\service\smartctl-storage-discovery.ps1
Check powershell script(Out json): (CMD!)
powershell -NoProfile -NoLogo -ExecutionPolicy Bypass -File "C:\service\smartctl-storage-discovery.ps1"
Add from zabbix_agentd.conf "UserParameter" in zabbix_agentd.conf:
- github/zabbix_agentd.conf
Import zabbix template:
- github/Template smartmonitor.xml
Installing for linux
Requirements:
- OS: Linux
- Zabbix-agent: 4.0 and later
- Smartmontools: 7.1 and later
Get utils smartmontools
Copy bash script:
- github/smartctl-storage-discovery.sh in /opt/zabbix/smartctl-storage-discovery.sh
Chmod and Chown
chmod -R 750 /opt/zabbix/
chown -R root:zabbix /opt/zabbix/
Check bash script(Out json):
/opt/zabbix/smartctl-storage-discovery.sh
Add from zabbix_agentd.conf "UserParameter" in zabbix_agentd.conf:
- github/zabbix_agentd.conf
Add in /etc/sudoers
- Defaults:zabbix !requiretty
- zabbix ALL=(root) NOPASSWD: /usr/sbin/smartctl
- zabbix ALL=(root) NOPASSWD: /opt/zabbix/smartctl-storage-discovery.sh
Import zabbix template:
- github/Template smartmonitor.xml
Installing for MacOS(In developing!!!)
Requirements:
- OS: MacOS
- Zabbix-agent: 4.0 and later
- Smartmontools: 7.1 and later
Get utils smartmontools
Copy bash script:
- github/smartctl-storage-discovery.sh in /usr/local/etc/zabbix/smartctl-storage-discovery.sh
Chmod and Chown
chmod 755 /usr/local/etc/zabbix/smartctl-storage-discovery.sh
Check bash script(Out json):
/usr/local/etc/zabbix/smartctl-storage-discovery.sh
Set UnsafeUserParameters=1
(In developing!!!)
Add from zabbix_agentd.conf "UserParameter" in zabbix_agentd.conf:
- github/zabbix_agentd.conf
Add in /etc/sudoers OR visudo
- Defaults:zabbix !requiretty
- zabbix ALL=(root) NOPASSWD: /usr/local/sbin/smartctl
- zabbix ALL=(root) NOPASSWD: /usr/local/etc/zabbix/smartctl-storage-discovery.sh
Import zabbix template:
- github/Template smartmonitor.xml
Examples images:
- Graph: Temperature smartmonitor
License