MODULES_DIR = os.getenv('NETDATA_PLUGINS_DIR',
os.path.abspath(__file__).strip("python.d.plugin.py").replace("plugins.d", "python.d"))
CONFIG_DIR = os.getenv('NETDATA_CONFIG_DIR', "/etc/netdata/")
-INTERVAL = os.getenv('NETDATA_UPDATE_EVERY', 1)
+INTERVAL = os.getenv('NETDATA_UPDATE_EVERY', None)
# directories should end with '/'
if MODULES_DIR[-1] != "/":
MODULES_DIR += "/"
except RuntimeError:
return None
try:
- with self.connection.cursor() as cursor:
- cursor.execute(QUERY)
- raw_data = cursor.fetchall()
+ cursor = self.connection.cursor()
+ cursor.execute(QUERY)
+ raw_data = cursor.fetchall()
except Exception as e:
self.error(NAME + ": cannot execute query.", e)
self.connection.close()
idx = 0
data = self._get_data()
+ if data is None:
+ return False
for name in ORDER:
header = "CHART mysql_" + \
str(self.name) + "." + \