wernerfred / check_synology

This plugin will check a lot of different values on your Synology DiskStation.
MIT License
17 stars 25 forks source link

Storage check throws 'NOSUCHINSTANCE' #45

Open ExeLeNtCrypt opened 2 years ago

ExeLeNtCrypt commented 2 years ago

Hello, First, thank you for this great check script. I am using it on the models DS918+ and DS920+.

The storage check did not work for me and gave me following error: File "./check_synology", line 202, in <module> storage_size = int((int(allocation_units) * int(size)) / 1000000000) ValueError: invalid literal for int() with base 10: 'NOSUCHINSTANCE'

this is because we get an invalid or more over-useless value for oid in line 193.

i = item.oid.split('.')[-1]

So it simply needs to be changed to: i = item.oid_index.split('.')[-1]

I hope this can help somebody else.