Commit Graph

232 Commits

Author SHA1 Message Date
Tony Murray
49f8269262 Improved Latency graph (#15940)
* Improved Latency graph
Store loss+jitter info in rrd instead of database
New graph icmp_perf (legacy ping_perf still valid referencing part of the newer data)
Delete device_perf table

* Change loss to an area so it is more visible

* Style fixes

* Cleanups from phpstan & tests

* exit_code fix

* Remove alert usage of device_perf

* Don't use magic __get

* Add test for bulkPing
Add host to previous tests

* style fixes

* Fix issue fping error responses
2024-04-18 09:57:01 -05:00
Justin Lentz
c3a95cdda9 Revert "Fixed interfaces descriptions for multiport_bits_separate graphs type…" (#15894)
This reverts commit 2928b51c3d.
2024-03-13 00:06:26 +01:00
dmbokhan
2928b51c3d Fixed interfaces descriptions for multiport_bits_separate graphs type (#15893) 2024-03-11 16:52:29 -05:00
bnerickson
d7c31e0ae3 Wireguard application graph cleanup and new wireguard interface/global metrics. (#15847) 2024-03-07 12:27:26 -06:00
bnerickson
0998592e1f Systemd Application Code Cleanup and new Systemd Unit State Metrics. (#15848) 2024-03-04 23:58:28 +01:00
bnerickson
7c59e64b7a Socket Statistic Application cleanup and application page graph fixes. (#15845) 2024-02-21 21:31:51 +01:00
SourceDoctor
ba48a17a45 Sort smart app disks by label (#15686)
* sort smart app disks by label

* .

* .
2024-01-15 23:05:10 +00:00
Zane C. Bowers-Hadley
19e2062893 add BorgBackup monitoring support (#15591)
* add borgbackup poller

* add borgbackup app page

* add graphs for borg backup

* minor borgbackup graph fixes and cleanups

* don't use custom colors for borg backup

* add metrics

* add borgbackup to the apps page

* add borgbackup snmprec for v1

* add test file for borgbackup v1

* add borg backup docs

* various style fixes

* add a missing key to the test data

* $total_vars -> $to_total

* remove a accidentally added space to applications.md

* test tweaks

* add no_hourly option to generic_stats

* add some more options to generic stats and don't display hourly since it is not really useful for borg backup

* style fix
2024-01-15 15:39:49 +01:00
kakohegyi
4456640e51 Zyxel Wireless Controller OS ( Zyxel NXC series ) (#15694)
* zyxelwlc

* Zyxel Wireless Controller OS

* Zyxel Wireless Controller OS

* Update Zyxelwlc.php

* test data

* sensor count graph

* sensor count graph

* sensor count graph

* sensor count graph

* fix indent

* trailing CR

* Trailing CR

* fix count def

* Delete includes/html/graphs/device/sensor-count-zyxelwlc-sessions.inc.php

Not necessary

* Delete includes/html/pages/device/graphs/sensor-count-zyxelwlc-sessions.inc.php

Not necessary

* fix tests

* fix tests for real

* session graph in core section

* session graph in core section

* session graph in core section

---------

Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
2024-01-14 14:02:28 +01:00
Jellyfrog
071ca9bc2a Apply fixes from StyleCI (#15698)
Co-authored-by: StyleCI Bot <bot@styleci.io>
2024-01-04 22:39:12 -06:00
Tony Murray
489978a923 Fix graphs device check before auth (#15551)
It should be after the auth check.
2023-11-06 09:09:25 -06:00
Tony Murray
a51e70d067 Graphing: error when device is not found (#15459) 2023-10-15 06:02:21 -05:00
bnerickson
78a4bfb9d9 Adding Socket Statistic Application Support (#15307) 2023-10-13 22:45:03 -05:00
Tony Murray
6d9178cd42 Fix graph errors (#15407)
Some graphs were generating an error that wasn't being correctly output as an image
2023-10-06 08:22:22 -05:00
Tony Murray
d8c372bbf4 Refactor MAC utilities into a single class (#15379)
* Refactor MAC utils to a new utility class

* Apply fixes from StyleCI

* Inline functions
Add tests
Handle bridgeid format

* Apply fixes from StyleCI

* Dedicated code path for stp bridge parsing, and improve STP output a bit

* Correctly parse dot1dBaseBridgeAddress and don't store int in bool field

* trim any unexpected character from bridge addresses, add extra test data.

* better comment

* barsBridge can handle dot1dBaseBridgeAddress correctly now

* parseBridge, check for properly formatted mac first.

* update test data, empty data = empty mac

* Fix new usage after rebase

* import

---------

Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-10-06 07:34:14 -05:00
Tony Murray
4211b1c46f Remove unused functions (#15371)
* Remove unused functions
inline other legacy functions

* Apply fixes from StyleCI

---------

Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-10-04 10:17:34 -05:00
Tony Murray
d7ae34d390 Fix API availability graph duration (#15250)
Add default duration
2023-08-24 14:40:33 -05:00
Zane C. Bowers-Hadley
7505c89586 add generic stats graph munging support and make uptime display as days again (#15097)
* add munging to generic stats graph include

* add graph_uptime_days config def

* make it optionally changable now

* style fix

* remove the graph_uptime_days option
2023-08-02 08:36:25 -05:00
Tony Murray
3908bddb49 Miscellaneous fixes (#15162) 2023-07-26 01:08:10 +02:00
Zane C. Bowers-Hadley
40cceee8b4 update SMART monitoring to the use JSON (#15132)
* rework into a json app and support the old style

* working now

* add health checking

* add some datapoints to make writing alerts easy

* add a few missing item for has checks

* rework the app page

* use the right var for id9

* print the self test log if we have it

* add a graph for the max temp

* display the max temp graph

* display the health pass in the disk list if we have the data

* fix legacy handling and set app as ok

* replace id190 and id194 with the more useful maxtemp graph on the apps page

* don't print the additional info area for legacy extends

* add id232

* add id252 graph support

* properly display id232 now

* do not display SSD graphs for non-SSD disks

* for legacy extends, make sure we don't have a bad line

* add missing label for Product value

* fix metrics

* rework the metrics stuff a bit more

* typo fix

* more smart metrics cleanup

* add exit info to metrics

* style cleanup and logic checking for when disks are all now fine

* fix checking for no more health errors

* update the docs for SMART for v1 and remove slightly pointless notes about useSN

* update the docs

* initial test stuff

* add missing tests for the legacy code

* save if it it is legacy or not

* style cleanup

* update the smart legacy test

* style cleanup

* more test tweaking

* some more style cleanup

* more test fixes

* correct the disk ID for the legacy test da0 -> Z304VCFY

* more tests update

* more test cleanup

* begin cleanup of the v1 tests

* more v1 test updates

* more tests for v1

* more test cleanup

* fix exit_nonzero and add unhealthy metric

* add smart alerts

* add the metric unhealthy to the stat test

* use app data for the smart-common.inc.php
2023-07-24 17:03:45 +02:00
Zane C. Bowers-Hadley
54a38dd4cd add the Mojo CAPE Submit app (#15140)
* add poller for mojo cape submit

* mojo_cape_submit poller now works

* add app page for mojo_cape_submit

* add basic generic stat graphs for mojo cape submit

* general size stats graph for mojo_cape_submit

* make sure we update slugs that did not see anything submitted for them

* sort the slugs by sub count

* add app protos graph and sub top 12 graphs

* add mojo cape submit docs

* add tests for mojo_cape_submit

* add mojo_cape_submit to the apps page

* add string helper for mojo_cape_submit

* poke lots of stuff with php-cs-fixer

* remove a unneeded line

* add a missing metric and app data to test
2023-07-19 22:41:51 -05:00
Zane C. Bowers-Hadley
2ac9a634b4 Logsize monitoring for LibreNMS (#15137)
* add logsize poller

* add set size info

* add more stats

* add min size

* more logsize files

* add logsize

* fix creating log file links

* add two new graphs

* add some graphs

* add no_minus_d

* add no minus d to app page

* add count of log files

* save logsizes in app data

* rename title log sizes

* only show top 12

* add mean median and mode

* cleanup naming a bit

* the values for the files hash is now a int instead of another hash

* add new stats and correct median name

* now properly handle unseen

* fix logsize bits

* add combined

* update metrics and add some tests

* add logsize graphs to apps page

* add the logsize bit

* add logszie docs

* add some example alert rules

* style cleanup

* more style cleanup

* fix a few things for metrics and update the test

* fix a variable name in the test and update the data
2023-07-19 22:02:23 -05:00
Zane C. Bowers-Hadley
00cf300d1a add Suricata Extract submission stats app (#15105)
* add suricata_extract

* convert from dervive to gauge and use delta

* add suricata_extract to includes/html/pages/apps.inc.php

* graph cleanup

* add sub_size

* add sub_size graph

* add docs for suricata extract

* add tests for suricata_extract

* add rules for suricata extract

* minor test tweaks
2023-06-25 20:48:26 +02:00
Zane C. Bowers-Hadley
f84fca697c add Privoxy stats support (#15114)
* add privoxy

* various style fixes

* cleanup option bar

* save metrics for privoxy now

* add instructions for privoxy

* add privoxy test data

* regen the test data

* add a few missing depends to the instructions

* add apps.inc.php entry for privoxy

* note the required log settings for privoxy

* style fix
2023-06-23 15:27:28 -05:00
Zane C. Bowers-Hadley
5da8e70bf4 add Sneck support, making it very trivial to use Nagios style checks in a NRPE like manner (#13954)
* code stuff done for Sneck

* whoops, correct the abs value post adding it post rrd update

* return a array for getting the sneck data and nicely print the raw return value

* add test stuff and freeze time at 1650911765 for tests

* move the freezeTime

* add use Illuminate\Support\Carbon;

* more test changes

* rework freezeTime a bit more

* more test stuff

* another test

* rework it a bit again

* correct variable spelling for $time_diff

* remove freezeTime as we are using a old version of Laravel

* finalize graphs

* misc

* finalize sneck page

* mve the sneck tests as it needs a newer version of laravel than we are using

* add documents for sneck

* finalize the poller

* formatting cleanup

* correct comment type

* correct the spelling of description

* more documentation

* save the check returns as metrics

* add some more examples

* fix some of the sneck alerts and add a few more examples

* turn off time to polling by default

* suggest using ntp if enabled

* since we are zeroing time_to_polling by default, this now works

* backout some suggested changes for once we change to larval 9

* remove del_sneck_data as it is no longer used

* add more docs on the metrics

* php-cs-fixer to fix a few things

* update and fix sneck tests

* remote a metric from the test

* another minor tweak to the test

* one more minor change

* ahh! derp! think I found it finally... hopefully hanging this for the last time...

* now use app data

* now logs check changes

* add a missing )

* add a missing )

* some style fixes

* update the sneck page use to the app data stuff

* update the poller to use the new app data

* misc

* update sneck to log check status changes

* correct alert log messages

* correct a comment

* fix metrics

* derp, another fix

* test fix

* re-order to avoid warning

* poller update

* update sneck graphs

* update sneck graphs

* remove a unneeded line

* test update for discovery

* minor tweaks to the test and fix update the polling a bit

* style fix

* fix return data printing

* fix the test data to include app data

* attempted test fix

* add config def to apps.sneck.polling_time_diff

* cleanup docs a bit

* minor config tweaks

* minor doc cleanup
2023-06-15 09:06:28 -05:00
Jellyfrog
b14e2d4609 Apply fixes from StyleCI (#15101)
Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-06-13 13:35:00 +02:00
Zane C. Bowers-Hadley
0ed68e33de add Linux Softnet Stat app (#15094)
* add linux_softnet_stat poller

* add graphs and app page for linux_softnet_stat

* fix polling

* rename a few items, clean up the app specific page, and add to the apps page

* convert from derive to counter

* save the budget and budget_usecs to app data

* display current value of the budgets

* now track budget values

* add tests data

* rename it

* add docs for Linux Softnet Stat

* re-order and add budget for app page graph order

* style fix

* correct data location

* fix metrics for the json
2023-06-11 16:37:55 +02:00
Zane C. Bowers-Hadley
3190bdb8b2 add ZFS L2 support (#15095)
* add alerts for ZFS

* add initial l2 bits to the poller for zfs

* more minor tweaks to the ZFS poller

* more zfs bits

* add new ZFS graphs

* begin adding L2 stuff

* add linux_zfs-v3 bits

* update zfs app page

* style fix

* update the data for the zfs legacy test

* test update for zfs v1

* fix some zfs tests

* more zfs v3 test cleanup

* another zfs v3 test data fix

* more zfs v3 test data cleanup

* more test tweaks
2023-06-11 16:32:28 +02:00
Jellyfrog
153be4d583 Tests: Fix Dusk tests after 13626 (#15057) 2023-05-23 19:23:15 +02:00
Neil Lathwood
2f6904fb59 webui: Fix availability graphs to 100% (#15013)
* Fix availability graphs to 100%

* Update availability.inc.php
2023-05-10 22:03:51 +01:00
eskyuu
ce0734ff5d Added support for user timezones and user browser timezone by default (incomplete) (#13626)
* Added support for user timezones and user browser timezone byt default

* Formatting fixes

* Use the timezone for alert log display

also added validation for the timezone because it's being used in SQL.

* Formatting fixes

* Added return type

* Formatting"

* Update the latency graphs to use the user timezone

* Simplify the web routes config

* Update phpstan to ignore type error

* Fixed up the phpstan config

* Reverse phpstan change

* Re-apply phpstan override

* Remove the option to unset the session timezone

* Formatting fix

* Update outge and event logs to use session timezone

* Fix route for the timezone control

* Made the timezone more dynamic

* Fix a logic error that was stopping the timezone from being set automatically on login

* Prevent getPref from being called twice

* again prevent getPref double call

* getPref double call

* Fixed typo made during merge

* Fixed merge error in phpstan-baseline.neon

* Change spaces to tabs in phpstan-baseline.neon

* Update error count

---------

Co-authored-by: Tony Murray <murraytony@gmail.com>
2023-05-09 10:24:48 -05:00
bnerickson
56e9fa3742 Adding linux_config_files application support (#14776) 2023-05-09 10:23:49 -05:00
jlo-lirmm
41ae162223 php implode arg mismatch (#15014)
php implode arg mismatch
2023-04-28 15:44:22 +02:00
Tony Murray
e1b6fd0165 Fix more refactor errors (#14998) 2023-04-23 20:33:50 -05:00
Tony Murray
2271e29e03 Fix billing error introduced by #14979 (#14996)
Fixes #14994
2023-04-23 13:23:54 -05:00
Tony Murray
265906b44c Fix some undefined constants (#14993)
* Fix undefined constants
These have been broken for a long time.  Likely they are unused.

* Fix undefined constants
These have been broken for a long time.  Likely they are unused.
2023-04-22 10:37:20 -05:00
Tony Murray
3fe3db747c Refactor billing (#14979)
* Refactor common billing code into a namespace
Prevents issues of usages where the code hasn't been loaded.

* remove redundant Billing in method names

* remove accidental duplication

* more use statements

* Style fixes
2023-04-21 19:52:47 -05:00
Tony Murray
2ddfba51dd Set ping_perf scale_min to 0 (#14989)
And allow scale_min, scale_max, and scale_rigid to be set via url parameter
2023-04-20 22:30:32 -05:00
Stef
0430f6acb1 Cisco QFP polling fixes (#14961)
* fix cisco-qfp Division by zero

* fix percentage calc

* linting

* another zero in RRD. the (int) might be consequential errors and should hurt...

* no float for average_package

* Update includes/polling/cisco-qfp.inc.php

Co-authored-by: Tony Murray <murraytony@gmail.com>

* Add floor

---------

Co-authored-by: Tony Murray <murraytony@gmail.com>
2023-04-14 22:11:36 -05:00
Justin Lentz
b9cc630dbc Stacked graphs on zoom to speed (#14928)
* Update generic_data.inc.php

* Update functions.inc.php

* Update generic_data.inc.php

* Update functions.inc.php

* Update functions.inc.php

* Update generic_data.inc.php

* Update graphs.inc.php

* Make Murrant Happy ;)

* Update generic_data.inc.php

* Update generic_data.inc.php

* Update graphs.inc.php

* Update graphs.inc.php
2023-04-14 16:48:30 -05:00
Tony Murray
3380122733 Poller perf: add per device average (#14940)
* Poller perf: add per device
Fix min, avg, and current values

* Fix up previous

* Fix style

* Rename to device average, we don't calculate min and max, but rather the min/max of the average.
2023-04-07 13:27:12 -05:00
Dan Baker
a340672e86 Added graphing of DDoS-protection related OIDs for PAN-OS (#14847) 2023-04-06 19:11:16 -05:00
Jellyfrog
68e0b3df28 Apply fixes from StyleCI (#14899)
Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-03-13 22:32:22 +01:00
Zane C. Bowers-Hadley
cd82c72190 add graph_stat_percentile_disable config item to disable percentile lines/value printing (#14887)
* add the initial config items for graph_stat_percentile_disable

* update generic stats to use graph_stat_percentile_disable

* style fix
2023-03-09 17:24:32 +01:00
Zane C. Bowers-Hadley
6b56e781b1 actually use the stats graph for ntp-server_freq now (#14884) 2023-03-09 13:32:19 +01:00
Zane C. Bowers-Hadley
2a53c49a5c convert NTP freq to use generic_stats (#14834) 2023-03-09 00:23:31 +02:00
Zane C. Bowers-Hadley
a0f1dab07b add type checking to generic_stats.inc.php for $vars['to'] and $vars['from'] (#14871)
* make sure the $vars['from'] and $vars['to'] are actually numeric

* style fix
2023-03-02 22:59:31 +01:00
Zane C. Bowers-Hadley
19278bf19f update fail2ban to have better stat graphs and and fix generic_stats graph.php (#14818)
* update fail2ban better stat graphs

* style fix

* add rainbow color pallete

* cleanup colors and make it more easily understandable via using the new rainbow colour pallete

* a bit more color tweaking

* green is easier on the eyes

* style fix

* fix hgandling for smaller graphs for some things

* for <= height graphs, use area

* rework the area bit and add a alpha

* style cleanup

* more style cleanup

* mm... colourA does work a lot nicer if the same as colour

* add two more palletes and make the purple the default

* only include 1d once as that as some versions of rrd break if it is twice

* move time_diff to the proper location
2023-03-02 18:51:16 +01:00
Henne Van Och
2140ff21c5 add more docker stats (#14767) 2023-03-01 01:02:01 +01:00
Zane C. Bowers-Hadley
f023d37cfc update various device graphs to to have better stats (#14815)
* update graphs -> systems page

* update availability graph to use the stats graph for 1 day averages

* a bit of cleanup for various graphs

* a few style fixes I missed

* another style fix

* update the pingperf graph as well

* update the poller perf graph as well

* style fix

* move graphs to using generic_stats default for readability
2023-03-01 01:00:13 +01:00