Grafana bridge fails to start with Python3.8 - IBM/ibm-spectrum-scale-bridge-for-grafana GitHub Wiki

Grafana-bridge fails to start with error: name 'requests' not defined

# python3.8 zimonGrafanaIntf.py -c 10
2024-03-01 00:00 - MainThread           - INFO     -  *** IBM Storage Scale bridge for Grafana - Version: 7.1.2 ***
2024-03-01 00:00 - MainThread           - ERROR    - Failed to initialize connection to pmcollector: name 'requests' is not defined, quitting

This issue has been experienced on a RHEL8 system while running the Grafana bridge with Python 3.8. See #187 for more details.

Directions for the possible problem investigations

  1. Verify the Python and RHEL version on your system

    # python3.8
    Python 3.8.16 (default, Dec 21 2022, 10:58:32)
    [GCC 8.5.0 20210514 (Red Hat 8.5.0-17)] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>>
    
    
    # cat /etc/redhat-release
    Red Hat Enterprise Linux release 8.8 (Ootpa)
    
    
  2. Verify the Python packages are installed on your system

    
    # pip3.8 list
    Package             Version
    ------------------- ---------
    annotated-types     0.6.0
    autocommand         2.2.2
    cheroot             10.0.0
    CherryPy            18.9.0
    importlib-resources 6.1.2
    inflect             7.0.0
    jaraco.collections  5.0.0
    jaraco.context      4.3.0
    jaraco.functools    4.0.0
    jaraco.text         3.12.0
    more-itertools      10.2.0
    pip                 19.3.1
    portend             3.2.0
    pydantic            2.6.3
    pydantic-core       2.16.3
    pytz                2024.1
    setuptools          41.6.0
    tempora             5.5.1
    typing-extensions   4.10.0
    zc.lockfile         3.0.post1
    zipp                3.17.0
    
    

    If the package is not present, install it using the following command

    # pip3.8 install requests
    
  3. Verify after installing requests package the grafana-bridge starts properly

    Example output:

    # python3.8 zimonGrafanaIntf.py -c 10
    2024-03-01 00:02 - MainThread                     - INFO     -  *** IBM Storage Scale bridge for Grafana - Version: 7.1.2 ***
    2024-03-01 00:02 - MainThread                     - INFO     - Successfully retrieved MetaData
    2024-03-01 00:02 - MainThread                     - INFO     - Received sensors:CPU, DiskFree, GPFSBufMgr, GPFSFilesystem, 	GPFSFilesystemAPI, GPFSNSDDisk, GPFSNSDFS, GPFSNSDPool, GPFSNode, GPFSNodeAPI, GPFSRPCS, GPFSVFSX, GPFSWaiters, IPFIX, Load, 	, Netstat, Network, TopProc, CTDBDBStats, CTDBStats, SMBGlobalStats, SMBStats, GPFSFileset, GPFSPool
    2024-03-01 00:02 - MainThread                     - INFO     - Initial cherryPy server engine start have been invoked. Python 	version: 3.8.16 (default, Dec 21 2022, 10:58:32)
    [GCC 8.5.0 20210514 (Red Hat 8.5.0-17)], cherryPy version: 18.9.0.
    2024-03-01 00:02 - MainThread                     - INFO     - server started