mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-28 23:19:33 +00:00
Added the ability to set custom alert score
This commit is contained in:
parent
7078912d43
commit
ddd449ea90
75 changed files with 1586 additions and 1600 deletions
|
|
@ -26,7 +26,6 @@
|
|||
|
||||
class CustomFlowLuaScriptAlert : public FlowAlert {
|
||||
private:
|
||||
u_int8_t score;
|
||||
std::string msg;
|
||||
ndpi_serializer* getAlertJSON(ndpi_serializer* serializer);
|
||||
|
||||
|
|
@ -35,14 +34,12 @@ class CustomFlowLuaScriptAlert : public FlowAlert {
|
|||
return {flow_alert_custom_lua_script, alert_category_security};
|
||||
}
|
||||
static u_int8_t getDefaultScore() { return SCORE_LEVEL_ERROR; };
|
||||
|
||||
CustomFlowLuaScriptAlert(FlowCheck* c, Flow* f) : FlowAlert(c, f){};
|
||||
|
||||
CustomFlowLuaScriptAlert(FlowCheck* c, Flow* f) : FlowAlert(c, f){ setAlertScore(SCORE_LEVEL_ERROR); };
|
||||
~CustomFlowLuaScriptAlert(){};
|
||||
|
||||
FlowAlertType getAlertType() const { return getClassType(); };
|
||||
void setAlertMessage(std::string m) { msg = m; };
|
||||
void setAlertScore(u_int8_t v) { score = v; };
|
||||
virtual u_int8_t getAlertScore() const { return (score); };
|
||||
bool autoAck() const { return false; };
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue