Commit graph

160 commits

Author SHA1 Message Date
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
emanuele-f
d86d58a80d Make InfluxDB query timeout configurable 2019-11-29 12:10:59 +01:00
emanuele-f
2a04c8fe35 Log influxdb queries in redis 2019-11-26 13:54:52 +01:00
emanuele-f
478c97b743 Inhibit some influxdb queries when the database does not respond
This reduces the gui loading time when such event occurs
2019-11-25 15:39:21 +01:00
emanuele-f
1fd65ac44c Flow user scripts enhancements
- Add title label in hash table utilization gauges
- List Hash Tables charts and Periodic Activities charts in a single page
- Replace Periodic Activities max duration column with time utilization percentage
- Add api to add a straight line in the charts
- Show max duration time as a straight line in Periodic Activities charts
- Move dropped flow calls charts to the Peridic Activities page
- Fix expert view number of calls 0
- Fix interface/host/network trigger alert label
- Move chart icon to separate column in redis and influxdb pages
- Fix interface menu selection in Hash Tables and Periodic Activities
- Highlight issues with a warning triangle in Hash Tables and Periodic Activities
- Fix some page navigation issues with extra_params
- Fix wrong schema graph options passed to nv_graph_utils
2019-11-20 20:09:45 +01:00
emanuele-f
4628ad3bcd Fix invalid upsampling due to missing points in composed charts 2019-11-14 20:03:43 +01:00
emanuele-f
8747af5f2b Reduce max queue length 2019-10-24 17:00:03 +02:00
emanuele-f
3882e2f26d Fix invalid failed exports key 2019-10-24 16:34:06 +02:00
emanuele-f
0d04eb2d5c Stop writing points if InfluxDB export is failing.
The dropped points are accounted and shown in the gui. Dropped points alert are generated as usual.

Fixes #2998
2019-10-24 16:09:01 +02:00
emanuele-f
10aa5542f8 Rework alertEntity functions to avoid modules circular dependencies
Fixes #2975
2019-10-23 13:01:57 +02:00
Simone Mainardi
002f1e7176 InfluxDB writes are now done with second precision
Implements #2935
2019-10-14 09:44:15 +02:00
Simone Mainardi
aa652145d0 Unifies flows, timeseries and top-talkers data retention
Implements #2897
2019-10-07 16:35:32 +02:00
Simone Mainardi
039034435b Prevents InfluxDB export retries on missing timeseries files
Fixes #2873
2019-09-27 10:18:25 +02:00
emanuele-f
907b260ece Fix for missing "other" series 2019-09-20 18:49:28 +02:00
emanuele-f
acac611c29 Add missing tags in last-timestamp check 2019-09-16 20:19:08 +02:00
emanuele-f
d29bb578c0 Add last-timestamp check to avoid adding invalid 0 points in the charts
The issue occurred in InfluxDB due to a delay between buffering and actual export.
This possible addresses #2853
2019-09-16 20:04:30 +02:00
emanuele-f
1d248331f6 Implement optimized exists query in InfluxDB
This avoids returning too much results when using standard listSeries
2019-09-05 16:02:20 +02:00
Simone Mainardi
3a5de882fe Fixes lua nil-call exception upon InfluxDB errors
Fixes
WARNING: Script failure [/home/simone/ntopng/scripts/callbacks/system/timeseries.lua][/home/simone/ntopng/scripts/lua/modules/alerts_api.lua:223: attempt to call a nil value (global 'alertEntity')]
2019-08-16 20:48:11 +02:00
emanuele-f
c183a577be Alerts API cleanup and JSON migration 2019-07-29 15:17:22 +02:00
Simone Mainardi
e28bb2ae96 Implements InfluxDB overall health checks 2019-07-04 12:49:39 +02:00
Simone Mainardi
5187a36d37 Implements flags to detect recent InfluxDB export failures and dropped points 2019-07-04 11:38:10 +02:00
emanuele-f
47e5d87e44 Show InfluxDB setup errors in the header
Fixes #2702
2019-07-03 16:59:29 +02:00
emanuele-f
0957bef845 Fix InfluxDB error with partial reply during setup
Fixes #2703
2019-07-03 14:30:14 +02:00
Simone Mainardi
9f3bb73ddc Keeps InfluxDB export stats since startup 2019-07-02 18:42:09 +02:00
Simone Mainardi
0e3de3efe6 Fixes InfluxDB memory calculation
Fixes #2694
2019-07-01 18:44:48 +02:00
Simone Mainardi
0ed48a245b Adds better description of InfluxDB monitored metrics 2019-06-30 12:56:04 +02:00
Simone Mainardi
80fb89b093 Uses a hash to keep InfluxDB counters (easier to delete in bulk) 2019-06-28 19:05:53 +02:00
Simone Mainardi
6ff75df695 Fixes InfluxDB alerts not set on the system interface 2019-06-28 18:51:12 +02:00
Simone Mainardi
9a5297f0d5 Prevents InfluxDB dropped points alerts from being triggered too often 2019-06-28 18:36:42 +02:00
Simone Mainardi
b34332ec60 Raises influxdb max export queue len to 200 2019-06-28 18:23:36 +02:00
Simone Mainardi
1019f024e4 Adds influxdb dropped points alert 2019-06-28 18:21:25 +02:00