[ZBX-20114] Smart plugin in zabbix agent 2 not working (Windows) Created: 2021 Oct 22 Updated: 2024 Apr 10 Resolved: 2022 Nov 21 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Agent2 plugin (G) |
Affects Version/s: | 5.0.22, 5.4.6 |
Fix Version/s: | None |
Type: | Incident report | Priority: | Trivial |
Reporter: | Василий Никитченко | Assignee: | Eriks Sneiders |
Resolution: | Fixed | Votes: | 6 |
Labels: | None | ||
Σ Remaining Estimate: | Not Specified | Remaining Estimate: | Not Specified |
Σ Time Spent: | Not Specified | Time Spent: | Not Specified |
Σ Original Estimate: | Not Specified | Original Estimate: | Not Specified |
Environment: |
Host: Windows 10 or Windows Server 2019. Smartmontools 7.2. Zabbix agent 2 5.2.7 or 5.4.3. |
Attachments: |
![]() ![]() ![]() ![]() ![]() |
||||||||||
Sub-Tasks: |
|
||||||||||
Team: |
Description |
Steps to reproduce:
Result:
Expected: |
Comments |
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 the issues. As for the side problem, the error `Smartctl failed to get device data: unknown error from smartctl.`. Is returned when smartctl returns exit status 2, but does not return a message. Would it be possible to run `smartctl -a /dev/sda -j` from terminal and share the json, it would help me to reproduce the issue.
Edit: The executable path should also be in quotes, example: `"<path/to/executable.exe>"` |
Comment by Pablo [ 2022 Feb 13 ] |
Similar problem here: When execute: zabbix_agent2 -t smart.disk.get Result is OK:
but when execute zabbix_get.exe -s 127.0.0.1 -k smart.disk.get returns error: ZBX_NOTSUPPORTED: Failed to scan for devices: Cannot unmarshal JSON: invalid character '\'' looking for beginning of value..
----------------- Exe Versions: zabbix_agent2: 5.4.10 zabbix_get: 5.4.10 smartctl: 7.1
--------------------
|
Comment by Василий Никитченко [ 2022 Feb 14 ] |
I haven't used plugins.smart.path before - no mentions of this field in the description of a smart template. I tested it with full path (including binary) - it works. But template description should be changed. Result of the requested command: smartctl.exe" -a /dev/sda -j , , , , , } |