Implemented countries host check (#5713)

* Added check and alert implementation

* Fixed size of estimation and some typo

* Added HLL counters and DES structure
Co-authored-by: Paolo Junior Mollica <p.mollica@studenti.unipi.it>

* fixes according comments of PR

* decreased memory footprint

* resolved conflicts

* fixed HostCheckID

* Removed wrongly committed file

Co-authored-by: paolo-junior-mollica <paolo.junior.mollica@gmail.com>
Co-authored-by: Matteo Biscosi <49585191+MatteoBiscosi@users.noreply.github.com>
This commit is contained in:
Francesco Amodeo 2021-08-25 15:50:07 +02:00 committed by GitHub
parent 5df881478d
commit de27966413
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 318 additions and 1 deletions

View file

@ -0,0 +1,35 @@
--
-- (C) 2019-21 - ntop.org
--
local checks = require("checks")
local host_alert_keys = require "host_alert_keys"
-- #################################################################
local countries_contacts = {
-- Script category
category = checks.check_categories.security,
default_enabled = false,
alert_id = host_alert_keys.host_alert_countries_contacts,
default_value = {
operator = "gt",
threshold = 100,
},
gui = {
i18n_title = "alerts_thresholds_config.countries_contacts_title",
i18n_description = "alerts_thresholds_config.countries_contacts_description",
i18n_field_unit = checks.field_units.contacts,
input_builder = "threshold_cross",
field_max = 255,
field_min = 1,
field_operator = "gt";
}
}
-- #################################################################
return countries_contacts