Installationsproblem with Prometheus_client installed with solaris_exporter

41 views
Skip to first unread message

Stefan Witt

unread,
Jun 25, 2024, 5:50:43 AM (12 days ago) Jun 25
to Prometheus Users
Hi,

since the installation of the  prometheus_client 
prometheus_client-0.20.0.tar.gz needed for the  Solaris_exporter under Sparc Solaris 11.64 I allways got the following error while try to start  prometheus_client SMF Service :

ModuleNotFoundError: No module named 'prometheus_client.core'

Anybody out there who could help me to solve this problem? 

$ sudo pip-3.9 install prometheus_client-0.20.0.tar.gz
Processing ./prometheus_client-0.20.0.tar.gz
  Preparing metadata (setup.py) ... done
Installing collected packages: prometheus-client
  DEPRECATION: prometheus-client is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for prometheus-client ... done
Successfully installed prometheus-client-0.20.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
$

  File "/lib/svc/manifest/site/solaris_exporter-master/solaris_exporter.py", line 133, in <module>
    from prometheus_client.core import REGISTRY, Counter, Gauge, GaugeMetricFamily, CounterMetricFamily, UntypedMetricFamily
ModuleNotFoundError: No module named 'prometheus_client.core'
[ 2024 Jun 24 10:15:33 Stopping because all processes in service exited. ]
[ 2024 Jun 24 10:15:33 Executing start method ("/usr/bin/python2.7 /lib/svc/manifest/site/solaris_exporter-master/solaris_exporter.py"). ]
[ 2024 Jun 24 10:15:33 Environment variable "LC_ALL=" already set. ]
~$

Cheers

Stefan

Bjoern Rabenstein

unread,
Jun 26, 2024, 11:20:30 AM (11 days ago) Jun 26
to Stefan Witt, Prometheus Users
This is about prometheus/client_python, which wasn't obvious from the
subject. I changed the subject so that the right people have a chance
to discover this.

I'm not an expert when it comes to pip, but it looks weird to me that
you are trying to run the install command with a tar file as the
parameter. https://github.com/prometheus/client_python asks you to run
`pip install prometheus-client`, which should also take care of
dependencies.
> --
> You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/bb74dc9f-d257-431c-b50d-dbbd43c17483n%40googlegroups.com.


--
Björn Rabenstein
[PGP-ID] 0x851C3DA17D748D03
[email] bjo...@rabenste.in

Stefan Witt

unread,
Jun 27, 2024, 3:46:29 AM (10 days ago) Jun 27
to Prometheus Users
Yes you are right, but in our network enviroment its unpossible to have/get Internet access,  thats why im using pip install prometheus_client-0.20.0.tar.gz ( from local file source).

Stefan Witt

Stefan Witt

unread,
Jun 28, 2024, 6:47:49 AM (9 days ago) Jun 28
to Prometheus Users
In the meanwhile I tried to run the installation Instruction from https://github.com/n27051538/solaris_exporter/blob/master/README.md  step by step
 in a  internet-connected x86 Solaris 11.4 SRU 42 enviroment.

~$ uname -a
SunOS Solaris11.4pro 5.11 11.4.42.111.0 i86pc i386 i86pc virtualbox
~$
But the result of running the last step './solaris_exporter_smf.sh install' was not possitiv! 
 
~/solaris_exporter-2022May04$ pip show prometheus_client
Name: prometheus-client
Version: 0.17.1
Summary: Python client for the Prometheus monitoring system.
Author: Brian Brazil
Author-email: 
License: Apache Software License 2.0
Location: /export/home/foemgqv/.local/lib/python3.7/site-packages
Requires:
Required-by:
~/solaris_exporter-2022May04$ sudo ./solaris_exporter_smf.sh install
./solaris_exporter_smf.sh Script for adding solaris_exporter.py to Solaris SMF as prometheus/solaris_exporter
     r    Removing "Prometheus::solaris:cmd:::/usr/sbin/fmadm:uid=0" from  /etc/security/exec_attr
     r    Removing "Prometheus::solaris:cmd:::/usr/sbin/nvmeadm:uid=0" from  /etc/security/exec_attr
     r    Removing "Prometheus::solaris:cmd:::/usr/sbin/raidctl:uid=0" from  /etc/security/exec_attr
     r    Removing "Prometheus::solaris:cmd:::/usr/sbin/zlogin:uid=0" from  /etc/security/exec_attr
     r    Removing "Prometheus:::User could run some monitoring commands" from /etc/security/prof_attr
     r    Current profiles of monitor user is:
SMF prometheus/solaris_exporter removed
Installing solaris_exporter.py as SMF prometheus/solaris_exporter
    i
[ 2024 Jun 28 12:43:43 Stopping because all processes in service exited. ]
[ 2024 Jun 28 12:43:43 Executing start method ("/usr/bin/python2.7 /export/home/foemgqv/solaris_exporter-2022May04/solaris_exporter.py"). ]
[ 2024 Jun 28 12:43:43 Environment variable "LC_ALL=" already set. ]
Traceback (most recent call last):
  File "/export/home/foemgqv/solaris_exporter-2022May04/solaris_exporter.py", line 133, in <module>
    from prometheus_client.core import REGISTRY, Counter, Gauge, GaugeMetricFamily, CounterMetricFamily, UntypedMetricFamily
ModuleNotFoundError: No module named 'prometheus_client'
online         12:43:43          svc:/prometheus/solaris_exporter:default
~/solaris_exporter-2022May04$

Hope someone could give me helpfull feedback to solve this issue?

Cheers

Stefan
Reply all
Reply to author
Forward
0 new messages