Commit graph

25 commits

Author SHA1 Message Date
Simone Mainardi
cf400216e2 Implements caching of member-to-confiset_id as Lua pool class member 2020-07-10 19:22:47 +02:00
Simone Mainardi
bd4921df55 Migrates local network user scripts to the new host pools configuration 2020-07-10 18:45:19 +02:00
Simone Mainardi
09c69edb22 Major rework of user_scripts.lua to use new pools 2020-07-10 13:01:29 +02:00
Simone Mainardi
e487427aab Refactors alert_utils and enterprise_alert_utils
Addresses #3720

Alerts Refactor: alert_utils as module

Alerts Refactor: notify_ntopng_start and notify_ntopng_stop

Alerts Refactor: processAlertNotifications

Alerts Refactor: checkStoreAlertsFromC

Alerts Refactor: formatAlertNotification

Alerts Refactor: notification_timestamp_rev

Alerts Refactor: formatAlertMessage

Alerts Refactor: getConfigsetAlertLink

Alerts Refactor: alertNotificationActionToLabel

Alerts Refactor: flushAlertsData

Alerts Refactor: disableAlertsGeneration

Alerts Refactor: newAlertsWorkingStatus and other

Alerts Refactor: drawAlerts

Alerts Refactor: drawAlertTables

Alerts Refactor: printAlertTables

Alerts Refactor: checkDeleteStoredAlerts

Alerts Refactor: getUnpagedAlertOptions

Alerts Refactor: getTabParameters

Alerts Refactor: getAlerts

Alerts Refactor: getNumAlerts

Alerts Refactor: performAlertsQuery

Alerts Refactor: sec2granularity

Alerts Refactor: granularity2id

Alerts Refactor: granularity2sec

Alerts Refactor: alertEngineLabel

Alerts Refactor: alertEngine

Alerts Refactor: alertEngineRaw

Alerts Refactor: alertTypeDescription

Alerts Refactor: alertType

Alerts Refactor: alertTypeLabel

Alerts Refactor: alertTypeRaw

Alerts Refactor: alertSeverity

Alerts Refactor: alertSeverityLabel

Alerts Refactor: alertSeverityRaw

Alerts Refactor: get_make_room_keys

Alerts Refactor: enterprise_alert_utils
2020-04-10 14:03:20 +02:00
Simone Mainardi
3144bc8bdf Renames alert_config to user_script_config 2020-03-26 14:51:53 +01:00
emanuele-f
aca088ea13 Add hyperlink to jump to the alert configuration
Closes #2936
2020-01-17 19:11:15 +01:00
Luca Deri
170bc60f19 Updated (C) 2020-01-08 23:52:51 +01:00
emanuele-f
d037f9a9a4 Use new user scripts config and gui
The user scripts configuration can now be configured from the "User Scripts" entry under the cog
icon. It allows the creation of multiple configuration presets to be applied to hosts, networks and
interfaces.
2020-01-03 13:03:34 +01:00
emanuele-f
c665bc78d7 Make configsets global 2019-12-23 13:25:35 +01:00
emanuele-f
f62aa15117 Load new configsets while loading user scripts
Hosts/SNMP devices will be handled separately
2019-12-20 12:19:49 +01:00
emanuele-f
b10520e264 Rename checkAlerts callback to runScripts 2019-12-16 09:31:24 +01:00
emanuele-f
0d48bff069 Implement more flexible user_scripts api
NOTE: The existing alerts configuration of the users will be discarded.

Some code has been added to make the current gui on/off toggle work.
It is marked with the following comment:

-- TODO remove after implementing the new gui
2019-11-28 11:06:14 +01:00
emanuele-f
54140b6f1a Migrate alertable disabled alerts preference to lua
This avoids performing multiple hget on redis, thus increasing performance
2019-11-05 14:59:38 +01:00
Simone Mainardi
ab1687fb44 Fixes triggere/release of alerts at mixed granularities 2019-10-21 23:30:45 +02:00
Simone Mainardi
5b3f34b72a Fixes flapping of engaged alerts 2019-10-21 17:41:50 +02:00
Simone Mainardi
43d0b89bd9 Prevens tons of unnecessary calls to alerts_api.trigger() 2019-10-17 18:54:13 +02:00
emanuele-f
7bd6feb622 Rename check_module -> user_script 2019-10-10 18:14:53 +02:00
emanuele-f
b8f1a039fb Fix always_enabled required for non-alert scripts 2019-10-10 18:03:36 +02:00
emanuele-f
75cf795521 Unify teardown function 2019-10-10 17:24:24 +02:00
Simone Mainardi
4ef7d35296 Benchmarks for hosts interface and network scripts 2019-10-10 11:54:31 +02:00
emanuele-f
ab0094c1c3 Unify syslog with user scripts API 2019-10-09 18:53:19 +02:00
emanuele-f
e66889154c Migrate flow script documentation and document traffic element scripts 2019-10-09 17:23:51 +02:00
emanuele-f
ffd3b4c1ee Users scripts api changes and initial documentation 2019-10-09 15:12:28 +02:00
emanuele-f
ede9a7940a Generalize periodic and flows callbacks
Now periodic callbacks are properly called even when alerts are disabled
The granularity filter and check_function has been replaced with a more generic hooks list
2019-10-07 19:05:43 +02:00
emanuele-f
bee1efdded Move callbacks scripts into separate tab 2019-10-04 10:48:13 +02:00
Renamed from scripts/callbacks/interface/alerts/network.lua (Browse further)