ptarmiganlabs / butler-sos

Butler SenseOps Stats ("Butler-SOS") is a microservice publishing operational Qlik Sense metrics to InfluxDB, Prometheus and New Relic. Add Grafana for great looking dashboards and you get real-time monitoring of what happens inside a Qlik Sense environment.
https://butler-sos.ptarmiganlabs.com
MIT License
27 stars 13 forks source link

Non-helpful errors if New Relic features are turned on in config file, but there is no New Relic account defined #862

Closed mountaindude closed 2 months ago

mountaindude commented 2 months ago

What version of Butler SOS are you using?

10.1.1

What version of Node.js are you using? Not applicable if you use the standalone version of Butler SOS.

No response

What command did you use to start Butler SOS?

-

What operating system are you using?

-

What CPU architecture are you using?

-

What Qlik Sense versions are you using?

-

Describe the Bug

If the config section/array Butler-SOS.thirdPartyToolsCredentials.newRelic is empty while actual New Relic related features are enabled in the config file, there will be rather cryptic errors in the logs:

2024-08-20T07:56:30.102Z error: UPTIME NEW RELIC: Error sending uptime: TypeError: Cannot read properties of null (reading 'filter')
2024-08-20T07:56:44.531Z error: HEALTH METRICS NEW RELIC: Error sending proxy sessions: TypeError: Cannot read properties of null (reading 'filter')
2024-08-20T07:56:44.537Z error: HEALTH METRICS NEW RELIC: Error sending proxy sessions: TypeError: Cannot read properties of null (reading 'filter')
2024-08-20T07:56:45.105Z error: UPTIME NEW RELIC: Error sending uptime: TypeError: Cannot read properties of null (reading 'filter')
2024-08-20T07:56:54.536Z error: PROXY SESSIONS NEW RELIC: Error sending proxy sessions: TypeError: Cannot read properties of null (reading 'filter')
2024-08-20T07:56:54.540Z error: PROXY SESSIONS NEW RELIC: Error sending proxy sessions: TypeError: Cannot read properties of null (reading 'filter')
2024-08-20T07:57:00.107Z error: UPTIME NEW RELIC: Error sending uptime: TypeError: Cannot read properties of null (reading 'filter')
2024-08-20T07:57:04.522Z error: HEALTH METRICS NEW RELIC: Error sending proxy sessions: TypeError: Cannot read properties of null (reading 'filter')
2024-08-20T07:57:04.527Z error: HEALTH METRICS NEW RELIC: Error sending proxy sessions: TypeError: Cannot read properties of null (reading 'filter')
2024-08-20T07:57:15.109Z error: UPTIME NEW RELIC: Error sending uptime: TypeError: Cannot read properties of null (reading 'filter')
2024-08-20T07:57:24.538Z error: HEALTH METRICS NEW RELIC: Error sending proxy sessions: TypeError: Cannot read properties of null (reading 'filter')
2024-08-20T07:57:24.542Z error: HEALTH METRICS NEW RELIC: Error sending proxy sessions: TypeError: Cannot read properties of null (reading 'filter')
2024-08-20T07:57:24.548Z error: PROXY SESSIONS NEW RELIC: Error sending proxy sessions: TypeError: Cannot read properties of null (reading 'filter')
2024-08-20T07:57:24.549Z error: PROXY SESSIONS NEW RELIC: Error sending proxy sessions: TypeError: Cannot read properties of null (reading 'filter')
2024-08-20T07:57:30.111Z error: UPTIME NEW RELIC: Error sending uptime: TypeError: Cannot read properties of null (reading 'filter')
2024-08-20T07:57:44.522Z error: HEALTH METRICS NEW RELIC: Error sending proxy sessions: TypeError: Cannot read properties of null (reading 'filter')
2024-08-20T07:57:44.528Z error: HEALTH METRICS NEW RELIC: Error sending proxy sessions: TypeError: Cannot read properties of null (reading 'filter')
2024-08-20T07:57:45.113Z error: UPTIME NEW RELIC: Error sending uptime: TypeError: Cannot read properties of null (reading 'filter')
2024-08-20T07:57:54.534Z error: PROXY SESSIONS NEW RELIC: Error sending proxy sessions: TypeError: Cannot read properties of null (reading 'filter')
2024-08-20T07:57:54.544Z error: PROXY SESSIONS NEW RELIC: Error sending proxy sessions: TypeError: Cannot read properties of null (reading 'filter')
2024-08-20T07:58:00.115Z error: UPTIME NEW RELIC: Error sending uptime: TypeError: Cannot read properties of null (reading 'filter')
2024-08-20T07:58:04.521Z error: HEALTH METRICS NEW RELIC: Error sending proxy sessions: TypeError: Cannot read properties of null (reading 'filter')
2024-08-20T07:58:04.537Z error: HEALTH METRICS NEW RELIC: Error sending proxy sessions: TypeError: Cannot read properties of null (reading 'filter')
2024-08-20T07:58:15.117Z error: UPTIME NEW RELIC: Error sending uptime: TypeError: Cannot read properties of null (reading 'filter')

Expected Behavior

Better error messages that tell what's wrong.

To Reproduce

No response