Commit graph

73 commits

Author SHA1 Message Date
Simone Mainardi
10ee722da4 Fixes missing information when loading plugins with no manifest
Fixes #5163
2021-04-12 09:29:45 +02:00
Simone Mainardi
08f95ee5cb Fix and cleanup defaul alert severities 2021-03-25 09:07:40 +01:00
Simone Mainardi
aea9138bfb Implements flow callbacks and alerts in C++ 2021-03-22 09:51:36 +01:00
Simone Mainardi
716d907ff1 Configset initialization fixes 2021-03-01 18:19:38 +01:00
Simone Mainardi
15d4672f7e Loads plugins templates from /modules when no template is found 2021-02-23 10:55:41 +01:00
Simone Mainardi
9433928dfc Handles templates (load/require) for individual plugins 2021-02-19 15:51:27 +01:00
Simone Mainardi
f489eba549 Prevents non-community plugins from being always reloaded
Possibly addresses #4903
2021-01-25 19:26:13 +01:00
Alfredo Cardigliano
080e590166 Fix plugins_utils.hasAlerts what was not restoring the selected interface 2021-01-25 17:39:03 +01:00
Luca Deri
a1178a0791 Updated (C) 2021-01-02 12:08:23 +01:00
Simone Mainardi
d989f8d2c6 Reworks notifications thread to avoid Redis accesses
Fixes #4673
2020-12-29 18:48:55 +01:00
Simone Mainardi
16e2c9efe2 Cleanup to remove flow_consts no longer needed 2020-12-22 17:59:51 +01:00
gabryon99
15772bd0fe refactor for endpoints and recipients (#4707) 2020-11-25 16:25:55 +01:00
Simone Mainardi
2849267af8 Reworks plugin template definition keys
Implements #4651
2020-11-03 18:09:29 +01:00
Simone Mainardi
e27406cc5d Checks plugin template parameters upon load
Implements #4652
2020-11-03 17:38:33 +01:00
Simone Mainardi
357f11900f Fixes exceptions upon plugins reload
Fixes #4633
2020-10-27 17:35:14 +01:00
Simone Mainardi
8a3c115e9d Fixes possible ERROR: Missing required field 'alert_type'
Fixes #4560
2020-10-12 14:55:16 +02:00
Simone Mainardi
46572a96a0 Fixes cleanup of plugins upon startup 2020-10-11 19:03:40 +02:00
Simone Mainardi
c795fdb4e9 Adds trace info upon failing 'plugins_metadata' require
Addresses #4492
2020-09-28 17:57:10 +02:00
Simone Mainardi
6c1280a8e5 Reworks recipients.lua as static rather than (useless) instance 2020-09-23 15:03:07 +02:00
Simone Mainardi
3ad4522e45 Implements additional plugin hooks
The following plugin hooks have been implemented

onEnable(hook, hook_config)
onDisable(hook, hook_config)
onUpdateConfig(hook, hook_config)
onLoad(hook, hook_config)
onUnload(hook, hook_config)

Documentation is part of the commit.

Implements #4451
Implements #4453
Implements #4454
Implements #4455
2020-09-21 18:25:14 +02:00
Simone Mainardi
304c5404f2 Implement additional plugin hook script.onUpdateConfig
Implements #4451
2020-09-20 13:19:36 +02:00
Simone Mainardi
d8d8ee08ee Refreshes recipients upon plugins reload 2020-09-16 22:11:50 +02:00
Simone Mainardi
64f0922b6b Implements plugin onLoad call
Implements #4438
2020-09-16 10:48:12 +02:00
Simone Mainardi
f7e1ea9709 Reworks plugin loading and structure
Implements #4358
2020-09-15 11:33:53 +02:00
Simone Mainardi
20db316136 Migrates Discord plugin as self-contained 2020-09-09 17:22:09 +02:00
Simone Mainardi
0b894bcec9 Typo 2020-07-24 13:22:17 +02:00
Simone Mainardi
9f337629ec Simplifies plugins_utils.loadSchemas 2020-07-24 13:15:27 +02:00
Simone Mainardi
95607666aa Fixes plugin timeseries schemas load 2020-07-24 12:48:53 +02:00
Simone Mainardi
2214a7297c Fixes metadata reload upon plugins reload on community 2020-07-24 12:44:05 +02:00
Simone Mainardi
66b684d8e9 Minor cleanup 2020-07-23 23:44:37 +02:00
Simone Mainardi
36478ba3ee Optimizes plugins_utils.loadModule with require 2020-07-23 23:38:30 +02:00
Simone Mainardi
1e3fa9a389 Optimizes plugins http lint using require 2020-07-23 23:25:23 +02:00
Simone Mainardi
6d1e8697a1 Optimizes plugins_utils.getLoadedAlertEndpoints (avoids multiple reloads) 2020-07-23 23:19:01 +02:00
Simone Mainardi
4270f6e912 Cleanup unused plugins_utils.loadAlertEndpoint 2020-07-23 23:02:00 +02:00
Simone Mainardi
5d178b0bf4 Avoids using dofile when loading plugins metadata 2020-07-23 19:48:34 +02:00
Simone Mainardi
5fe50b0fd5 Plugin improvements (require vs dofile) 2020-07-23 19:39:28 +02:00
Simone Mainardi
2e16c2b76c Avoids dofile when loading plugin ts schemas (uses require) 2020-07-23 19:20:33 +02:00
Simone Mainardi
99a083251e Prevents loading of non-lua files in plugin load_definitions 2020-07-23 18:14:45 +02:00
Luca Deri
b1a17d990f Added check to avoid copying non .lua files when plugin directories are created 2020-06-12 08:09:41 +02:00
Simone Mainardi
f3b2b4869e Fixes broken plugin menu entries with --http-prefix
Addresses #3957
2020-05-20 12:07:22 +02:00
emanuele-f
7191f3e1a5 Add checks to avoid startup failures when plugins metadata does not exist 2020-04-27 12:25:48 +02:00
Simone Mainardi
78b334e4eb Refactors alerts and flow statuses in builtin and plugins
Implements #3811
Implements #3812

Refactors builtin alerts

Refactors builtin flow statuses
2020-04-21 22:27:49 +02:00
Simone Mainardi
6ea50fb004 Implements the Elasticsearch alerts endpoint
Implements #3105

Initial work to add elastisearch alerts

Initial implementation of ES alerts

Implements version check

Implements flow alerts format

Changes Elasticsearch index name

Comments the Elasticsearch alert endpoint
2020-04-18 16:35:14 +02:00
Simone Mainardi
4177ee61ab Implements constant flow and alert ids
Enlarges AlertType size

Changes alerts database
2020-04-14 22:20:44 +02:00
emanuele-f
0ad1b65512 Add plugins support for httpdocs, HTML templates and Lua modules
Such resources can be placed into the following plugin subdirs:

- ./httpdocs: javascript, css and similar, see plugins_utils.getHttpdocsDir
- ./modules: Lua modules, see plugins_utils.loadModule
- ./templates: HTML templates, see plugins_utils.renderTemplate
2020-04-14 17:53:25 +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
emanuele-f
306a253693 Implement extensible RTT modules 2020-04-10 13:09:30 +02:00
emanuele-f
121c2ef0dd Add support for Enterprise L plugins 2020-04-02 15:23:11 +02:00
Alfredo Cardigliano
2425134f05 Replace isEnterprise with isEnterpriseM 2020-04-02 12:36:34 +00:00
emanuele-f
61ab06fcd7 Fix SyslogParserInterface plugins loading 2020-03-26 14:47:51 +01:00