-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Monitoring APIs for realtime and historical data #715
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gsanchietti
force-pushed
the
report
branch
9 times, most recently
from
August 21, 2024 10:49
13e5259
to
b778024
Compare
gsanchietti
force-pushed
the
report
branch
4 times, most recently
from
August 22, 2024 14:30
7cf6ac5
to
98677e3
Compare
gsanchietti
force-pushed
the
report
branch
4 times, most recently
from
September 12, 2024 16:26
efb78dd
to
d248ed0
Compare
gsanchietti
changed the title
Monitoring client APIs
Monitoring APIs: realtime and for controller
Sep 24, 2024
gsanchietti
changed the title
Monitoring APIs: realtime and for controller
Monitoring APIs for realtime and historical data
Sep 24, 2024
The same info is contained inside summary-by-client API
The script will be executed every x minutes by a cronjob
Sometimes the dpireport daemon can die without writing anything inside the /var/log/messages. Try to avoid this issue by restarting the threads if an unhandled exception occurs: the exception is now printed to syslog; this should help during troubleshooting
The new format was breaking dashboard charts.
Dump OpenVPN Road Warrior and Tunnel configuration
Push limited OpenVPN and WAN configuration: data can be used to improve existing dashboards
Search for "add IP" instead of "suspicious IP" inside the logs.
Search for "add IP" instead of "suspicious IP" inside the logs.
andre8244
approved these changes
Sep 26, 2024
Co-authored-by: Andrea Leardini <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Local reports
Issue #756
Local reports are used to visualize data in real time.
All data are stored in memory, so when the machine is rebooted all historical data get lost.
Also, to minimize disk space usage, some data are aggregated or removed at regular interval.
The following APIs can be used to draw charts and graphs directly inside NethSecurity Web UI.
1. DPI report
APIs are inspired by lightsquid report, see demp
APIs are inside
ns.dpireport
.list-days
methodsummary
method,clients
fieldsummary
method,host
fieldsummary
method,protocol
fieldsummary
method,application
fieldsummary
method,hours
fieldsummary-by-client
method,total
fieldsummary-by-client
method,application
fieldsummary-by-client
method,protocol
fieldsummary-by-client
method,host
fieldsummary-by-client
method,hour
field2. Malware: threat shield IP
API named
tsip-malware-report
insidens.report
.Only current day data (if available):
malware_count
fieldmalware_by_hour
fieldmalware_by_chain
fieldmalware_by_category
field3. Threats: threat shield IP (fail2ban behavior)
API available inside
ns.report
, namedtsip-attack-report
Only current day data, if available
attack_count
fieldattack_by_ip
fieldattack_by_hour
field4. Multiwan
API available inside
ns.report
, namedmwan-report
Only current day data, if available:
total_online
andtotal_offline
fieldsevents_by_wan
fieldAPIs available inside
ns.report
, the API is namedmwan-report
.5. OpenVPN Road Warrior
APIs available inside
ns.report
.Data are read from a sqlite database that is reset only after a reboot.
ovpnrw-list-days
methodovpnrw-clients-by-day
methodovpnrw-count-clients-by-hour
methodovpnrw-bytes-by-hour
methodovpnrw-bytes-by-hour-and-user
methodRemote reports
Issue #754
Remote reports are implemented inside a NethSecurity Controller.
Data are permanently stored inside a non-volatile database.
See server implementation NethServer/nethsecurity-controller#38
A unit connected to a controller, will send all data to the controller every 15 minutes.
The following APIs have been designed to be called from a cron job, the result must be sent to the controller.
New APIs are implemented inside
ns.controller
: