Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with running solaris exporter #4

Closed
cnekmp opened this issue Mar 1, 2021 · 2 comments
Closed

Issue with running solaris exporter #4

cnekmp opened this issue Mar 1, 2021 · 2 comments

Comments

@cnekmp
Copy link

cnekmp commented Mar 1, 2021

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
Copy link
Owner

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
Copy link
Author

cnekmp commented Mar 1, 2021

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

@cnekmp cnekmp closed this as completed Mar 1, 2021
n27051538 added a commit that referenced this issue Mar 1, 2021
n27051538 added a commit that referenced this issue Jan 24, 2022
jsonguard pushed a commit to jsonguard/solaris-exporter that referenced this issue Sep 28, 2022
jsonguard pushed a commit to jsonguard/solaris-exporter that referenced this issue Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants