Simplified logging, enabled start_date in monitor configuration and enabled timezone configuration.
This commit is contained in:
parent
549510c3a4
commit
2178452f39
8 changed files with 65 additions and 29 deletions
|
|
@ -23,12 +23,12 @@ class Monitors:
|
|||
self.__monitors = {}
|
||||
|
||||
monitor_groups = os.listdir(self.__configuration.get_configuration_path() + '/monitors/')
|
||||
log('debug', __name__, 'monitor groups: ' + str(monitor_groups))
|
||||
log('debug', 'monitor groups: ' + str(monitor_groups))
|
||||
for monitor_group in monitor_groups:
|
||||
monitors_file_list = glob.glob(self.__configuration.get_configuration_path() +
|
||||
'/monitors/' + monitor_group + '/*.conf')
|
||||
|
||||
log('debug', __name__, 'monitor files: ' + str(monitors_file_list))
|
||||
log('debug', 'monitor files: ' + str(monitors_file_list))
|
||||
for monitor_file in monitors_file_list:
|
||||
identifier = monitor_group + '_' + os.path.splitext(os.path.basename(
|
||||
monitor_file))[0]
|
||||
|
|
@ -38,12 +38,12 @@ class Monitors:
|
|||
|
||||
kwargs = {}
|
||||
for option in monitor_configuration.options('args'):
|
||||
#print(option)
|
||||
value = monitor_configuration.get('args', option)
|
||||
#log('debug', 'added option to kwargs: ' + option + ' = ' + value)
|
||||
kwargs[option] = value
|
||||
|
||||
if kwargs:
|
||||
log('debug', __name__, identifier + ' args ' + str(kwargs))
|
||||
log('debug', identifier + ' args ' + str(kwargs))
|
||||
|
||||
identifier = monitor_group + '_' + os.path.splitext(os.path.basename(
|
||||
monitor_file))[0]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue