nobody43 / zabbix-smartmontools

Disk SMART monitoring for Linux, FreeBSD and Windows. LLD, trapper.
The Unlicense
54 stars 19 forks source link

The solution can't handle large number of disks #49

Open nobody43 opened 1 year ago

seregasoft commented 8 months ago

Hi! Thank you for this tool. I use it on several servers, but one of then i have a problem. Perhaps it depends of this issue.

On this server installed about 100 drives.

# time sudo -u zabbix /etc/zabbix/scripts/smartctl-lld.py getverb "hostname"
  Python version:
 3.9.18 (main, Sep  7 2023, 00:00:00)
[GCC 11.4.1 20230605 (Red Hat 11.4.1-2)]

  Sender version:
 zabbix_sender (Zabbix) 6.0.23
Revision 315e9acac58 31 October 2023, compilation time: Oct 31 2023 00:00:00

Copyright (C) 2023 Zabbix SIA
License GPLv2+: GNU GPL version 2 or later <https://www.gnu.org/licenses/>.
This is free software: you are free to change and redistribute it according to
the license. There is NO WARRANTY, to the extent permitted by law.

This product includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit (http://www.openssl.org/).

Compiled with OpenSSL 3.0.7 1 Nov 2022
Running with OpenSSL 3.0.7 1 Nov 2022

  Config's main settings:
Server=zabbix
ServerActive=zabbix
Timeout=30

/etc/zabbix/scripts/smartctl-lld.py: Could not send anything. Argument list or filepath too long. (HUGEDATA)
  Please report any issues or missing features to:
https://github.com/nobody43/zabbix-smartmontools/issues

Traceback (most recent call last):
  File "/etc/zabbix/scripts/smartctl-lld.py", line 418, in <module>
    processData(senderData, jsonData, AGENT_CONF_PATH, SENDER_WRAPPER_PATH, SENDER_PATH, DELAY, HOST, link)
  File "/etc/zabbix/scripts/sender_wrapper.py", line 163, in processData
    subprocess.Popen(cmd, stdin=subprocess.PIPE, close_fds=(not isWindows()))
  File "/usr/lib64/python3.9/subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib64/python3.9/subprocess.py", line 1837, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 7] Argument list too long: '/bin/python3'

real    1m22.396s
user    0m2.449s
sys     0m1.019s
redchairman commented 8 months ago

您的邮件我已收到,谢谢合作!

nobody43 commented 7 months ago

Hello. Unfortunately there's not simple solution. I'll try to approach it, hopefully within a year, right now I'm really pressed for time.