check_unity.py issue
Posted: Thu Sep 28, 2023 5:51 am
Hi,
I´m having an issue with check_unity.py.
Trying to monitor our new Unity U380 Box with that plugin.
/tmp/check_unity.py -H 172.16.0.60 -u admin -p ******* -m battery
get the following error:
Traceback (most recent call last):
File "/tmp/check_unity.py", line 572, in <module>
main()
File "/tmp/check_unity.py", line 526, in main
value, descid, desc = getBattery(hostaddress, token, cookie)
File "/tmp/check_unity.py", line 111, in getBattery
j = json.loads(r.text)
File "/usr/lib64/python3.6/json/__init__.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 11 column 1 (char 10)
printed out the requests of the getBattery Function
and there I get:
<div id="msg" class="errors">
<h2>401 Unauthorized</h2>
<p>You are not authorized to view this page.</p>
It looks like that the user is not able to fetch this info, but I did that with the Systemadmin of the box. The login is possible, because when I change the password I get an error regarding the login failure.
Someone here familiar with that plugin or has an idea whats the problem?
thanks tommy
I´m having an issue with check_unity.py.
Trying to monitor our new Unity U380 Box with that plugin.
/tmp/check_unity.py -H 172.16.0.60 -u admin -p ******* -m battery
get the following error:
Traceback (most recent call last):
File "/tmp/check_unity.py", line 572, in <module>
main()
File "/tmp/check_unity.py", line 526, in main
value, descid, desc = getBattery(hostaddress, token, cookie)
File "/tmp/check_unity.py", line 111, in getBattery
j = json.loads(r.text)
File "/usr/lib64/python3.6/json/__init__.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 11 column 1 (char 10)
printed out the requests of the getBattery Function
and there I get:
<div id="msg" class="errors">
<h2>401 Unauthorized</h2>
<p>You are not authorized to view this page.</p>
It looks like that the user is not able to fetch this info, but I did that with the Systemadmin of the box. The login is possible, because when I change the password I get an error regarding the login failure.
Someone here familiar with that plugin or has an idea whats the problem?
thanks tommy