SnejPro / check_synology

Icinga2 script for Synology Diskstation
0 stars 3 forks source link

TypeError: __init__() got an unexpected keyword argument 'capture_output' #14

Closed sambase-cu closed 1 year ago

sambase-cu commented 1 year ago

Hey SnejPro,

just started testing your check-script ("freakin big thank you" for that director bucket!) and got an issue maybe you can help to get it running?

'/usr/lib/nagios/plugins/check_synology.py' '--storage_used_warn' '80' '-v' '2c' '-m' 'all' '-H' 'MY-NAS-IP' '-C' 'public' '--ups_load_warn' '80' '--ups_load_crit' '90' '--ups_level_warn' '25' '--ups_level_crit' '50' '--temp_warn' '70' '--temp_crit' '80' '--storage_used_crit' '90'  '--port' '161' '--net_warn' '90' '--net_crit' '95' '--memory_warn' '80' '--memory_crit' '90' '--disk_temp_warn' '60' '--disk_temp_crit' '70'

Traceback (most recent call last):
  File "/usr/lib/nagios/plugins/check_synology.py", line 467, in <module>
    res = snmpget(queue)
  File "/usr/lib/nagios/plugins/check_synology.py", line 219, in snmpget
    snmpres = proc_snmpget(oids)
  File "/usr/lib/nagios/plugins/check_synology.py", line 137, in proc_snmpget
    return proc(command, oids)
  File "/usr/lib/nagios/plugins/check_synology.py", line 117, in proc
    result=subprocess.run(command, capture_output=True).stdout.decode('UTF-8')
  File "/usr/lib/python3.6/subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
TypeError: __init__() got an unexpected keyword argument 'capture_output'

Greetings Chriss

SnejPro commented 1 year ago

Hi Chriss,

you need Python 3.7 or higher.

Greetings

Jens