IBM / spectrum-protect-sppmon

Monitoring and long-term reporting for IBM Spectrum Protect Plus. Provides a data bridge from SPP to InfluxDB and provides visualization dashboards via Grafana.
Apache License 2.0
13 stars 8 forks source link

BUG: SPPCheck not working using docker (sppcheck_fixes branch) #123

Open NielsKorschinsky opened 1 year ago

NielsKorschinsky commented 1 year ago

Describe the bug

For now, the panel downloading functionality of SPPCheck does not work in a containerized environment. First, the connection to the Grafana container was of issue, but now it seems like the SSL-Connection itself is of fault:

First error:

> Testing connection to Grafana
Exception in FILE: grafana_panel_downloader.py, Line: 112, Exception: <class 'requests.exceptions.ConnectionError'>
Exception Message: HTTPSConnectionPool(host='xxx.xxx.xxx.xxx', port=3000): Max retries exceeded with url: /api/org (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f85298e6470>: Failed to establish a new connection: [Errno 113] No route to host'))
Exception in FILE: sppcheck.py, Line: 399, Exception: <class 'ValueError'>
Exception Message: Failed to connect to Grafana, please check the configs
ERROR: CRITICAL: Top-level-error when creating PDF report
Finished all argument executions, starting to exit the program.
Storing script metrics
Stored script metrics successfully

second error, after using --link grafana:grafana and grafana as srv_address within the config file:

> Testing connection to Grafana
Exception in FILE: grafana_panel_downloader.py, Line: 112, Exception: <class 'requests.exceptions.SSLError'>
Exception Message: HTTPSConnectionPool(host='grafana', port=3000): Max retries exceeded with url: /api/org (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:997)'))

To Reproduce Steps to reproduce the behavior:

  1. Use a unverified SSL Connection to Grafana
  2. Execute SPPCheck in a contanierized environment
  3. Execute the excel and prediction functionality
  4. Afterwards, execute the --pdfReport functionality

System information (please complete the following information):

Additional context

SPPMon:

Also, while doing fixing this, it should be researched whether the config file needs the influxDB srv address set to influx and if not, why so. See following wiki pages in the context of changing the config files according to the link between the docker containers.