When first building the agent, I was able to manually review the logs and assess how each line should be scored.
That's going to be infeasible as the scoring gets more complex (and/or logs get busier).
What I'd like, is a dry-run mode to pass log lines through - it should then output the logline with the calculated score attached
Activity
19-Jan-23 18:00
assigned to @btasker
19-Jan-23 18:11
mentioned in commit misc/python-mastodon-bot-detection@c777c668072b30449e3729c8d7876ce13816c6c4
Commit: misc/python-mastodon-bot-detection@c777c668072b30449e3729c8d7876ce13816c6c4 Author: B Tasker Date: 2023-01-19T18:09:52.000+00:00Message
Add support for a dry run mode for project-management-only/scraper-snitch-bot#3
This allows the log-agent to be run without writing data to the TSDB - it'll just output loglines that it's considered with an associated score.
Currently, lines that are skipped won't be output - it's probably worth expanding to support those too
19-Jan-23 18:12
The initial implementation is in place and working, it can be used as follows
The important bit is the
-ibeing passed to docker, otherwise it'll process but won't print to stdout.19-Jan-23 18:25
mentioned in commit misc/python-mastodon-bot-detection@28ee3c1203208da53be08fff5a59d312e25c7fd8
Commit: misc/python-mastodon-bot-detection@28ee3c1203208da53be08fff5a59d312e25c7fd8 Author: B Tasker Date: 2023-01-19T18:24:43.000+00:00Message
Dry-run output includes flags to help identify why a score has been assigned (project-management-only/scraper-snitch-bot#3)
Each check now appends a debug flag, these are squashed into a CSV and printed as the 2nd column of the dry run output
20-Jan-23 08:52
There are 3 ways to trigger dry run:
Env Variables
DRY_RUN: set to YCommand line options
-n--dry-runThe environment variable is currently more convenient when using the docker image - the bot's dockerfile uses
CMDrather thanENTRYPOINTso adding commandline args means respecifying the command at the same time.I likely will change that in future, but it's currently quite useful for testing/debugging.