mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-22 10:45:57 +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
|
|
@ -102,12 +102,11 @@ bool FlowCheck::loadConfiguration(json_object *config) {
|
|||
|
||||
/* **************************************************** */
|
||||
|
||||
void FlowCheck::computeCliSrvScore(FlowAlertType alert_type,
|
||||
void FlowCheck::computeCliSrvScore(u_int8_t alert_score,
|
||||
risk_percentage cli_pctg,
|
||||
u_int8_t *cli_score, u_int8_t *srv_score) {
|
||||
u_int8_t score = ntop->getFlowAlertScore(alert_type.id);
|
||||
*cli_score = (score * cli_pctg) / 100;
|
||||
*srv_score = score - (*cli_score);
|
||||
*cli_score = (alert_score * cli_pctg) / 100;
|
||||
*srv_score = alert_score - (*cli_score);
|
||||
}
|
||||
|
||||
/* **************************************************** */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue