matoH12 / checkmk-nextcloud

checkmk plugin for nextcloud.
6 stars 0 forks source link

KeyError: 'permissions_3_17' #1

Closed mib1185 closed 2 years ago

mib1185 commented 2 years ago

Hi @matoH12

first, thanks for this agent 👍 But unfortunately I have to report a bug in version 1.2 (used on CheckMK 2.0.0p23 (CFE))

Agent exited with code 1: Traceback (most recent call last):
File "/omd/sites/KrosseKrabbe/local/share/check_mk/agents/special/agent_nextcloud_data", line 162, in <module>
print("permissions_3_17;%s" % data['ocs']['data']['nextcloud']['shares']['permissions_3_17'])
KeyError: 'permissions_3_17'

here my info.json.txt There is just no permissions_3_17 key present - but not sure, if it should or only could be?

as a workaround, I have simply commented out line 162

matoH12 commented 2 years ago

Hi thanks for report bug. Im using nextcloud on plesk hosting and this instatnce have variable permission_3_17... In new version of agent nextcloud-1.2.1.mkp im try fix this problem. If variable is not exist the agent dosnt crash... Can you try this verzion ?

Have a nice day

mib1185 commented 2 years ago

Hi @matoH12 I've tested version 1.2.1 and can confirm, that this issue is fixed. thx for fast solution 👍

mib1185 commented 2 years ago

Just another question - do you also plan to publish the source code?

matoH12 commented 2 years ago

Hi @mib1185 now i'm pushd source code to repository

mib1185 commented 2 years ago

many thanks @matoH12 🙂 I guess this issue can be closed now 👍