[ZBX-20339] Zabbix Agent 2 - SMART plugin - Incorrect type of disk in LLD for unknown HDD Created: 2021 Dec 10 Updated: 2024 Apr 10 Resolved: 2022 Mar 30 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Agent2 plugin (G) |
Affects Version/s: | 5.0.18 |
Fix Version/s: | 5.0.21rc1, 5.4.11rc1, 6.0.1rc1, 6.2.0alpha1, 6.2 (plan) |
Type: | Problem report | Priority: | Major |
Reporter: | Maksim Strekalovskikh | Assignee: | Eriks Sneiders |
Resolution: | Fixed | Votes: | 0 |
Labels: | Agent2, SMART, plugins | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Production:
Zabbix Agent:
|
Attachments: |
![]() ![]() ![]() ![]() ![]() |
Team: | |
Sprint: | Sprint 84 (Jan 2022), Sprint 85 (Feb 2022), Sprint 86 (Mar 2022) |
Story Points: | 0.5 |
Description |
Hi. Have a problem with plugin SMART for Zabbix Agent 2. Zabbix in LLD key - "smart.disk.discovery", in LLD macro {#DISKTYPE} - instead of HDD, outputs SSD. In this case by default, the disc type is inserted into the application what will be misleading. Steps to reproduce:
Result: Wrong disk type (in attachments - smart.disk.discovery - problem.json) Expected: This disk should have been output as an HDD disk. This problem manifests itself in both Linux and Windows systems.
{{/usr/sbin/update-smart-drivedb - }}this command did not help. If you make a data request via Zabbix for JSON data, you can see that the disk is detected, but the "disk_type" is "unknown" (in attachments - smart.disk.get - problem.json). And there is no "rotation_rate" parameter in JSON. In the plugin code, it is this parameter that determines whether it is an HDD or SSD, and if this is an unknown type of disk, then SSD will always be detected, which I think is incorrect (in attachments - smart-zbx.png, https://github.com/zabbix/zabbix/blob/65f08dbeaf9b49c41026ec2e6aa3f2fe44a45685/src/go/plugins/smart/smart.go#L205) Checked on other machines where SSD is installed, there will always parameter "disk_type" will be SSD (in attachments - smart.disk.get - ok.json).
If it really is a problem, then I will gladly wait for a solution to the problem. If additional information is needed, I am ready to try to provide. |
Comments |
Comment by Edgar Akhmetshin [ 2021 Dec 13 ] |
Hello Maksim, Thank you for reporting the issue. Looks like detection of the ssd/hdd is incorrect, should be fixed. Confirmed. Regards, |
Comment by Maksim Strekalovskikh [ 2021 Dec 13 ] |
Hi, @edgar.akhmetshin Thank you for reviewing the ticket and confirming it. We will wait for the fix in the nearest version. |
Comment by Eriks Sneiders [ 2022 Jan 17 ] |
Hi, MaxSH97 I've implemented a fix, on a branch for this issue, although since we parse and return disk type based on smartmontools, if smartmontools returns unknown, it will be forwarded as unknown. I wanted to ask maybe you can run smartmontools on your machine and provide the raw json? If you wish you could use the branch to test your device and see if it resolved the issue, and you do not see a false disk type. Regards, |
Comment by Maksim Strekalovskikh [ 2022 Jan 18 ] |
Hi, @esneiders! Thank you for being taken to work this problem. About raw json from smartmontools. No problem, attached to the ticket - smartctl - problem.json I also managed to test the agent from your branch. Unfortunately on the problem disk, the type of disk continues to appear in LLD - SSD. If additional tests are needed or any additional information is needed, I will try to provide it. Regards, |
Comment by Eriks Sneiders [ 2022 Jan 18 ] |
Thank you, MaxSH97 for the JSON, it should be enough to further investigate the issue. No additional tests are needed at the moment. Regards, Eriks |
Comment by Eriks Sneiders [ 2022 Feb 04 ] |
Fixed in:
Documentation updated: |
Comment by Maksim Strekalovskikh [ 2023 Feb 13 ] |
Hi, @esneiders! I'm very sorry for the very late message. I would like to thank you very much for fixing this issue! Good luck to you! |