Small fixes. (0.25.3)
This commit is contained in:
parent
cd8b2c5093
commit
fb7afd0bb7
2 changed files with 2 additions and 4 deletions
|
|
@ -76,7 +76,7 @@ class MySQLDatabase(Database):
|
||||||
str((json if json else "None")) + '\",\"' + \
|
str((json if json else "None")) + '\",\"' + \
|
||||||
str((message if message else "None")) + '\",\"' + \
|
str((message if message else "None")) + '\",\"' + \
|
||||||
str((service if service else "None")) + '\",\"' + \
|
str((service if service else "None")) + '\",\"' + \
|
||||||
str((status if status else "None")) + '\",\"' + \
|
str((status if status else "Unknown")) + '\",\"' + \
|
||||||
str(timestamp) + '\")'
|
str(timestamp) + '\")'
|
||||||
self._log.debug(sql)
|
self._log.debug(sql)
|
||||||
cursor.execute(sql)
|
cursor.execute(sql)
|
||||||
|
|
|
||||||
|
|
@ -91,8 +91,6 @@ class Linspector:
|
||||||
else:
|
else:
|
||||||
time_delta = round(random.uniform(0.00, 60.000), 3)
|
time_delta = round(random.uniform(0.00, 60.000), 3)
|
||||||
|
|
||||||
# TODO: write get functions in the monitor to get options. do not call
|
|
||||||
# get_monitor_configuration_option() here (example: get_start_date()).
|
|
||||||
if monitors.get(monitor).get_monitor_configuration_option('args', 'start_date'):
|
if monitors.get(monitor).get_monitor_configuration_option('args', 'start_date'):
|
||||||
new_start_date = \
|
new_start_date = \
|
||||||
monitors.get(monitor).get_monitor_configuration_option('args', 'start_date')
|
monitors.get(monitor).get_monitor_configuration_option('args', 'start_date')
|
||||||
|
|
@ -108,7 +106,7 @@ class Linspector:
|
||||||
timezone = monitors.get(monitor).get_monitor_configuration_option('monitor',
|
timezone = monitors.get(monitor).get_monitor_configuration_option('monitor',
|
||||||
'timezone')
|
'timezone')
|
||||||
else:
|
else:
|
||||||
# set to local system timezone by as default
|
# set to local system timezone as default
|
||||||
timezone = datetime.datetime.now(datetime.timezone.utc).astimezone().tzname()
|
timezone = datetime.datetime.now(datetime.timezone.utc).astimezone().tzname()
|
||||||
|
|
||||||
# add cron and one time run jobs to Linspector. not only "interval" jobs should be
|
# add cron and one time run jobs to Linspector. not only "interval" jobs should be
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue