Commit graph

190 commits

Author SHA1 Message Date
Matteo Biscosi
a2099e7eb2 Fixes schema id switch in influx 2023-11-13 17:35:20 +00:00
Matteo Biscosi
104ea02c9e Fixes influxdb top stats 2023-11-10 10:30:37 +00:00
Matteo Biscosi
b10358277a Fixes timeseries charts timezone and removed no more used files 2023-11-08 17:37:17 +00:00
Matteo Biscosi
5d2be2af43 Fixes influxdb empty timeseries 2023-10-27 10:11:10 +00:00
Matteo Biscosi
05226b3bb9 Fixes traffic behavior total not working 2023-10-19 10:09:10 +00:00
Matteo Biscosi
80038a8faf Fixes ts partially seen (#7913) 2023-10-16 15:47:41 +00:00
Matteo Biscosi
71092a11df Added top flow exporter interfaces table and removed shortenstring from snmp 2023-07-17 09:50:24 +00:00
Matteo Biscosi
7f8e1c3a5b Fixes various charts issues (#7629) 2023-07-05 15:25:10 +00:00
Matteo Biscosi
090f281437 Fixes network charts 2023-06-30 13:48:57 +00:00
Matteo Biscosi
7efe9fb4dd Possible fix for nil timeseries (#7611) 2023-06-30 09:38:24 +00:00
Matteo Biscosi
75e14357b6 Fixes influxdb timeseries errors 2023-06-30 09:00:56 +00:00
Matteo Biscosi
1fdfb72899 Fixes id not working with influxdb 2023-06-28 16:06:14 +00:00
Matteo Biscosi
b06451bd31 Fixes influxdb querytotal not working 2023-06-01 16:23:46 +02:00
Matteo Biscosi
15dd277bab Fixes influxdb hosts timeseries 2023-05-30 08:12:23 +00:00
Nicolò Maio
fcb564b7c7
Handle end time on timeseries. (#7438) (#7466) 2023-05-29 15:20:11 +02:00
Matteo Biscosi
4a8eafc30d Fixes influxdb incorrect data 2023-05-24 16:41:01 +02:00
Matteo Biscosi
c6909f0748 Migrated front end chart timeseries library 2023-05-23 08:22:14 +00:00
Alfredo Cardigliano
ed2bf419bd Add Interface Throughput charts (bps and pps) 2023-04-24 16:57:46 +02:00
MatteoBiscosi
20107649e9 Fixes influxdb retention not updated (#7096) 2023-01-26 11:25:46 +01:00
MatteoBiscosi
6c9f571196 Separated the two data retentions 2022-03-31 16:39:58 +02:00
MatteoBiscosi
fa4e7bbc61 Doubled influxdb ts precision (#6307) 2022-03-14 11:26:37 +01:00
Luca Deri
0da4c556e7 InfluxDB export files are now writte in tmp/influxdb as with clickhouse 2022-02-01 21:41:52 +01:00
MatteoBiscosi
e92135e776 Reorganized periodic scripts 2021-12-28 15:41:28 +01:00
Simone Mainardi
3e5bd5b5ce Fixes InfluxDB attempts to always re-create retention policies
Addresses #5944
2021-11-22 17:20:08 +01:00
MatteoBiscosi
7d264efe7b Removed wrong assignement 2021-06-25 10:59:13 +02:00
MatteoBiscosi
6c9b183819 Fixed chart label wrongly formatted (#5552) 2021-06-25 10:57:01 +02:00
Simone Mainardi
0f5340e1a3 (C) update 2021-05-31 12:39:02 +02:00
Simone Mainardi
d45ab54934 Harmonizes scores for Lua-triggered alerts
Addresses #5315
2021-05-12 12:56:12 +02:00
Simone Mainardi
bbe6a3de37 Changes set_severity to set_score 2021-05-05 09:59:04 +02:00
Simone Mainardi
c7082a4647 Implements new alerts database and drilldown
alert store skeleton

Alert database type changes

Implement alert store for host alerts. All alert store skeletons.

Fix class method access

Enable tracing

Implements simple queries for host alerts

Implement flow alert store

Fixes escaping of INSERT queries

Flow alerts database schema fixes

Adds escaping for alert JSON in flows and hosts

Implements queries .select() for alerts store

Adds limit and offset to perform paginated queries

Adds new REST getter for flow alerts

Name changes alert_severity to severity, alert_json to json

Fixes alert message not shown

Implement active monitoring alerts store

Implements sort of queries in the new dataabase

Changes alert_type to alert_id

Implement mac alerts store

Fixes flow alert messages

Implement system alerts store

Implement snmp alert store

Add missing items to the flow alerts

Add missing items to the host alerts

Add missing items to the mac alerts

Implements COUNT aplerts api

Add device_name to snmp alerts

add flow alerts templates

updated gitignore

fix for missing order field

add families defined in `alert_store_schema.sql`

Reworks and simplifies alert store subclasses

Implements REST API to fetch alert timeseries

Fixes date in flow REST api

Host alert json fix

Add get/host/alert/list.lua

Move alert/list.lua to alert/past/list.lua

Add alert/past/list.lua for all alert families

Add entity_id to system table to identify the alert type based on <alert_id, entity_id>

Add missing field

Implements facilities to query engaged alerts via REST

Handle both historical and past alerts in alert/list.lua

Fix count

Update params of select_historical

Implement method to add family-specific filters

Add alert/ts.lua for all alert families

Implements facilities and REST endpoints to delete alerts

Implements ordering of alert queries

Fix add_order_by group_by

Rest API tests update

Tests output update

Remove debug trace

Use alert_id instead of type. Add more flow alert info.

Update http lint

Format obsolete tlv version alerts. Add more host info.

Add row_id to list of alerts

Fix selection of engaged alerts

Add test for mac alerts (bcast domains)

Removes attempt to format alerts as flow alerts

Fixes interface selection for active monitoring

Update test output with rest changes

Add more fields to be ignores

Set alert count to 1 for the time being

add bar timeseries chart

add apexcharts

improvements on timeseries bar chart

registered chart callbakcs

working on alert page

fix for date format

Fixes acrive monitoring REST API

Fixes alignment of grouped alert data

Additional fix for alert histogram

remove useless if

formatting alerts page

fixes on flows alert stats table

rename local networks to device

format host pagie in alert_stats

add tag support for hosts and flow

implemented single delete action

add release modal

Fixes format of threshold cross interface alerts

Fixes wrong increase of dropped alerts

Implements exclusion list for invalid dns queries

Reworks exclusions lists for hosts and flows

Addresses #5212
Addresses #5113

Adds host alert keys in host callbacks definitions

Adds alert ids to flow callbacks

fix for not working button (#5215)

Fixes reported timeseries name

removed any additional button inside chart's toolbar (#5200)

Add tables for interfaces, networks, users to the schema. Skeleton alert_store classes

fixed broken range picker layout in firefox (#5199)

Alert insert fixes

Add more info to network alerts

Add rest endpoint for interface, network, user alerts

Fix endpoint selection in alerts_stats

Unifies columns between engaged and past alerts

Fixes Missing mandatory 'alert_granularity'

Minor fixes for missing alert_severity

Fixes arithmetic on a nil value (field 'last_seen')

Fixes get/system/alert/list.lua

use tstamp for column names (#5221)

Implements host alert formatter

Add alerts_store format_record_common

Use common format_record for am, system alerts

Use common format_record for all alerts

Fixes formatting of alerts of all types

Fixes nil in function 'hostinfo2label'

fixes on disable modal

add pages for network, user and interface endpoint (#5224)

Set alert_entity in all classes

Unifies influxdb alerts into system alerts

Addresses #5224

Unifies process alerts into system alerts

Addresses #5224

Cleanup unused periodicActivityEntity

Unifies category lists alerts into system alerts

Addresses #5224

Aligns new alert enums

Addresses #5224

Fixes alert page links

Fixes insertion of interface alerts

Implement filters for Host alerts

Fixes active monitoring alerts not triggering

Implement filters on flow alerts

Fixes for internal alerts timestamp and subtype

implements disable for the alerts

formatted alert disable label

Add address and device type to mac alert records

fix for delete alert toggle

Fix access to entity_val in alert_unexpected_new_device

add mac address and device type inside table

Fixes for new alert fields not handled

Fixes alert_definitions to handle new fields

Add ip/port to snmp alert records

Implements deletion of stored flow alerts

Add alert_name to all alert records via rest. Fix duration.

fixes for snmp tab

Implements delete of past host alerts

Add name to snmp alert records

fixes on system tab

Fix Date column

fixes link

Update menu

Fixes bad argument #3 to 'format' in snmp alerts

updated interface link

new alerts url for host (#5228)

Fixes sort of engaged alert

Minor cleanup

Fixes data returned for local network alerts

Fix duration for one shot. Note.

Fix duration override

Fixes interface selection for system alerts

Move host alert page

fixes for local network tab

Minor fix

Fix engaged host alerts

fixes on user tab

Fix alert_user_activity message
2021-04-26 19:41:34 +02:00
Matteo Biscosi
101c53336e Migrates alerts to an object-oriented implementation 2020-12-23 11:46:26 +01:00
DasSkelett
14d89c3fdb
Fix nil check in isCompatibleVersion() (#4841)
While playing around with the timeseries feature I got the following exception when trying to use Telegraf's `inputs.influxdb_listener` as proxy to a Prometheus database.
```
...opng/scripts/lua/modules/timeseries/drivers/influxdb.lua:1643: attempt to index a nil value (local 'current')
```

`current` is likely supposed to be checked for nil earlier together with `required`, but instead of `current` the line is checking `version`, which isn't used anymore afterwards though.

So this commit changes the check from `version == nil` to `current == nil`.

Since then I've discovered that proxying Prometheus via Telegraf's `influxdb_listener` doesn't work anyways since ntopng also tries to read from it, but that's a different story.
2020-12-16 17:52:28 +01:00
Simone Mainardi
b3dc39c641 Refactors alert_severities into an independend Lua module 2020-11-30 15:28:17 +01:00
gabryon99
77d5fd9706 fixed regex for influxdb version 2020-06-23 09:44:52 +02:00
gabryon99
efe75bd55a add snmp3 username 2020-06-23 09:00:55 +02:00
emanuele-f
610e632234 Add comments/remove table.clone when not needed 2020-05-21 11:10:47 +02:00
Simone Mainardi
c41309f21e Fixes InfluxDB version check when headers are manipulated by HAProxy
Fixes #3964
2020-05-20 13:02:28 +02:00
Simone Mainardi
0f2ce04912 Fixes InfluxDB retention policies not updated upon retention changes
Fixes #3922
2020-05-13 14:25:46 +02:00
Simone Mainardi
290175b16f Refactors alrt builders into creators
Refactors builders into creators: calls
2020-04-27 15:53:56 +02:00
emanuele-f
00c5e9f909 Add ability to report resolved IP address for unreachable hosts 2020-04-27 15:46:03 +02:00
emanuele-f
2648ae372f Rename measure in metric for active monitoring ts
Closes #3837
2020-04-27 14:36:30 +02:00
emanuele-f
345b202975 Split 95th percentile by direction 2020-04-24 18:24:57 +02:00
Simone Mainardi
2739aac076 Implements alert builders for each alert definition
[AlertsK] Implements alert consts builder

[AlertsK] alert_threshold_cross.lua

[AlertsK] too_many_drops.lua

[AlertsK] alert_test_failed.lua

[AlertsK] alert_flows_flood.lua alert_tcp_syn_flood.lua lert_tcp_syn_scan.lua

[AlertsK] alert_snmp_topology_changed.lua

[AlertsK] snmp_device_reset.lua

[AlertsK] alert_slow_periodic_activity.lua

[AlertsK] alert_port_status_change.lua

[AlertsK] alert_port_status_change.lua

[AlertsK] alert_port_load_threshold_exceeded.lua

[AlertsK] alert_port_errors.lua

[AlertsK] alert_port_duplexstatus_change.lua

[AlertsK] alert_periodic_activity_not_executed.lua

[AlertsK] alert_misbehaving_flows_ratio.lua

[AlertsK] alert_influxdb_error.lua

[AlertsK] alert_influxdb_dropped_points.lua

[AlertsK] alert_dropped_alerts.lua

[AlertsK] alert_am_threshold_cross.lua

[AlertsK] alert_broadcast_domain_too_large.lua

[AlertsK] alert_device_connection.lua

[AlertsK] alert_device_connection.lua

[AlertsK] alert_host_pool_connection.lua alert_host_pool_disconnection.lua

[AlertsK] alert_ghost_network.lua

[AlertsK] alert_ip_outsite_dhcp_range.lua

[AlertsK] alert_list_download_failed.lua

[AlertsK] alert_login_failed.lua

[AlertsK] alert_mac_ip_association_change.lua

[AlertsK] alert_slow_purge.lua

[AlertsK] alert_request_reply_ratio.lua

[AlertsK] alert_quota_exceeded.lua

[AlertsK] alert_process_notification.lua

[AlertsK] alert_nfq_flushed.lua

[AlertsK] alert_misconfigured_app.lua alert_new_device.lua

[AlertsK] alert_influxdb_export_failure.lua

[AlertsK] alert_unresponsive_device.lua

[AlertsK] alert_user_activity.lua

[AlertsK] alert_user_script_calls_drops.lua

[AlertsK] minor fix
2020-04-24 15:35:44 +02:00
Simone Mainardi
a0612895fe Implements slow rrd checks and updates in C 2020-02-19 19:28:07 +01:00
Simone Mainardi
a7ea7f76ed Implements detection of slow timeseries append 2020-02-19 18:45:36 +01:00
Simone Mainardi
0e64fd94d6 Implements deadlines for periodic and user scripts 2020-02-18 18:44:41 +01:00
Simone Mainardi
00158e8bc2 Implements error handling in line protocol generation 2020-02-16 14:30:08 +01:00
Simone Mainardi
dacaa7e3db Migrates font-awesome 5 fa to fas 2019-12-18 11:50:02 +01:00
emanuele-f
e28d0ec755 Reduce the 1d aggregation visualization interface when 1h is disabled 2019-12-18 11:44:04 +01:00
emanuele-f
262fc931f6 Disable InfluxDB 1h data rollup to reduce db pressure 2019-12-18 11:31:31 +01:00