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

ilo 4 - AttributeError: 'module' object has no attribute 'hpilo_nic_status_gauge' #15

Open
neuroserve opened this issue Feb 18, 2021 · 3 comments

Comments

@neuroserve
Copy link

neuroserve commented Feb 18, 2021

Querying an HPE iLO4, I get this error:

`Traceback (most recent call last):
File "/usr/local/lib/python2.7/SocketServer.py", line 574, in process_request

self.finish_request(request, client_address)

File "/usr/local/lib/python2.7/SocketServer.py", line 334, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/local/lib/python2.7/SocketServer.py", line 655, in init
self.handle()
File "/usr/local/lib/python2.7/BaseHTTPServer.py", line 340, in handle
self.handle_one_request()
File "/usr/local/lib/python2.7/BaseHTTPServer.py", line 328, in handle_one_request
method()
File "/usr/src/hpilo_exporter/src/hpilo_exporter/exporter.py", line 129, in do_GET
prometheus_metrics.hpilo_nic_status_gauge.labels(product_name=product_name,
AttributeError: 'module' object has no attribute 'hpilo_nic_status_gauge'
Traceback (most recent call last):
File "/usr/local/lib/python2.7/SocketServer.py", line 574, in process_request

self.finish_request(request, client_address)

File "/usr/local/lib/python2.7/SocketServer.py", line 334, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/local/lib/python2.7/SocketServer.py", line 655, in init
self.handle()
File "/usr/local/lib/python2.7/BaseHTTPServer.py", line 340, in handle
self.handle_one_request()
File "/usr/local/lib/python2.7/BaseHTTPServer.py", line 328, in handle_one_request
method()
File "/usr/src/hpilo_exporter/src/hpilo_exporter/exporter.py", line 129, in do_GET
prometheus_metrics.hpilo_nic_status_gauge.labels(product_name=product_name,
AttributeError: 'module' object has no attribute 'hpilo_nic_status_gauge'`

Is this a known error with iLO4?

@neuroserve neuroserve changed the title ilo 4 - AttributeError: 'module' object has no attribute 'hpilo_nic_status_gauge' ilo 4 - AttributeError: module object has no attribute hpilo_nic_status_gauge Feb 18, 2021
@neuroserve neuroserve changed the title ilo 4 - AttributeError: module object has no attribute hpilo_nic_status_gauge ilo 4 - AttributeError: 'module' object has no attribute 'hpilo_nic_status_gauge' Feb 18, 2021
@saied-nawaz
Copy link

Hi sorry you are having issues, have you managed to resolve this?
Does issue #13 (ensuring you are using Python 2) help?

@nickthebeer
Copy link

Hi sorry you are having issues, have you managed to resolve this?
Does issue #13 (ensuring you are using Python 2) help?

I've got the same issue and I'm using python 2.7.5

@shqnayaz
Copy link

Hi @nickthebeer ,
have you managed to resolve this?,
what version of python it is dependent on ?

I get this error,
The Installation was successful though


# /bin/hpilo-exporter --address=10.163.108.73 --port=9416 --endpoint="/metrics"
Traceback (most recent call last):
  File "/bin/hpilo-exporter", line 9, in <module>
    load_entry_point('hpilo-exporter==0.4.5', 'console_scripts', 'hpilo-exporter')()
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 378, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2566, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2260, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/lib/python2.7/site-packages/hpilo_exporter/main.py", line 7, in <module>
    from hpilo_exporter.exporter import ILOExporterServer
  File "/usr/lib/python2.7/site-packages/hpilo_exporter/exporter.py", line 10, in <module>
    import prometheus_metrics
  File "/usr/lib/python2.7/site-packages/hpilo_exporter/prometheus_metrics.py", line 1, in <module>
    from prometheus_client import Gauge
  File "/usr/lib/python2.7/site-packages/prometheus_client/__init__.py", line 3, in <module>
    from . import (
  File "/usr/lib/python2.7/site-packages/prometheus_client/exposition.py", line 113
    def make_wsgi_app(registry: CollectorRegistry = REGISTRY, disable_compression: bool = False) -> Callable:
                              ^
SyntaxError: invalid syntax

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

4 participants