-
Notifications
You must be signed in to change notification settings - Fork 297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQL: add MSSQL support and allow storing only a subset of event fields #2172
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #2172 +/- ##
===========================================
- Coverage 76.33% 76.31% -0.03%
===========================================
Files 441 441
Lines 23686 23710 +24
Branches 3747 3753 +6
===========================================
+ Hits 18081 18094 +13
- Misses 4865 4876 +11
Partials 740 740
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't test it, but looks good overall.
Entry in changelog is missing
@@ -29,16 +35,21 @@ class SQLOutputBot(OutputBot, SQLMixin): | |||
sslmode = "require" | |||
table = 'events' | |||
user = "intelmq" | |||
fields = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fields = None | |
fields: Optional[list] = None |
After a connection error, wait this many seconds before reconnecting.
and basic docs
This pull request enhances IntelMQ's SQL database support in three ways:
SQLMixin
class, requiring the packagepymssql
.fields
toSQLOutputBot
, containing a list of which event fields to store in the database. If this is not specified, store all fields as before.reconnect_delay
toSQLMixin
, making it wait that many seconds before attempting to reconnect after a connection error.