[ZBX-19748] SMART by Zabbix agent 2 LLD failed Created: 2021 Jul 29 Updated: 2024 Apr 10 Resolved: 2022 Oct 21 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Agent2 plugin (G), Templates (T) |
Affects Version/s: | 5.4.2, 5.4.3 |
Fix Version/s: | None |
Type: | Problem report | Priority: | Minor |
Reporter: | Alex | Assignee: | Eriks Sneiders |
Resolution: | Fixed | Votes: | 7 |
Labels: | Windows | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Attachments: |
![]() ![]() ![]() ![]() ![]() ![]() |
Team: |
Description |
Zabbix 5.4.2 Default template "SMART by Zabbix agent 2: SMART: Get attributes" & "SMART by Zabbix agent active 2: SMART: Get attributes" LLD failed with error(win2019 & win10): |
Comments |
Comment by Aleksey Volodin [ 2021 Jul 29 ] |
Post on forum related this problem - https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/415662-discussion-thread-for-official-zabbix-smart-disk-monitoring?p=428551#post428551 |
Comment by Aleksey Volodin [ 2021 Jul 29 ] |
Windows Agent 2: c:\Program Files\Zabbix Agent 2>zabbix_agent2.exe -t smart.disk.discovery smart.disk.discovery [s|[{"{#NAME}":"sdc","{#DISKTYPE}":"NVME","{#MODEL}":"Samsung SSD 980 250GB","{#SN}":"S64BNJ0R220198Z"},{"{#NAME}":"sda","{#DISKTYPE}":"SSD","{#MODEL}":"WDC WD10JPVX-22JC3T0","{#SN}":"WD-WX71AA314833"},{"{#NAME}":"sdb","{#DISKTYPE}":"SSD","{#MODEL}":"Patriot Burst","{#SN}":"F90B0796110400318558"}]] Windows smartctl version c:\Program Files\smartmontools\bin>smartctl.exe -v smartctl 7.2 2020-12-30 r5155 [x86_64-w64-mingw32-w10-b19043] (sf-7.2-1) Test from Server: [root@zabbix54 ~]# zabbix_get -s 192.168.100.15 -k smart.disk.discovery ZBX_NOTSUPPORTED: Failed to scan for devices: Cannot unmarshal JSON: invalid character '\'' looking for beginning of value.. |
Comment by Mikhail P [ 2021 Sep 05 ] |
Аналогичная ситуация. После обнаружения проблемы с версией smartmontools 7.2 пробовал проверить в старой версии 7.1, но безуспешно. |
Comment by Ilya S [ 2021 Oct 15 ] |
Такая же проблема. Из командной строки вывод такой же: root@z01:/home/soft# zabbix_get -s 10.0.0.189 -k smart.attribute.discovery ZBX_NOTSUPPORTED: Failed to scan for devices: Cannot unmarshal JSON: invalid character '\u00ad' after top-level value.. Хотя smartctl.exe --scan-open на машине Windows 10 выводит информацию о дисках: /dev/sda -d ata # /dev/sda, ATA device /dev/sdb -d ata # /dev/sdb, ATA device При этом вывод из cmd: В какую сторону смотреть? Уже перебрал все варианты. Служба запускается от учётной записи системы, путь до smartctl.exe прописан в переменной PATH. Версия smartmontools 7.2
|
Comment by Viktor [ 2021 Dec 10 ] |
Zabbix 5.0.18 + zabbix-agent2 5.0.18 |
Comment by Eriks Sneiders [ 2022 Feb 09 ] |
When executing smart.disk.* or smart.attribute.* do you configure the `Plugins.Smart.Path=` config field? And if so is it a path to the executable ? Or does it also include the executable file in it. It must include the executable in it. So that might be the cause of some of the issues. |
Comment by Ilya S [ 2022 Feb 15 ] |
Спасибо! Получилось! Заработало! Может кому-то поможет, решение моей проблемы:
3. Перезапустил службу Zabbix Agent 2 4. Отвязал и привязал заново шаблон SMART by Zabbix agent active 2 (у меня активный агент) 5. Для теста изменил время обнаружения дисков на 10s в правилах обнаружения и бинго, данные появились! Я так долго бился с этим, уже не знал что делать, причём я раньше пробовал прописывать путь, но я прописывал путь до папки с файлом, но не к самому файлу. Спасибо огромное за помощь! UPD: Windows 11, Zabbix Server 5.4.10, Zabbix Agent 2 5.4.8, smartmontools 7.2.1 |
Comment by Eriks Sneiders [ 2022 Mar 28 ] |
Good day Dictonary ! Would it be possible to get some more information?
|
Comment by Eriks Sneiders [ 2022 May 25 ] |
Hi, all! Dictonary if You or any one else is still having issues with SMART. I'd like to mention a couple of things.
So please if the issue still persists, please enable the Trace log option, execute the key again. And if possible please provide the Trace log file. |
Comment by Lazy Zeroed [ 2022 May 30 ] |
I've stated zabbix agent with debug level=5 and received following output: 2022/05/30 15:48:57.577912 [Smart] command sudo -n /usr/sbin/smartctl -j -V smartctl raw response: I found that user zabbix have no right to run smartctl I add to sudoerrs following line: zabbix ALL=NOPASSWD: /usr/sbin/smartctl This modification solved issue.
|