Issue with running solaris exporter
cnekmp opened this issue · 2 comments
cnekmp commented
I've installed everything as described in readme. No issues found during packages installation. However when I try to run exporter, I get following error:
bash-3.2# /opt/csw/bin/python2.7 solaris_exporter.py
Traceback (most recent call last):
File "solaris_exporter.py", line 1039, in <module>
REGISTRY.register(c)
File "/opt/csw/lib/python2.7/site-packages/prometheus_client/registry.py", line 26, in register
names = self._get_names(collector)
File "/opt/csw/lib/python2.7/site-packages/prometheus_client/registry.py", line 66, in _get_names
for metric in desc_func():
File "solaris_exporter.py", line 440, in collect
swap = psutil.swap_memory()
File "/opt/csw/lib/python2.7/site-packages/psutil/__init__.py", line 1982, in swap_memory
return _psplatform.swap_memory()
File "/opt/csw/lib/python2.7/site-packages/psutil/_pssunos.py", line 158, in swap_memory
t, f = line[3:4]
ValueError: need more than 1 value to unpack
bash-3.2# cat /etc/release
Oracle Solaris 10 1/13 s10x_u11wos_24a X86
Copyright (c) 1983, 2013, Oracle and/or its affiliates. All rights reserved.
Assembled 17 January 2013
bash-3.2# uname -a
SunOS myhost.com 5.10 Generic_147148-26 i86pc i386 i86pc
n27051538 commented
Hello,
I think that something changed in psutil library in the lastest version. A year ago it worked.
Try to install an older version https://pypi.org/project/psutil/#history
pip install psutil==5.7.0
cnekmp commented
Thanks a lot. That solved the issue :)
bash-3.2# /opt/csw/bin/pip2.7 install psutil==5.7.0
Collecting psutil==5.7.0
Downloading https://files.pythonhosted.org/packages/c4/b8/3512f0e93e0db23a71d82485ba256071ebef99b227351f0f5540f744af41/psutil-5.7.0.tar.gz (449kB)
100% |################################| 450kB 1.0MB/s
Installing collected packages: psutil
Found existing installation: psutil 5.8.0
Uninstalling psutil-5.8.0:
Successfully uninstalled psutil-5.8.0
Running setup.py install for psutil ... done
Successfully installed psutil-5.7.0
bash-3.2# /opt/csw/bin/python2.7 solaris_exporter.py