summaryrefslogtreecommitdiffstats
path: root/collectors/python.d.plugin/pandas/pandas.chart.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-05-08 16:27:08 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-05-08 16:27:08 +0000
commit81581f9719bc56f01d5aa08952671d65fda9867a (patch)
tree0f5c6b6138bf169c23c9d24b1fc0a3521385cb18 /collectors/python.d.plugin/pandas/pandas.chart.py
parentReleasing debian version 1.38.1-1. (diff)
downloadnetdata-81581f9719bc56f01d5aa08952671d65fda9867a.tar.xz
netdata-81581f9719bc56f01d5aa08952671d65fda9867a.zip
Merging upstream version 1.39.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'collectors/python.d.plugin/pandas/pandas.chart.py')
-rw-r--r--collectors/python.d.plugin/pandas/pandas.chart.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/collectors/python.d.plugin/pandas/pandas.chart.py b/collectors/python.d.plugin/pandas/pandas.chart.py
index 8eb4452fb..7977bcb36 100644
--- a/collectors/python.d.plugin/pandas/pandas.chart.py
+++ b/collectors/python.d.plugin/pandas/pandas.chart.py
@@ -3,6 +3,7 @@
# Author: Andrew Maguire (andrewm4894)
# SPDX-License-Identifier: GPL-3.0-or-later
+import os
import pandas as pd
try:
@@ -11,6 +12,12 @@ try:
except ImportError:
HAS_REQUESTS = False
+try:
+ from sqlalchemy import create_engine
+ HAS_SQLALCHEMY = True
+except ImportError:
+ HAS_SQLALCHEMY = False
+
from bases.FrameworkServices.SimpleService import SimpleService
ORDER = []
@@ -46,7 +53,10 @@ class Service(SimpleService):
"""ensure charts and dims all configured and that we can get data"""
if not HAS_REQUESTS:
- self.warn('requests library could not be imported')
+ self.warning('requests library could not be imported')
+
+ if not HAS_SQLALCHEMY:
+ self.warning('sqlalchemy library could not be imported')
if not self.chart_configs:
self.error('chart_configs must be defined')