`_ periodic activities, or both.
- `Frequency`: How often a periodic activity has to be executed.
- `Max Duration`: How long the periodic activity execution can take.
- `Chart`: A link to the historical charts of the periodic activity.
@@ -145,29 +145,29 @@ Periodic activities with issues also have their alerts. Alerts are engaged when
Internals: Periodic Activities Alerts
-Periodic activities are in charge of running plugin user scripts.
+Periodic activities are in charge of running plugin checks.
-User Scripts
+Checks
------------
-:ref:`User Scripts` are part of ntopng plugins. They are executed periodically or when a certain event occurs.
+:ref:`Checks` are part of ntopng plugins. They are executed periodically or when a certain event occurs.
-Aim of the `User Scripts` internals table is to monitor the execution of scripts.
+Aim of the `Checks` internals table is to monitor the execution of scripts.
-.. figure:: ../img/internals_user_scripts.png
+.. figure:: ../img/internals_checks.png
:align: center
- :alt: Internals: User Scripts
+ :alt: Internals: Checks
- Internals: User Scripts
+ Internals: Checks
Information shown in the table columns is:
-- `User Script`: The name of the user script which is executed.
-- `Target`: The target of the user script, either an `host`, a `flow` or one of the other :ref:`Other User Scripts` targets.
-- `Hook`: One of the :ref:`User Script Hooks`.
-- `Last Num Calls`: The number of times the user script has been called the last time a periodic activity has executed it.
-- `Last Duration`: The total duration of the user script, computed as the sum of the duration of any of its `Last Num Calls`.
+- `Check`: The name of the check which is executed.
+- `Target`: The target of the check, either an `host`, a `flow` or one of the other targets.
+- `Hook`: One of the :ref:`Check Hooks`.
+- `Last Num Calls`: The number of times the check has been called the last time a periodic activity has executed it.
+- `Last Duration`: The total duration of the check, computed as the sum of the duration of any of its `Last Num Calls`.
Information shown is useful to troubleshoot the following issues:
-- `Troubleshoot` periodic activities with :ref:`Degraded Performance`: A periodic activity may be slow because it is executing too many user scripts. Combining data from the `Periodic Activities` internals table with this table can highlight this condition.
+- `Troubleshoot` periodic activities with :ref:`Degraded Performance`: A periodic activity may be slow because it is executing too many checks. Combining data from the `Periodic Activities` internals table with this table can highlight this condition.
diff --git a/doc/src/third_party_integrations/pfsense.rst b/doc/src/third_party_integrations/pfsense.rst
index 1ec170612e..e23b97ca57 100644
--- a/doc/src/third_party_integrations/pfsense.rst
+++ b/doc/src/third_party_integrations/pfsense.rst
@@ -1,4 +1,4 @@
-.. _OPNsenseIntegration:
+.. _pfSenseIntegration:
pfsense
########
diff --git a/doc/src/use_cases/large_networks.rst b/doc/src/use_cases/large_networks.rst
index 9f910b933c..9de996ca9c 100644
--- a/doc/src/use_cases/large_networks.rst
+++ b/doc/src/use_cases/large_networks.rst
@@ -1,5 +1,3 @@
-.. _UseCaseMikrotik:
-
Monitoring Large Networks
#########################
diff --git a/doc/src/use_cases/mirror_tap_monitoring.rst b/doc/src/use_cases/mirror_tap_monitoring.rst
index c33544a71a..aa0f46fb20 100644
--- a/doc/src/use_cases/mirror_tap_monitoring.rst
+++ b/doc/src/use_cases/mirror_tap_monitoring.rst
@@ -7,4 +7,4 @@ To monitor data from a mirror/SPAN port or from a tap, refer to `Monitoring a Po
.. note::
- `PF_RING Zero Copy `_ licenses may be required when the traffic is above 1Gbps. In this case, see :ref:`OperatingNtopngOnLargeNetworks` and blog post `Best Practices for Efficiently Running ntopng `_.
\ No newline at end of file
+ `PF_RING Zero Copy `_ licenses may be required when the traffic is above 1Gbps. In this case, see :ref:`OperatingNtopngOnLargeNetworks` and blog post `Best Practices for Efficiently Running ntopng `_.
diff --git a/doc/src/use_cases/multiple_locations_monitoring.rst b/doc/src/use_cases/multiple_locations_monitoring.rst
index b27c29353b..d3ab4c54be 100644
--- a/doc/src/use_cases/multiple_locations_monitoring.rst
+++ b/doc/src/use_cases/multiple_locations_monitoring.rst
@@ -7,4 +7,4 @@ To monitor data from multiple locations, even geographically distributed, refer
.. note::
- An nProbe Standard or nProbe Professional license is required for each location.
\ No newline at end of file
+ An nProbe Standard or nProbe Professional license is required for each location.
diff --git a/doc/src/use_cases/netflow_sflow_monitoring.rst b/doc/src/use_cases/netflow_sflow_monitoring.rst
index 130922fbaa..dfb995c53b 100644
--- a/doc/src/use_cases/netflow_sflow_monitoring.rst
+++ b/doc/src/use_cases/netflow_sflow_monitoring.rst
@@ -7,4 +7,4 @@ To monitor data from Netflow/sFlow-capable devices, refer to :ref:`UsingNtopngWi
.. note::
- An nProbe Standard or nProbe Professional license is required.
\ No newline at end of file
+ An nProbe Standard or nProbe Professional license is required.
diff --git a/doc/src/use_cases/processes_monitoring.rst b/doc/src/use_cases/processes_monitoring.rst
index 6d9a48eeca..c31efb213b 100644
--- a/doc/src/use_cases/processes_monitoring.rst
+++ b/doc/src/use_cases/processes_monitoring.rst
@@ -10,4 +10,4 @@ On Linux, ntopng has the ability to provide visibility into the processes which
.. note::
- An nProbe Agent license is required.
\ No newline at end of file
+ An nProbe Agent license is required.
diff --git a/doc/src/use_cases/snmp_monitoring.rst b/doc/src/use_cases/snmp_monitoring.rst
index 385451bd96..1f374008e9 100644
--- a/doc/src/use_cases/snmp_monitoring.rst
+++ b/doc/src/use_cases/snmp_monitoring.rst
@@ -7,4 +7,4 @@ ntopng has the ability to combine traffic data with SNMP data. This means it per
.. note::
- An ntopng Enterprise M license or above is required.
\ No newline at end of file
+ An ntopng Enterprise M license or above is required.
diff --git a/doc/src/using_with_nprobe.rst b/doc/src/using_with_nprobe.rst
index 82129df9c1..e84c68849a 100644
--- a/doc/src/using_with_nprobe.rst
+++ b/doc/src/using_with_nprobe.rst
@@ -7,4 +7,4 @@
Using ntopng with nProbe
########################
-See :ref:`UsingNtopngWithNprobe`.
\ No newline at end of file
+See :ref:`UsingNtopngWithNprobe`.
diff --git a/doc/src/using_with_nprobe_agent.rst b/doc/src/using_with_nprobe_agent.rst
index 5235150610..b6d60b481b 100644
--- a/doc/src/using_with_nprobe_agent.rst
+++ b/doc/src/using_with_nprobe_agent.rst
@@ -7,4 +7,4 @@
Using ntopng with nProbe Agent
##############################
-See :ref:`UsingNtopngWithNprobeAgent`.
\ No newline at end of file
+See :ref:`UsingNtopngWithNprobeAgent`.
diff --git a/doc/src/web_gui/checks.rst b/doc/src/web_gui/checks.rst
new file mode 100644
index 0000000000..b420a9f33e
--- /dev/null
+++ b/doc/src/web_gui/checks.rst
@@ -0,0 +1,60 @@
+.. _WebUIUserScripts:
+
+Checks
+############
+
+Checks process network elements and perform actions such as triggering alerts. Creating checks is discussed in detail in :ref:`Checks`. This section describes how users scripts can be enabled and disabled, configured, and applied to network elements such as hosts and flows.
+
+Checks can be configured from any interface, from the menu `Settings->Checks`.
+
+.. figure:: ../img/web_gui_checks.png
+ :align: center
+ :alt: Checks Settings
+
+ Checks Settings
+
+Configuring a check means:
+
+- Choosing the network elements the script is going to be executed for.
+- Enabling/disabling it.
+- Setting its configuration values.
+
+`Configurations` are used to accomplish this.
+
+Configurations
+--------------
+
+Checks are configured by means of `Configurations`. A `Default` configuration is always present. The `Default` configuration is used to configure:
+
+- SNMP devices checks.
+- Global system-wide checks.
+
+The default configuration is also applied to:
+
+- Any host of every interface.
+- Any flow of every interface.
+- Any interface.
+- Any local network defined.
+
+Additional configurations can be created to limit the scope of their application. This means any additional configurations can be applied to:
+
+- Any subset of hosts of every interface.
+- Any flow of a subset of the active interfaces.
+- A subset of the active interfaces.
+- A subset of the defined local networks.
+
+The scope of application is shown in column `Applied To`. The Default configuration is `Applied to` any network element which is not included in any other configuration.
+
+Editing Configurations
+~~~~~~~~~~~~~~~~~~~~~~
+
+Checks configurations can be edited for any of the configurable network elements. The edit page shows three tabs, namely `All`, `Enabled`, and `Disabled` to give immediate access to the whole list of checks, or to limit the view to only those that are enabled or disabled.
+
+A check can be enabled or disabled by clicking the corresponding button under the `Actions` column. Certain checks can also have their values configured. In this case, an extra button `Edit` becomes available under the `Actions` column.
+
+Resetting, Importing and Exporting Configurations
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+All existing configurations can be imported and exported in bulk, to ease backup, restore, and replication across multiple machines. Buttons to perform this task are available below the configuration list. Button `Export Configuration` allows to download a JSON file, whereas button `Import Configuration` accepts a previously downloaded JSON file to load the configurations. `Reset Configuration` cleans up any existing configuration on the current system.
+
+
diff --git a/doc/src/web_gui/import_export.rst b/doc/src/web_gui/import_export.rst
index 848c971296..ddcc592e02 100644
--- a/doc/src/web_gui/import_export.rst
+++ b/doc/src/web_gui/import_export.rst
@@ -9,7 +9,7 @@ Through the web GUI it is possible to export selected configurations, including:
- SNMP configuration
- Active Monitoring configuration
-- User Scripts configuration
+- Checks configuration
- Alerts Endpoints and Recipients
- All Pools (this will also include all the previous items, as this depends on them)
diff --git a/doc/src/web_gui/index.rst b/doc/src/web_gui/index.rst
index 7aaafb66e9..57cb371c9f 100644
--- a/doc/src/web_gui/index.rst
+++ b/doc/src/web_gui/index.rst
@@ -61,7 +61,7 @@ Each individual menu bar entry will be discussed below.
historical
report
flows
- user_scripts
+ checks
categories
hosts
host_details
diff --git a/doc/src/web_gui/user_scripts.rst b/doc/src/web_gui/user_scripts.rst
deleted file mode 100644
index 978e4a341d..0000000000
--- a/doc/src/web_gui/user_scripts.rst
+++ /dev/null
@@ -1,101 +0,0 @@
-.. _WebUIUserScripts:
-
-User Scripts
-############
-
-User scripts process network elements and perform actions such as triggering alerts. Creating user scripts is discussed in detail in :ref:`User Scripts`. This section describes how users scripts can be enabled and disabled, configured, and applied to network elements such as hosts and flows.
-
-User scripts can be configured from any interface, from the menu `Settings->User Scripts`.
-
-.. figure:: ../img/web_gui_user_scripts.png
- :align: center
- :alt: User Scripts Settings
-
- User Scripts Settings
-
-Configuring a user script means:
-
-- Choosing the network elements the script is going to be executed for.
-- Enabling/disabling it.
-- Setting its configuration values.
-
-`Configurations` are used to accomplish this.
-
-Configurations
---------------
-
-User scripts are configured by means of `Configurations`. A `Default` configuration is always present. The `Default` configuration is used to configure:
-
-- SNMP devices user scripts.
-- Global system-wide user scripts.
-
-The default configuration is also applied to:
-
-- Any host of every interface.
-- Any flow of every interface.
-- Any interface.
-- Any local network defined.
-
-Additional configurations can be created to limit the scope of their application. This means any additional configurations can be applied to:
-
-- Any subset of hosts of every interface.
-- Any flow of a subset of the active interfaces.
-- A subset of the active interfaces.
-- A subset of the defined local networks.
-
-The scope of application is shown in column `Applied To`. The Default configuration is `Applied to` any network element which is not included in any other configuration.
-
-Creating New Configurations
-~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-New configurations can be created by `cloning` the default or any other existing configuration. To clone a configuration select the `clone` button in the `Actions` column. The cloned configuration has user scripts configurations which are equal to the configuration it has been cloned from.
-
-A newly cloned configuration shows a message `Warning: this config is not applied to any specific target!` in the `Applied To` column. Clicking on the `edit` button in the `Actions` column allows to specify the scope of application:
-
-- Under `Hosts`, a comma separated list of IPv4 and IPv6 CIDR prefixes can be specified to choose to which hosts the configuration is going to be applied. Hosts matching these prefixes will have this configuration applied. The longest-match principle holds. When an host matches multiple configurations, the one with the longest-match is chosen for application to the host. Prefixes are applied to hosts in any interface.
-- Under `Interfaces` and `flows`, a multi-selection allows to choose to which interfaces the configuration is going to be applied.
-- Under `Local Networks`, a multi-selections allows to choose to which local networks the configuration is going to be applied.
-
-An example of three configurations is shown in the image:
-
-.. figure:: ../img/web_gui_user_scripts_configurations.png
- :align: center
- :alt: User Scripts Configurations
-
- User Scripts Configurations
-
-In the image there are two configurations `Guests` and `IT Department`, in addition to the `Default` configuration. `Guests` is applied to all hosts matching `10.10.0.0/16`, whereas `IT Department` applies to all hosts matching `10.20.0.0/16`. Hosts not matching any of the two prefixes will have the `Default` configuration applied.
-
-As user scripts can be controlled on a per-configuration basis:
-
-- `Guests` can have certain user scripts enabled. The same user scripts can be disabled for `IT Department`.
-- `Guests` can have certain user scripts configuration values (such as thresholds) which are different from those configured for `IT Department`.
-
-User scripts configuration values can be controlled using button `Edit` from the `Actions` column.
-
-Editing Configurations
-~~~~~~~~~~~~~~~~~~~~~~
-
-User scripts configurations can be edited for any of the configurable network elements. The edit page shows three tabs, namely `All`, `Enabled`, and `Disabled` to give immediate access to the whole list of user scripts, or to limit the view to only those that are enabled or disabled.
-
-.. figure:: ../img/web_gui_user_scripts_configurations_edit.png
- :align: center
- :alt: User Scripts Configuration Edit
-
- User Scripts Configuration Edit
-
-A user script can be enabled or disabled by clicking the corresponding button under the `Actions` column. Certain user scripts can also have their values configured. In this case, an extra button `Edit` becomes available under the `Actions` column. For example, the traffic alert user script can be edited as follows:
-
-
-.. figure:: ../img/web_gui_user_scripts_configurations_edit_traffic.png
- :align: center
- :alt: User Scripts Configuration Edit Traffic Alert
-
- User Scripts Configuration Edit Traffic Alert
-
-Resetting, Importing and Exporting Configurations
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-All existing configurations can be imported and exported in bulk, to ease backup, restore, and replication across multiple machines. Buttons to perform this task are available below the configuration list. Button `Export Configuration` allows to download a JSON file, whereas button `Import Configuration` accepts a previously downloaded JSON file to load the configurations. `Reset Configuration` cleans up any existing configuration on the current system.
-
-
diff --git a/httpdocs/js/config_callbacks/config-list-utils.js b/httpdocs/js/config_callbacks/config-list-utils.js
index 8163fa13b9..f0a50aa852 100644
--- a/httpdocs/js/config_callbacks/config-list-utils.js
+++ b/httpdocs/js/config_callbacks/config-list-utils.js
@@ -114,7 +114,7 @@ $(function() {
}
},
ajax: {
- url: `${http_prefix}/lua/get_scripts_configsets.lua?check_subdir=${subdir}`,
+ url: `${http_prefix}/lua/get_checks_configsets.lua?check_subdir=${subdir}`,
type: 'GET',
dataSrc: ''
},
diff --git a/httpdocs/misc/ntopng-utils-manage-updates.in b/httpdocs/misc/ntopng-utils-manage-updates.in
index 2af2111b7a..0596f3e75c 100644
--- a/httpdocs/misc/ntopng-utils-manage-updates.in
+++ b/httpdocs/misc/ntopng-utils-manage-updates.in
@@ -223,11 +223,14 @@ function run_upgrade() {
${APT_GET} update
# Install
- ${APT_GET} upgrade --assume-yes --fix-broken --allow-unauthenticated --with-new-pkgs ${PRODUCT}
+ #${APT_GET} upgrade --assume-yes --fix-broken --allow-unauthenticated --with-new-pkgs ${PRODUCT}
+ # Note: using install instead of upgrade to avoid blocking the installation due to 'kept back' packages
+ ${APT_GET} install --assume-yes --fix-broken --allow-unauthenticated ${PRODUCT}
RESULT=$?
# Check if installation is successful (we do not trust $?)
- NTOPNG_VERSION=$(${APT_GET} --just-print upgrade 2>&1 | grep "Inst ${PRODUCT} " | cut -d'(' -f2 | cut -d' ' -f1)
+ #NTOPNG_VERSION=$(${APT_GET} --just-print upgrade 2>&1 | grep "Inst ${PRODUCT} " | cut -d'(' -f2 | cut -d' ' -f1)
+ NTOPNG_VERSION=$(${APT_GET} --just-print install ${PRODUCT} 2>&1 | grep "Inst ${PRODUCT} " | cut -d'(' -f2 | cut -d' ' -f1)
if [ -z "${NTOPNG_VERSION}" ]; then
RESULT=0
fi
@@ -277,12 +280,14 @@ function check_updates() {
${APT_GET} update -o Dir::Etc::sourcelist="sources.list.d/${APT_SOURCE}" -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0"
# Check for broken packages
- ${APT_GET} --just-print upgrade >/dev/null 2>&1
+ #${APT_GET} --just-print upgrade >/dev/null 2>&1
+ ${APT_GET} --just-print install ${PRODUCT} >/dev/null 2>&1
if [ ! $? -eq 0 ]; then
# Something went wrong, trying to fix it
${APT_GET} --assume-yes --fix-broken install
- ${APT_GET} --just-print upgrade >/dev/null 2>&1
+ #${APT_GET} --just-print upgrade >/dev/null 2>&1
+ ${APT_GET} --just-print install ${PRODUCT} >/dev/null 2>&1
fi
if [ ! $? -eq 0 ]; then
@@ -290,7 +295,9 @@ function check_updates() {
${REDIS_CLI} ${REDIS_CLI_OPT} SET ${REDIS_UPDATE_FAILURE_KEY} "update-failure" >/dev/null 2>&1
else
# Check update and get version
- NTOPNG_VERSION=$(${APT_GET} --just-print --assume-yes --with-new-pkgs upgrade 2>&1 | grep "Inst ${PRODUCT} " | cut -d'(' -f2 | cut -d' ' -f1)
+ #NTOPNG_VERSION=$(${APT_GET} --just-print --assume-yes --with-new-pkgs upgrade 2>&1 | grep "Inst ${PRODUCT} " | cut -d'(' -f2 | cut -d' ' -f1)
+ # Note: using install instead of upgrade to handle 'kept back' packages
+ NTOPNG_VERSION=$(${APT_GET} --just-print --assume-yes install ${PRODUCT} 2>&1 | grep "Inst ${PRODUCT} " | cut -d'(' -f2 | cut -d' ' -f1)
RESULT=0
fi
else
diff --git a/include/Flow.h b/include/Flow.h
index da3a1f9244..1c3de889e5 100644
--- a/include/Flow.h
+++ b/include/Flow.h
@@ -79,7 +79,7 @@ class Flow : public GenericHashEntry {
#ifdef NTOPNG_PRO
bool ingress2egress_direction;
u_int8_t routing_table_id;
- bool lateral_movement, create_or_delete;
+ bool lateral_movement;
#ifndef HAVE_NEDGE
FlowProfile *trafficProfile;
#else
@@ -346,9 +346,7 @@ class Flow : public GenericHashEntry {
#ifdef NTOPNG_PRO
inline bool isLateralMovement() const { return(lateral_movement); }
- inline bool isCreateOrDelete() const { return(create_or_delete); }
inline void setLateralMovement(bool change) { lateral_movement = change; }
- inline void setCreateOrDelete(bool change) { create_or_delete = change; }
#endif
inline bool isCliDeviceAllowedProtocol() const {
diff --git a/include/NetworkInterface.h b/include/NetworkInterface.h
index 95917d1b03..08a08dae31 100644
--- a/include/NetworkInterface.h
+++ b/include/NetworkInterface.h
@@ -636,8 +636,10 @@ class NetworkInterface : public NetworkInterfaceAlertableEntity {
inline float getThroughputPps() { return pkts_thpt.getThpt(); };
#if defined(NTOPNG_PRO) && !defined(HAVE_NEDGE)
inline ServiceMap* getServiceMap() { return(sMap); };
+ inline bool isServiceMapEnabled() { return(sMap ? true : false); };
inline void flushServiceMap() { if(sMap) sMap->flush(); };
inline PeriodicityMap* getPeriodicityMap() { return(pMap); };
+ inline bool isPeriodicityMapEnabled() { return(pMap ? true : false); };
inline void flushPeriodicityMap() { if(pMap) pMap->flush(); };
void updateFlowPeriodicity(Flow *f);
void updateServiceMap(Flow *f);
diff --git a/include/flow_alerts/LateralMovementAlert.h b/include/flow_alerts/LateralMovementAlert.h
index f1eb4361f5..bdbd381725 100644
--- a/include/flow_alerts/LateralMovementAlert.h
+++ b/include/flow_alerts/LateralMovementAlert.h
@@ -25,9 +25,6 @@
#include "ntop_includes.h"
class LateralMovementAlert : public FlowAlert {
- private:
- ndpi_serializer* getAlertJSON(ndpi_serializer* serializer);
-
public:
static FlowAlertType getClassType() { return { flow_alert_lateral_movement, alert_category_network }; }
static u_int8_t getDefaultScore() { return SCORE_LEVEL_NOTICE; };
diff --git a/scripts/locales/en.lua b/scripts/locales/en.lua
index f0ab2d57e0..842d919319 100644
--- a/scripts/locales/en.lua
+++ b/scripts/locales/en.lua
@@ -26,6 +26,8 @@ local lang = {
["as_number"] = "AS number",
["asn"] = "ASN",
["attacker"] = "Is Attacker",
+ ["asn_id"] = "ASN %{id}",
+ ["network_id"] = "Network %{id}",
["autolayout_description"] = "Performing auto-layout could change the network's current layout drastically.",
["availability"] = "Availability",
["available"] = "Available",
@@ -507,6 +509,11 @@ local lang = {
["score_as_server"] = "Score Behaviour as Server",
},
},
+ ["alert_behaviors"] = {
+ ["score_behavior"] = "Score",
+ ["traffic_tx_behavior"] = "Traffic TX",
+ ["traffic_rx_behavior"] = "Traffic RX",
+ },
["alert_entities"] = {
["am_host"] = "Active Monitoring",
["flow"] = "Flow",
@@ -535,7 +542,7 @@ local lang = {
["device_has_disconnected"] = "The device %{device} has disconnected from the network.",
["flow_flood_attacker"] = "%{entity}%{host_category} is a flow flooder [%{value} > %{threshold} client flows/sec for ~3 sec]",
["flow_flood_victim"] = "%{entity}%{host_category} is under flow flood attack [%{value} > %{threshold} server flows/sec for ~3 sec]",
- ["flow_number_anomaly"] = "Detected %{role} flow number anomaly for host %{host}",
+ ["flow_number_anomaly"] = "%{role} Flows: %{value}[Expected Range: %{lower_bound} ... %{upper_bound}]",
["host_alert_dangerous_host"] = "Score limit exceeded by %{entity}. Dangerous host [Score: %{score}][Duration: %{duration} mins]",
["host_alert_dns_server_contacts"] = "Too many DNS servers contacted by %{entity} [%{value} > %{threshold} servers]",
["host_alert_dns_traffic"] = "DNS traffic exceeded by %{entity} [%{value} %{op} %{threshold}]",
@@ -582,7 +589,7 @@ local lang = {
["proto_time_quotas"] = "%{proto} time",
["remote_to_local_insecure_proto"] = "Remote to Local Insecure Protocol [Category: %{ndpi_category}][Breed: %{ndpi_breed}]",
["remote_to_remote"] = "Remote %{entity}%{host_category} contacted a remote host",
- ["score_number_anomaly"] = "Detected score anomaly as %{role} [Score: %{score}][Lower Bound: %{lower_bound}][Upper Bound: %{upper_bound}][Cybersecurity Score: %{security}% | Network Score: %{network}%]",
+ ["score_number_anomaly"] = "%{role} Score: %{score}[Expected Range: %{lower_bound} ... %{upper_bound}]",
["shell_script_executed"] = "Shell script '%{script_exec_comm}' executed in response of an alert: '%{alert_type}'",
["slow_periodic_activity"] = "Periodic activity \"%{script}\" running for too long [more than %{max_duration}] or executed too late (blocked in queue).",
["slow_purge"] = "Hash table idle entries purging on %{iface} is too slow. This could lead to high memory utilization, data accuracy loss and missing alerts. [%{idle}%% > %{max_idle}%%]",
@@ -618,6 +625,8 @@ local lang = {
["alert_severity"] = "Severity",
["alert_snmp_device_reset_description"] = "SNMP device %{device} has been restarted",
["alert_snmp_device_reset_title"] = "SNMP Device Restart",
+ ["alert_unexpected_behavior_description"] = "Trigger an alert when an unexpected behavior is identified from the %{type}",
+ ["alert_unexpected_behavior_title"] = "Unexpected %{type} Behavior",
["alert_snmp_interface_mac_changed_description"] = "MAC %{mac} seen on SNMP device %{device} interface %{port} previously seen on SNMP device %{prev_device} interface %{prev_port}",
["alert_snmp_interface_mac_changed_title"] = "SNMP Interface MAC Changed",
["alert_type"] = "Type",
@@ -700,6 +709,7 @@ local lang = {
["last_hour"] = "Last Hour",
["last_minute"] = "Last Minute",
["lateral_movement"] = "Lateral Movement",
+ ["lateral_movement_descr"] = "Service Map change detected %{info}. Click the bell below to jump to it %{href}",
["list_download_failed"] = "List Download Failed",
["list_download_succeeded"] = "List Download Succeeded",
["local_only"] = "Local Hosts Only",
@@ -828,6 +838,7 @@ local lang = {
["total_alerts"] = "Total Alerts",
["trailing_msg"] = "Time Window",
["trailing_msg_compact"] = "Window",
+ ["unexpected_behavior_anomaly_description"] = "%{entity} %{href} [%{type_of_behaviour}: %{value} | Expected Range: %{lower_bound} ... %{upper_bound}]",
["unexpected_host_behavior_description"] = "%{host} [%{type_of_behaviour}][Value: %{value}][Expected Range: %{lower_bound} ... %{upper_bound}]",
["unexpected_host_behaviour_act_flows_title"] = "Unexpected Host Active Flows Behaviour",
["unexpected_host_behaviour_contacts_title"] = "Unexpected Host Contacts Behaviour",
diff --git a/scripts/lua/admin/manage_configurations.lua b/scripts/lua/admin/manage_configurations.lua
index b004fa48db..00243680e5 100644
--- a/scripts/lua/admin/manage_configurations.lua
+++ b/scripts/lua/admin/manage_configurations.lua
@@ -22,14 +22,14 @@ if not ntop.isnEdge() then
all = {key = "all", label = i18n("manage_configurations.everything", {product = ntop.getInfo()["product"]}), order = 0 },
snmp = {key = "snmp", label = i18n("manage_configurations.snmp"), order = 1},
active_monitoring = {key = "active_monitoring", label = i18n("manage_configurations.active_monitoring"), order = 2},
- scripts = {key = "scripts", label = i18n("manage_configurations.checks"), order = 3},
+ checks = {key = "checks", label = i18n("manage_configurations.checks"), order = 3},
notifications = {key = "notifications", label = i18n("manage_configurations.notifications"), order = 4},
pool = {key = "pool", label = i18n("manage_configurations.pool_endpoint_recipients"), order = 5},
}
else
configuration_items = {
all = {key = "all", label = i18n("manage_configurations.everything", {product = ntop.getInfo()["product"]}), order = 0 },
- scripts = {key = "scripts", label = i18n("manage_configurations.checks"), order = 1},
+ checks = {key = "checks", label = i18n("manage_configurations.checks"), order = 1},
}
end
diff --git a/scripts/lua/flow_details.lua b/scripts/lua/flow_details.lua
index 6c4294b602..19ae7667a2 100644
--- a/scripts/lua/flow_details.lua
+++ b/scripts/lua/flow_details.lua
@@ -1320,25 +1320,23 @@ else
for _, score_alerts in pairsByKeys(alerts_by_score, rev) do
for _, score_alert in pairsByField(score_alerts, "message", asc) do
if first then
- print("| "..i18n("flow_details.flow_issues").." | ")
+ print(" |
|---|
| "..i18n("flow_details.flow_issues").." | "..i18n("description").." | "..i18n("actions").." |
")
first = false
end
- if score_alert.is_predominant then
- print(status_icon.." ")
- end
+ print(string.format(''))
- print(score_alert.message)
+ print(string.format('| %s %s | ', score_alert.message, score_alert.is_predominant and status_icon or ''))
if score_alert.alert_id then
- print(string.format(' ', score_alert.alert_id, score_alert.alert_label))
+ print(string.format(' | ', score_alert.alert_id, score_alert.alert_label))
+ else -- These are unhandled alerts, e.g., flow risks for which a check doesn't exist
+ print(string.format(' | '))
end
- print("
")
+ print('
')
end
end
-
- print("\n")
end
-- ######################################
@@ -1631,8 +1629,8 @@ print [[
const $type = $(`${alert.alert_label}`);
$(`#alerts_filter_dialog .alert_label`).text($type.text().trim());
- const cliLabel = "]] print(flowinfo2hostname(flow,"cli")) print[[";
- const srvLabel = "]] print(flowinfo2hostname(flow,"srv")) print[[";
+ const cliLabel = "]] local n = flowinfo2hostname(flow,"cli"); if n ~= flow["cli.ip"] then print(string.format("%s (%s)", n, flow["cli.ip"])) else print(n) end print[[";
+ const srvLabel = "]] local n = flowinfo2hostname(flow,"srv"); if n ~= flow["srv.ip"] then print(string.format("%s (%s)", n, flow["srv.ip"])) else print(n) end print[[";
$(`#cli_addr`).text(cliLabel);
$(`#cli_radio`).val("]] print(flow["cli.ip"]) print[[");
diff --git a/scripts/lua/get_scripts_configsets.lua b/scripts/lua/get_checks_configsets.lua
similarity index 100%
rename from scripts/lua/get_scripts_configsets.lua
rename to scripts/lua/get_checks_configsets.lua
diff --git a/scripts/lua/modules/alert_definitions/flow/alert_behavior_anomaly.lua b/scripts/lua/modules/alert_definitions/flow/alert_behavior_anomaly.lua
new file mode 100644
index 0000000000..c7273d372e
--- /dev/null
+++ b/scripts/lua/modules/alert_definitions/flow/alert_behavior_anomaly.lua
@@ -0,0 +1,65 @@
+--
+-- (C) 2019-21 - ntop.org
+--
+
+-- ##############################################
+
+local other_alert_keys = require "other_alert_keys"
+local classes = require "classes"
+local alert = require "alert"
+
+-- ##############################################
+
+local alert_behavior_anomaly = classes.class(alert)
+
+local i18n_title = i18n("alerts_dashboard.alert_unexpected_behavior_title", {type = ""})
+
+-- ##############################################
+
+alert_behavior_anomaly.meta = {
+ alert_key = other_alert_keys.alert_behavior_anomaly,
+ i18n_title = i18n_title,
+ icon = "fas fa-fw fa-exclamation",
+}
+
+-- ##############################################
+
+-- @brief Prepare an alert table used to generate the alert
+-- @param value The value got from the measurement
+-- @param lower_bound The lower bound of the measurement
+-- @param upper_bound The upper bound of the measurement
+-- @return A table with the alert built
+function alert_behavior_anomaly:init(entity, type_of_behaviour, value, upper_bound, lower_bound)
+ -- Call the parent constructor
+ self.super:init()
+
+ self.alert_type_params = {
+ entity = entity,
+ type_of_behaviour = type_of_behaviour,
+ value = value,
+ upper_bound = upper_bound,
+ lower_bound = lower_bound,
+ }
+end
+
+-- #######################################################
+
+-- @brief Format an alert into a human-readable string
+-- @param ifid The integer interface id of the generated alert
+-- @param alert The alert description table, including alert data such as the generating entity, timestamp, granularity, type
+-- @param alert_type_params Table `alert_type_params` as built in the `:init` method
+-- @return A human-readable string
+function alert_behavior_anomaly.format(ifid, alert, alert_type_params)
+ return(i18n("alerts_dashboard.unexpected_behavior_anomaly_description",
+ {
+ entity = alert_type_params.entity,
+ type_of_behaviour = alert_type_params.type_of_behaviour,
+ value = alert_type_params.value,
+ lower_bound = alert_type_params.lower_bound or 0,
+ upper_bound = alert_type_params.upper_bound or 0,
+ }))
+end
+
+-- #######################################################
+
+return alert_behavior_anomaly
\ No newline at end of file
diff --git a/scripts/lua/modules/alert_definitions/flow/alert_lateral_movement.lua b/scripts/lua/modules/alert_definitions/flow/alert_lateral_movement.lua
index 0949ea7e7b..6dfe92fee1 100644
--- a/scripts/lua/modules/alert_definitions/flow/alert_lateral_movement.lua
+++ b/scripts/lua/modules/alert_definitions/flow/alert_lateral_movement.lua
@@ -40,30 +40,22 @@ end
-- @param alert_type_params Table `alert_type_params` as built in the `:init` method
-- @return A human-readable string
function alert_lateral_movement.format(ifid, alert, alert_type_params)
- local vlan_id = tonumber(alert.vlan_id) or 0
- local client = {host = alert.cli_ip, vlan = vlan_id}
- local server = {host = alert.srv_ip, vlan = vlan_id}
+ -- Extracting info field
local info = ""
+ local href = ""
if alert.json then
info = json.decode(alert["json"])
- if info["info"] then
- info = info["info"]
+ if not isEmptyString(info["info"]) then
+ info = "[" .. info["info"] .. "]"
else
info = ""
end
end
- local rsp = hostinfo2detailshref(client, nil, hostinfo2label(client))..
- " " ..
- hostinfo2detailshref(server, nil, hostinfo2label(server))
+ href = ''
- rsp = rsp .. " ["..interface.getnDPIProtoName(alert.l7_proto).."]"
- if not isEmptyString(info) then
- rsp = rsp .. "[" .. info .. "]"
- end
-
- return(rsp)
+ return(i18n("alerts_dashboard.lateral_movement_descr", { info = info, href = href }))
end
-- #######################################################
diff --git a/scripts/lua/modules/alert_definitions/host/host_alert_flow_anomaly.lua b/scripts/lua/modules/alert_definitions/host/host_alert_flow_anomaly.lua
index e61057892c..fc071bd9e4 100644
--- a/scripts/lua/modules/alert_definitions/host/host_alert_flow_anomaly.lua
+++ b/scripts/lua/modules/alert_definitions/host/host_alert_flow_anomaly.lua
@@ -46,28 +46,24 @@ end
-- @param alert_type_params Table `alert_type_params` as built in the `:init` method
-- @return A human-readable string
function host_alert_flow_anomaly.format(ifid, alert, alert_type_params)
- local alert_consts = require("alert_consts")
- local json = json.decode(alert.json)
- local is_both = alert_type_params["is_both"]
- local is_client_alert = alert_type_params["is_client_alert"]
- local role
- local host = alert_consts.formatHostAlert(ifid, alert["ip"], alert["vlan_id"])
+ local is_both = alert_type_params["is_both"]
+ local is_client_alert = alert_type_params["is_client_alert"]
+ local role
- if(is_both) then
- role = "client and server"
- elseif(is_client_alert) then
- role = "client"
- else
- role = "server"
- end
+ if(is_both) then
+ role = i18n("client_and_server")
+ elseif(is_client_alert) then
+ role = i18n("client")
+ else
+ role = i18n("server")
+ end
- return i18n("alert_messages.flow_number_anomaly", {
- role = role,
- host = host,
- value = alert_type_params["value"],
- lower_bound = alert_type_params["lower_bound"],
- upper_bound = alert_type_params["upper_bound"],
- })
+ return i18n("alert_messages.flow_number_anomaly", {
+ role = role,
+ value = alert_type_params["value"],
+ lower_bound = alert_type_params["lower_bound"],
+ upper_bound = alert_type_params["upper_bound"],
+ })
end
-- #######################################################
diff --git a/scripts/lua/modules/alert_definitions/host/host_alert_score_anomaly.lua b/scripts/lua/modules/alert_definitions/host/host_alert_score_anomaly.lua
index 24a2464945..7c6caee2ba 100644
--- a/scripts/lua/modules/alert_definitions/host/host_alert_score_anomaly.lua
+++ b/scripts/lua/modules/alert_definitions/host/host_alert_score_anomaly.lua
@@ -81,18 +81,13 @@ function host_alert_score_anomaly.format(ifid, alert, alert_type_params)
local is_both = alert_type_params["is_both"]
local role
local host = alert_consts.formatHostAlert(ifid, alert["ip"], alert["vlan_id"])
- local sec_cat = 0
- local net_cat = 0
if(is_both) then
role = i18n("client_and_server")
- net_cat, sec_cat = get_problematic_category(alert_type_params, true)
elseif(is_client_alert) then
role = i18n("client")
- net_cat, sec_cat = get_problematic_category(alert_type_params, nil, "client")
else
role = i18n("server")
- net_cat, sec_cat = get_problematic_category(alert_type_params, nil, "server")
end
return i18n("alert_messages.score_number_anomaly", {
@@ -101,8 +96,6 @@ function host_alert_score_anomaly.format(ifid, alert, alert_type_params)
score = alert_type_params["value"],
lower_bound = alert_type_params["lower_bound"],
upper_bound = alert_type_params["upper_bound"],
- network = net_cat,
- security = sec_cat,
})
end
diff --git a/scripts/lua/modules/alert_exclusions.lua b/scripts/lua/modules/alert_exclusions.lua
index 1c2de59bf8..71dcbca403 100644
--- a/scripts/lua/modules/alert_exclusions.lua
+++ b/scripts/lua/modules/alert_exclusions.lua
@@ -316,6 +316,22 @@ end
-- ##############################################
+-- @brief Import a previously `export`ed exclusions configuration
+function alert_exclusions.import(exclusions)
+ _set_configured_alert_exclusions(exclusions)
+end
+
+-- ##############################################
+
+-- @brief Exports the current configuration
+function alert_exclusions.export()
+ local exclusions = _get_configured_alert_exclusions()
+
+ return exclusions
+end
+
+-- ##############################################
+
-- @brief Delete all alert_exclusions
function alert_exclusions.cleanup()
local locked = _lock()
diff --git a/scripts/lua/modules/alert_utils.lua b/scripts/lua/modules/alert_utils.lua
index 25097a77f7..03a73626fb 100644
--- a/scripts/lua/modules/alert_utils.lua
+++ b/scripts/lua/modules/alert_utils.lua
@@ -777,4 +777,28 @@ function alert_utils.notify_ntopng_stop()
return(notify_ntopng_status(false))
end
+function alert_utils.formatBehaviorAlert(params, anomalies, stats, id, subtype)
+ -- Cycle throught the behavior stats
+ for anomaly_type, anomaly in pairs(anomalies) do
+ local alert = alert_consts.alert_types.alert_behavior_anomaly.new(
+ i18n(subtype .. "_id", {id = id}),
+ i18n("alert_behaviors." .. anomaly_type),
+ stats[anomaly_type]["value"],
+ stats[anomaly_type]["lower_bound"],
+ stats[anomaly_type]["upper_bound"]
+ )
+
+ alert:set_score_warning()
+ alert:set_granularity(params.granularity)
+ alert:set_subtype(subtype .. "_" .. id)
+
+ -- Trigger an alert if an anomaly is found
+ if anomaly == true then
+ alert:trigger(params.alert_entity, nil, params.cur_alerts)
+ else
+ alert:release(params.alert_entity, nil, params.cur_alerts)
+ end
+ end
+end
+
return alert_utils
diff --git a/scripts/lua/modules/import_export/scripts_import_export.lua b/scripts/lua/modules/import_export/checks_import_export.lua
similarity index 73%
rename from scripts/lua/modules/import_export/scripts_import_export.lua
rename to scripts/lua/modules/import_export/checks_import_export.lua
index 6ebfca16a2..250c0fe08d 100644
--- a/scripts/lua/modules/import_export/scripts_import_export.lua
+++ b/scripts/lua/modules/import_export/checks_import_export.lua
@@ -8,28 +8,29 @@ require "lua_utils"
local import_export = require "import_export"
local json = require "dkjson"
local checks = require "checks"
+local alert_exclusions = require "alert_exclusions"
local rest_utils = require "rest_utils"
-- ##############################################
-local scripts_import_export = {}
+local checks_import_export = {}
-- ##############################################
-function scripts_import_export:create(args)
+function checks_import_export:create(args)
-- Instance of the base class
- local _scripts_import_export = import_export:create()
+ local _checks_import_export = import_export:create()
-- Subclass using the base class instance
self.key = "scripts"
-- self is passed as argument so it will be set as base class metatable
-- and this will actually make it possible to override functions
- local _scripts_import_export_instance = _scripts_import_export:create(self)
+ local _checks_import_export_instance = _checks_import_export:create(self)
-- Compute
-- Return the instance
- return _scripts_import_export_instance
+ return _checks_import_export_instance
end
-- ##############################################
@@ -37,7 +38,7 @@ end
-- @brief Import configuration
-- @param conf The configuration to be imported
-- @return A table with a key "success" set to true is returned on success. A key "err" is set in case of failure, with one of the errors defined in rest_utils.consts.err.
-function scripts_import_export:import(conf)
+function checks_import_export:import(conf)
local res = {}
if table.empty(conf) then
@@ -45,7 +46,7 @@ function scripts_import_export:import(conf)
return res
end
- local config_set = conf["0"]
+ local config_set = conf[tostring(checks.DEFAULT_CONFIGSET_ID)]
if config_set == nil then
res.err = rest_utils.consts.err.bad_content
@@ -62,6 +63,12 @@ function scripts_import_export:import(conf)
end
if not res.err then
+
+ -- Import exclusions (if present)
+ if conf["alert_exclusions"] then
+ alert_exclusions.import(conf["alert_exclusions"])
+ end
+
res.success = true
end
@@ -72,10 +79,11 @@ end
-- @brief Export configuration
-- @return The current configuration
-function scripts_import_export:export()
+function checks_import_export:export()
local conf = {}
conf[checks.DEFAULT_CONFIGSET_ID] = checks.getConfigset()
+ conf["alert_exclusions"] = alert_exclusions.export()
return conf
end
@@ -83,10 +91,10 @@ end
-- ##############################################
-- @brief Reset configuration
-function scripts_import_export:reset()
+function checks_import_export:reset()
checks.resetConfigset()
end
-- ##############################################
-return scripts_import_export
+return checks_import_export
diff --git a/scripts/lua/rest/v1/export/scripts/config.lua b/scripts/lua/rest/v1/export/checks/config.lua
similarity index 87%
rename from scripts/lua/rest/v1/export/scripts/config.lua
rename to scripts/lua/rest/v1/export/checks/config.lua
index 0cf3ae2bc3..83e8ff1e22 100644
--- a/scripts/lua/rest/v1/export/scripts/config.lua
+++ b/scripts/lua/rest/v1/export/checks/config.lua
@@ -7,7 +7,7 @@ package.path = dirs.installdir .. "/scripts/lua/modules/import_export/?.lua;" ..
require "lua_utils"
-local scripts_import_export = require "scripts_import_export"
+local checks_import_export = require "checks_import_export"
local json = require "dkjson"
local rest_utils = require "rest_utils"
local import_export_rest_utils = require "import_export_rest_utils"
@@ -27,6 +27,6 @@ if not haveAdminPrivileges() then
end
local instances = {}
-instances["scripts"] = scripts_import_export:create()
+instances["scripts"] = checks_import_export:create()
import_export_rest_utils.export(instances, not isEmptyString(download))
diff --git a/scripts/lua/rest/v1/export/pool/config.lua b/scripts/lua/rest/v1/export/pool/config.lua
index 0a010b3ae1..3524333106 100644
--- a/scripts/lua/rest/v1/export/pool/config.lua
+++ b/scripts/lua/rest/v1/export/pool/config.lua
@@ -11,7 +11,7 @@ local snmp_import_export = require "snmp_import_export"
local plugins_utils = require("plugins_utils")
local am_import_export = plugins_utils.loadModule("active_monitoring", "am_import_export")
local notifications_import_export = require "notifications_import_export"
-local scripts_import_export = require "scripts_import_export"
+local checks_import_export = require "checks_import_export"
local pool_import_export = require "pool_import_export"
local json = require "dkjson"
local rest_utils = require "rest_utils"
@@ -36,7 +36,7 @@ local instances = {}
instances["snmp"] = snmp_import_export:create()
instances["active_monitoring"] = am_import_export:create()
instances["notifications"] = notifications_import_export:create()
-instances["scripts"] = scripts_import_export:create()
+instances["scripts"] = checks_import_export:create()
instances["pool"] = pool_import_export:create()
import_export_rest_utils.export(instances, not isEmptyString(download))
diff --git a/scripts/lua/rest/v1/get/scripts/.dontdelete b/scripts/lua/rest/v1/get/checks/.dontdelete
similarity index 100%
rename from scripts/lua/rest/v1/get/scripts/.dontdelete
rename to scripts/lua/rest/v1/get/checks/.dontdelete
diff --git a/scripts/lua/rest/v1/get/scripts/config.lua b/scripts/lua/rest/v1/get/checks/config.lua
similarity index 86%
rename from scripts/lua/rest/v1/get/scripts/config.lua
rename to scripts/lua/rest/v1/get/checks/config.lua
index bb6e4f3c70..96fe83ef09 100644
--- a/scripts/lua/rest/v1/get/scripts/config.lua
+++ b/scripts/lua/rest/v1/get/checks/config.lua
@@ -9,7 +9,7 @@ require "lua_utils"
local info = ntop.getInfo()
-local scripts_import_export = require "scripts_import_export"
+local checks_import_export = require "checks_import_export"
local json = require ("dkjson")
local page_utils = require("page_utils")
local format_utils = require("format_utils")
@@ -30,8 +30,8 @@ if not haveAdminPrivileges() then
return
end
-local scripts_import_export = scripts_import_export:create()
-local res = scripts_import_export:export()
+local checks_import_export = checks_import_export:create()
+local res = checks_import_export:export()
if isEmptyString(download) then
rest_utils.answer(rest_utils.consts.success.ok, res)
diff --git a/scripts/lua/rest/v1/import/scripts/config.lua b/scripts/lua/rest/v1/import/checks/config.lua
similarity index 90%
rename from scripts/lua/rest/v1/import/scripts/config.lua
rename to scripts/lua/rest/v1/import/checks/config.lua
index 500e69a20b..d6b4da23bd 100644
--- a/scripts/lua/rest/v1/import/scripts/config.lua
+++ b/scripts/lua/rest/v1/import/checks/config.lua
@@ -7,7 +7,7 @@ package.path = dirs.installdir .. "/scripts/lua/modules/import_export/?.lua;" ..
require "lua_utils"
-local scripts_import_export = require "scripts_import_export"
+local checks_import_export = require "checks_import_export"
local json = require "dkjson"
local rest_utils = require "rest_utils"
local import_export_rest_utils = require "import_export_rest_utils"
@@ -39,7 +39,7 @@ end
local items = {}
-local scripts_ie = scripts_import_export:create()
+local scripts_ie = checks_import_export:create()
items[#items+1] = {
name = "scripts",
conf = modules["scripts"],
diff --git a/scripts/lua/rest/v1/import/pool/config.lua b/scripts/lua/rest/v1/import/pool/config.lua
index 8a7c53bdf2..d1100d3a05 100644
--- a/scripts/lua/rest/v1/import/pool/config.lua
+++ b/scripts/lua/rest/v1/import/pool/config.lua
@@ -11,7 +11,7 @@ local snmp_import_export = require "snmp_import_export"
local plugins_utils = require("plugins_utils")
local am_import_export = plugins_utils.loadModule("active_monitoring", "am_import_export")
local notifications_import_export = require "notifications_import_export"
-local scripts_import_export = require "scripts_import_export"
+local checks_import_export = require "checks_import_export"
local pool_import_export = require "pool_import_export"
local json = require "dkjson"
local rest_utils = require "rest_utils"
@@ -75,7 +75,7 @@ items[#items+1] = {
instance = notifications_ie
}
-local scripts_ie = scripts_import_export:create()
+local scripts_ie = checks_import_export:create()
items[#items+1] = {
name = "scripts",
conf = modules["scripts"],
diff --git a/scripts/lua/rest/v1/reset/scripts/config.lua b/scripts/lua/rest/v1/reset/checks/config.lua
similarity index 87%
rename from scripts/lua/rest/v1/reset/scripts/config.lua
rename to scripts/lua/rest/v1/reset/checks/config.lua
index 6fb3c61f0e..99afa9c2ce 100644
--- a/scripts/lua/rest/v1/reset/scripts/config.lua
+++ b/scripts/lua/rest/v1/reset/checks/config.lua
@@ -7,7 +7,7 @@ package.path = dirs.installdir .. "/scripts/lua/modules/import_export/?.lua;" ..
require "lua_utils"
-local scripts_import_export = require "scripts_import_export"
+local checks_import_export = require "checks_import_export"
local json = require "dkjson"
local rest_utils = require "rest_utils"
local import_export_rest_utils = require "import_export_rest_utils"
@@ -26,6 +26,6 @@ if not auth.has_capability(auth.capabilities.checks) then
end
local instances = {}
-instances["scripts"] = scripts_import_export:create()
+instances["scripts"] = checks_import_export:create()
import_export_rest_utils.reset(instances)
diff --git a/scripts/lua/rest/v1/reset/pool/config.lua b/scripts/lua/rest/v1/reset/pool/config.lua
index 17a0cdddf3..c8ef7572ba 100644
--- a/scripts/lua/rest/v1/reset/pool/config.lua
+++ b/scripts/lua/rest/v1/reset/pool/config.lua
@@ -11,7 +11,7 @@ local snmp_import_export = require "snmp_import_export"
local plugins_utils = require("plugins_utils")
local am_import_export = plugins_utils.loadModule("active_monitoring", "am_import_export")
local notifications_import_export = require "notifications_import_export"
-local scripts_import_export = require "scripts_import_export"
+local checks_import_export = require "checks_import_export"
local pool_import_export = require "pool_import_export"
local json = require "dkjson"
local rest_utils = require "rest_utils"
diff --git a/scripts/lua/rest/v1/set/scripts/.dontdelete b/scripts/lua/rest/v1/set/checks/.dontdelete
similarity index 100%
rename from scripts/lua/rest/v1/set/scripts/.dontdelete
rename to scripts/lua/rest/v1/set/checks/.dontdelete
diff --git a/scripts/lua/rest/v1/set/scripts/config.lua b/scripts/lua/rest/v1/set/checks/config.lua
similarity index 87%
rename from scripts/lua/rest/v1/set/scripts/config.lua
rename to scripts/lua/rest/v1/set/checks/config.lua
index 60c8c1d651..ba648bf762 100644
--- a/scripts/lua/rest/v1/set/scripts/config.lua
+++ b/scripts/lua/rest/v1/set/checks/config.lua
@@ -9,7 +9,7 @@ require "lua_utils"
local info = ntop.getInfo()
-local scripts_import_export = require "scripts_import_export"
+local checks_import_export = require "checks_import_export"
local json = require ("dkjson")
local page_utils = require("page_utils")
local format_utils = require("format_utils")
@@ -37,8 +37,8 @@ end
local data = json.decode(_POST["JSON"])
-local scripts_import_export = scripts_import_export:create()
-local res = scripts_import_export:import(data)
+local checks_import_export = checks_import_export:create()
+local res = checks_import_export:import(data)
if res.err then
rest_utils.answer(res.err)
diff --git a/scripts/lua/vlan_details.lua b/scripts/lua/vlan_details.lua
index c27305d1ba..9d8675451f 100644
--- a/scripts/lua/vlan_details.lua
+++ b/scripts/lua/vlan_details.lua
@@ -34,7 +34,7 @@ if vlan_id == nil or tonumber(vlan_id) == nil or tonumber(vlan_id) == 0 then
return
end
-if(not areVlanTimeseriesEnabled(ifId)) then
+if(not areVlanTimeseriesEnabled(ifId)) and (page ~= "config") then
print(" " .. i18n("vlan_details.no_available_stats_for_vlan_message",{vlan_id=vlan_id, product=info["product"]}).."
")
dofile(dirs.installdir .. "/scripts/lua/inc/footer.lua")
return
@@ -94,7 +94,7 @@ else
return
end
print[[
-