Skip to content

Commit

Permalink
Merge pull request #1014 from NagiosEnterprises/bb_fixPluginsWOExtens…
Browse files Browse the repository at this point in the history
…ions

Fixing execution of plugins that lack file extensions
  • Loading branch information
ne-bbahn committed Nov 9, 2023
2 parents d9627a4 + 1bfbd37 commit 7cc6cdd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions agent/listener/pluginnodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,13 @@ def get_plugin_instructions(self, config):
"""
_, extension = os.path.splitext(self.name)
try:
if extension.strip() == "":
return "$plugin_name $plugin_args"
return config.get("plugin directives", extension)
except ConfigParser.NoOptionError:
return "$plugin_name $plugin_args"
else:
return "$plugin_name $plugin_args"

def kill_proc(self, p, t):
self.killed = True
Expand Down

0 comments on commit 7cc6cdd

Please sign in to comment.