Skip to content

Commit

Permalink
Merge pull request #759 from ccztux/issue-757
Browse files Browse the repository at this point in the history
Fixed some configuration directives doesnt work, e.g. all_partitions and follow_symlinks (#757)
  • Loading branch information
jomann09 committed Oct 26, 2021
2 parents d514007 + 57d36d1 commit cab9b09
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGES.rst
Expand Up @@ -11,6 +11,7 @@ Changelog
- Fixed connection to NRDP server can hang indefinitely (#776) (ccztux)
- Fixed toggle long output doesnt work (#778) (ccztux)
- Fixed the filter Type gets lost on pages > 1 (#780) (ccztux)
- Fixed some configuration directives doesnt work, e.g. all_partitions and follow_symlinks (#757) (ccztux)
- Fixed issue with systemctl not showing services due to output (#791)

2.3.1 - 02/11/2021
Expand Down
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
2.4.0
2.4.0
2 changes: 1 addition & 1 deletion agent/listener/database.py
Expand Up @@ -46,7 +46,7 @@ def setup(self):

def run_db_maintenance(self, config):
try:
days = int(config.get('general', 'check_logging_time'))
days = config.getint('general', 'check_logging_time')
except Exception as e:
days = 30;
timestamp = time.time() - (days * 86400)
Expand Down
6 changes: 3 additions & 3 deletions agent/listener/pluginnodes.py
Expand Up @@ -84,13 +84,13 @@ def execute_plugin(self, config, *args, **kwargs):

# Get plugin command timeout value, if it exists
try:
timeout = int(config.get('plugin directives', 'plugin_timeout'))
timeout = config.getint('plugin directives', 'plugin_timeout')
except Exception as e:
timeout = 59

# Get the check logging value
try:
check_logging = int(config.get('general', 'check_logging'))
check_logging = config.getint('general', 'check_logging')
except Exception as e:
check_logging = 1

Expand Down Expand Up @@ -197,7 +197,7 @@ def setup_plugin_children(self, config):

# Get the follow_symlinks value
try:
follow_symlinks = bool(config.get('plugin directives', 'follow_symlinks'))
follow_symlinks = config.getboolean('plugin directives', 'follow_symlinks')
except Exception as e:
follow_symlinks = False

Expand Down
2 changes: 1 addition & 1 deletion agent/listener/psapi.py
Expand Up @@ -195,7 +195,7 @@ def get_disk_node(config):

# Get the all partitions value
try:
all_partitions = bool(config.get('general', 'all_partitions'))
all_partitions = config.getboolean('general', 'all_partitions')
except Exception as e:
all_partitions = True

Expand Down
4 changes: 2 additions & 2 deletions agent/ncpa_windows.py
Expand Up @@ -84,8 +84,8 @@ def setup_logging(self, *args, **kwargs):
logging.getLogger().handlers = []

# Max size of log files will be 20MB, and we'll keep one of them as backup
max_log_size_bytes = int(config.get('logmaxmb', 5))
max_log_rollovers = int(config.get('logbackups', 5))
max_log_size_bytes = config.getint('logmaxmb', 5)
max_log_rollovers = config.getint('logbackups', 5)
max_file_size = max_log_size_bytes * 1024 * 1024
file_handler = logging.handlers.RotatingFileHandler(log_file,
maxBytes=max_file_size,
Expand Down
2 changes: 1 addition & 1 deletion agent/passive/nagioshandler.py
Expand Up @@ -45,7 +45,7 @@ def get_commands_from_config(self):
duration = values[2]
else:
try:
duration = int(self.config.get('passive', 'sleep'))
duration = self.config.getint('passive', 'sleep')
except Exception:
duration = 300

Expand Down

0 comments on commit cab9b09

Please sign in to comment.