fix syntax
This commit is contained in:
parent
c726779f6e
commit
f616871068
@ -24,7 +24,7 @@ class Watchdog(plugins.Plugin):
|
|||||||
|
|
||||||
def on_epoch(self, agent, epoch, epoch_data):
|
def on_epoch(self, agent, epoch, epoch_data):
|
||||||
# get last 10 lines
|
# get last 10 lines
|
||||||
last_lines = ''.join(list(TextIOWrapper(subprocess.Popen(['journalctl','-n10','-k', '--since', '"5 minutes ago"'],
|
last_lines = ''.join(list(TextIOWrapper(subprocess.Popen(['journalctl','-n10','-k', '--since', '-5m'],
|
||||||
stdout=subprocess.PIPE).stdout))[-10:])
|
stdout=subprocess.PIPE).stdout))[-10:])
|
||||||
if len(self.pattern.findall(last_lines)) >= 5:
|
if len(self.pattern.findall(last_lines)) >= 5:
|
||||||
display = agent.view()
|
display = agent.view()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user