sandialabs/scot

alertbot.pl ignores command line flags

ajaymills opened this issue · 3 comments

It seems that none of the flags described in the source code appear to be sent to any of the backend code. The result is that they are ignored when invoking the tool at the command line.

can you provide a "sanitized" command line example?

Option passed into alertbot.pl are passed into the ForkAlerts.pm module via the $opts_href. See around line 172 in alertbot.pl ( $bot->run($opts_href) )

If you can provide what options you attempted and why you think they failed, that will help us narrow down the problem.

Whoops of course I should have had an example...

At first I saw the interactive flag and wanted to test it just to get a feel for the process.

./alertbot.pl --int

There was no output.

Eventually I realized that it only checks the last 60 mins by default (and there were no emails in my mailbox during that range) so I wanted to override that:

./alertbot.pl --ago 4320

This is the last three days and I can see a few dozen unread emails in my test mailbox. But no new alerts appeared in the event list.

Could only get this to work by editing lib/Scot/Util/Imap.pm line 45. Then those older emails were pushed into the event list.

Even then interactive mode didn't seem to produce output though.... I notice ForkAlerts.pm line 65 delcares variable $interactive but it never appears to be set (that I can see at a glance...).

Thanks

Alertbot.p has been removed from 3.5.2. "alert.pl" is the replacement. Configuration of the its behavior is done through the file etc/mail.cfg.pl