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
check_unity.py issue
Re: check_unity.py issue
Hello,
I'm not familiar with that plugin, but it seems that you're encountering a permissions issue. Since you get a failed login issue if you change the password, that makes me think that the permissions on whatever file generates the page has permissions set that disallow the user to access it.
I'm not familiar with that plugin, but it seems that you're encountering a permissions issue. Since you get a failed login issue if you change the password, that makes me think that the permissions on whatever file generates the page has permissions set that disallow the user to access it.
Actively advancing awesome answers with ardent alliteration, aptly addressing all ambiguities. Amplify your acumen and avail our amicable assistance. Eagerly awaiting your astute assessments of our advice.