Commit Graph

87 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
PipoCanaja
a7a6e67e87
NAC - Improve search in WebUI - Keep Historical data (#15629)
* search improvement for PortNac

* rename func

* style

* DB migration for timestamps

* style

* rules

* fix manually db_schema

* remove vlan only search for now

* add a bool column to ident historical nac entries

* add columns to the table

* queryByOui renamed everywhere

* age value instead of delete

* style

* style

* use Illuminate\Support\Facades\DB;

* tests fix

* module_tables.yaml

* dump model instead of tests/module_tables.yaml

* tests

* testVrp

* daily

* config

* display historical NAC entries in global view

* same for NAC device page

* nac tab on device/port view

* and display the tab link if necessary

* filter by port as well

* historical data in port tab

* formatters
2024-01-24 09:15:40 +01:00
Tony Murray
12f8bb2040
MAC Vendor OUI use scheduler (#15187)
* MAC Vendor OUI use scheduler
Add command to update `lnms maintenance:fetch-ouis`
Show vendor column in tables if mac_oui.enabled is set to true
Improve scheduler validation handle non-standard install directories and systems without systemd
Add index to table to improve speed and improve mac->vendor lookup speed
Scheduled weekly with random wait to prevent stampeding herd issues for upstream
drop oui update from daily

* MAC Vendor OUI use scheduler
Add command to update `lnms maintenance:fetch-ouis`
Show vendor column in tables if mac_oui.enabled is set to true

* Lint fixes and better prefix detection

* update schema file
2023-08-03 19:29:30 -05:00
Jellyfrog
5a56e9081e
Use Laravel schema migration command directly (#14039)
* Add new schema migration command

* Apply fixes from StyleCI
2023-08-03 19:26:48 -05:00
Andy Norwood
64c4650801
Add FDB table vendor search drop down (#15072)
* Add vendor search and related functions

* Add OUIDB cache for vendor lookup

* Add vendor drop down

* appy style CI changes

* Apply style CI and lint changes

* more styleCI changes

* update type hinting

* Edit mac_oui cache lock name and function

* Update MAC OUI message during daily

* Use DB for vendor lookup

* New vendor_oui table migration

* New MAC OUI to database function

* Update readbleOUI to use DB rather than cache

* Make StyleCI changes

* styleCI tweak

* Remove lock release to allow refresh timer

* change migration name to match table

* add schema dump

* update schema

* styleCI tweak
2023-07-21 11:30:13 -05:00
Gilles Depeyrot
c4cb9c652c
Add MAC OUI caching when code updates are disabled (#14713) 2022-12-09 17:28:29 +01:00
Tony Murray
66790e7e8f
Increase minimum version to PHP 8.1 (#14378) 2022-09-26 08:52:15 -05:00
Jellyfrog
fdebee86b4
Implement system for user packages in composer (#13718) 2022-02-02 17:33:23 +01:00
Jellyfrog
ed48cc5368
Remove old vendor fix (#13717)
* Remove old vendor fix 

Follow-up to #13712

* Remove another invalid check
2022-01-29 14:49:57 +01:00
Sean
1a97559816
Fix scripts to allow pathname with space (#13027) 2021-07-14 22:00:21 -05:00
PipoCanaja
fff8b8e832
Collect OUI Database and do OUI lookups (#12842)
* first draft

refresh time

refresh time

* return codes

style

style

* presentation

* Exception details

more

fix

fix

* add tooltips

fixes for dns display

* create WebUI config option

languages

* refresh data every 7 to 11 days, keep it 15 days max

* 'Ports' and 'Port' ARP table

* Stp page support

style

style

* fix dnsname column finding when vendor is added/removed

fix dnsname column finding when vendor is added/removed

* nac vendor column

nac

* filter fields to reduce size of AJAX reply

filter fields to reduce size of AJAX reply

* fix typo on dns column detection

* default enabled
2021-05-10 14:56:48 -05:00
Jellyfrog
f9b25ccdbc
Lint with shellcheck (#12666) 2021-03-28 10:47:21 -05:00
Tony Murray
0d61deb8f0
Remove perf_times table (#12517)
the data is never used... This type of data is better to store in rrd anyway
2021-02-09 12:47:05 -06:00
Jellyfrog
20b4215204
Swich links to https (#12511)
* Switch librenms links to https

* Convert librenms links in comments

* Switch gnu.org url to https

* switch php urls to https
2021-02-09 00:29:04 +01:00
Tony Murray
e2fb7ba635
Fix version compare (#12376)
* Fix daily.sh version compare

* 1.70.1
2020-12-02 08:39:06 -06:00
RobJE
e1497ecf0b
shellcheck (#12258)
* remove unneeded semi-colons at end of line

* fix SC2206: Quote to prevent word splitting/globbing

* fix SC2164: Use 'cd ... || exit' in case cd fails

* fix SC2004: $/${} is unnecessary on arithmetic variables.

* fix SC2155: Declare and assign separately to avoid masking return values.

* fix SC2124: Assigning an array to a string! Assign as array, or use * instead of @ to concatenate.

* fix SC2059: Don't use variables in the printf format string. Use printf "..%s.." "$foo".

* fix SC2076: Don't quote rhs of =~, it'll match literally rather than as a regex.

* fix SC1090: Can't follow non-constant source. Use a directive to specify location.

* fix SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.

* SC2223: This default assignment may cause DoS due to globbing. Quote it.

* fix SC2164: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

* fix SC1117: Backslash is literal in "\n". Prefer explicit escaping: "\\n"

* better handling of branch comapre

* add missing local ver_73 from merge

* remove duplicate definition
2020-11-11 23:21:15 +01:00
Jellyfrog
bc02ab3f6e
Bump to PHP 7.3 minimum (#12288) 2020-11-03 02:56:49 +01:00
Jellyfrog
b866bcf2ab
Revert "Check PHP dependencies in daily.sh (#12260)" (#12271)
This reverts commit d82d2f1f19.
2020-10-29 15:11:32 +01:00
Jellyfrog
d82d2f1f19
Check PHP dependencies in daily.sh (#12260) 2020-10-29 01:34:42 +01:00
Tony Murray
52e61490f0
Full path to python requirements check (#11982) 2020-07-30 22:29:16 +02:00
Tony Murray
b0b62aa999
Fix .env path (#11972) 2020-07-29 07:58:54 -05:00
Jellyfrog
2fb1594348 Python 3.4 is the minimum requirement
And not 3.5
2020-06-30 16:01:22 +02:00
Tony Murray
23c33f753f WIP validation cleanup missing config 2020-06-27 22:57:29 -05:00
Tony Murray
2ba2d9a053
Improve migration to release update channel (#11669)
* Improve migration to release update channel
Delay update until a newer release exists.
This prevents us from going backwards.

* a little clarification
2020-06-09 13:01:38 -05:00
Tony Murray
55e70be6ba Send to PHP 71/Python2 support branch 2020-05-10 23:09:03 -05:00
PipoCanaja
bf181b9dc2
Added support for routing table collection in discovery (#10182)
* Clean broken VRF lite code
* Change DB table for route discovery
* Add VRF simple support
* add port_id to db and discovery
* static-fy the translation arrays
* sort and search cleaning
* Sorting refactor and validation
* formatItem shortened
* Handle ifIndex==0 meaning no next hop defined (MPLS)
* Sync all create/updates
* purge in daily
* remove old route table
* get rid of inetCidrRouteNextHop_device_id
* fix wonky column orders
* add route snmprec
* fix sorting by interface
* Move to new config
* rename to route the new table
* Properly display ipv6 compressed addresses
* Translation before merge ./lnms translation:generate
* Update manifest
2019-11-17 16:30:43 +01:00
Tony Murray
f3ba8947f7
Use Config helper (#10339)
remove usage of global variable
2019-06-23 00:29:12 -05:00
Tony Murray
1a60c44eb0
Device groups rewrite (#10346)
* Device Groups rewrite
Updated web ui
Static or dynamic groups allowed
Alert rule query builder
Translation support
Permissions support

* cleanup, make relationship save, and validate it

* builder WIP

* rules builder and rules saving/loading

* Parse query builder to Laravel Fluent query

* Upgrade existing groups when editing.
Properly update only dynamic groups when polling.

* remove unused old code
Update API and other places to use Eloquent

* debug output in poller restored

* Fix up some things
creating static
improved validation
fix js error on creation
Fix static groups in polling

* hide pattern for static group

* Implement authorization
Use in the menu too

* update schema

* fix rollback

* Don't abort on invalid queries

* fixes to query builder

* add test data, looks like macros aren't handled (omitted them because groups don't use them generally)

* Add macro support for QueryBuilderFluentParser

* add test for macro that accepts value

* More space in forms
Retain rules when converted to static
no duplicate names allowed

* Better error feedback
Update related devices on save

* Add button icon

* format

* update docs

* fix tests

* Fix some QueryBuilderFluentParser issues with OR
updated/more test data

* Show device groups runtime
fix querybuilder.json format

* Store table joins in the rules to minimize polling time
Update group joins in daily.sh (and when they are saved)

* Update daily.php

* Add units to time
2019-06-19 16:01:53 -05:00
Tony Murray
96d65d1cc3 Extra daily.sh safety (#9821)
If the php update channel check fails, it returns an error code 255...
This isn't handled by daily.sh, so it doesn't update code at all.

If updates are disabled (0), skip.
If master (1) or in the php version jail do a git pull update
Otherwise update to the latest tagged release

This should give a "safe" fallback if php isn't working.  Might cause flipping back and forth if the user's error isn't (or can't be) fixed by code changes.
2019-02-24 15:47:06 +01:00
PipoCanaja
e2f835ad9d
FDB table with history capabilities (#9804)
* Migration script and data feeding

* Adding the columns in the GUI

* build schema

* update FDB test data

* Use of timestamps()

* ignore created_at and updated_at in tests, and regenerate test impacted

* daily.sh does the cleaning

* space cleaning codeclimate

* Use carbon instead of str-val

* handle when $fdb_entry->updated_at and created at are null

* handle when $fdb_entry->updated_at and created at are null (force travis rerun)

* Doc update

* Doc update
2019-02-21 13:23:01 +01:00
Neil Lathwood
6fdafd137c Deprecate PHP < 7.1.3 (#9645)
* Added validation and support for users on PHP < 7.1.3

* Branch name php56
2019-02-07 13:23:30 -06:00
Tony Murray
9bc0c542a5 Allow ping checks to be ran separately from polling (#8821)
Allows ping checks at intervals not tied to the poller.  Pointless if you are not alerting on device status.
I updated the rrdstep.php script to treat ping-perf files separately and made it so it only converts if needed.

Docs here: https://docs.librenms.org/Extensions/Fast-Ping-Check/

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
2018-07-30 22:58:38 +01:00
Neil Lathwood
d9ceaf7830 Added support for auto purging deleted ports (#8861) 2018-07-03 08:27:20 -05:00
Tony Murray
f43e23e15a
Restore vendor contents even if composer is not available (#8223)
* Restore vendor contents even if composer is not available
Leave the code in both places for safety.

* Instruct users to use the wrapper instead of straight up composer...
2018-02-07 20:45:18 -06:00
Tony Murray
9b9fb121ab
Remove dependencies from the repository, update install docs (#6920)
After vendor is un-indexed restore the contents so things keep working.
2018-02-06 08:17:44 -06:00
Tony Murray
3ddeb1dbc5 fix: Switch detached head for daily updates (#8194)
If HEAD is detached, switch to master.
(Detached head is ok for the release version)
2018-02-05 21:20:06 +00:00
Neil Lathwood
925b7f83dc fix: daily.sh Updated to resolve release version issues (#8172) 2018-01-29 15:00:33 -06:00
Tony Murray
6878df8c12
Prep for composer changes (#8075)
* Prep for composer changes

* Update composer.json, composer.lock and a small update to phpmailer and Yaml

* Prevent accidental `composer update` runs

* Add  --no-interaction to daily.sh
2018-01-22 08:16:37 -06:00
Tony Murray
d515f5043e refactor: Move install to php53 branch if running an unsupported version of PHP (#8042)
* Move install to php53 branch if running an unsupport version of PHP

* Update validate

* Move PHP version check after update check.  This will prevent us from moving no update users to the php53 branch.

Hopefully if daily.php -f update fails it returns a non-zero and we can move them to the php53 branch still.

* Wiggle things around more.

* Also, send release installs to the php53 branch.

* Set notification error for old PHP version.
2018-01-10 14:40:58 +00:00
Neil Lathwood
2c919a48ff
fix: Re-added peeringdb back into daily.sh (#7884) 2017-12-09 17:19:56 +00:00
Tony Murray
0c36cd7a8b Remove accidental inclusions that will mess up future updates. (#7864)
composer_wrapper.php doesn't even exist :(
2017-12-06 22:58:39 +00:00
Tony Murray
2e73b75297 fix: Use memcached to lock daily processes on Distributed Pollers (#7735)
* fix: use memcached to lock daily processes on Distributed Pollers

* All the locks!
2017-11-24 09:37:52 +00:00
Tony Murray
8a051aa295 fix: Fix a couple of OS cache invalidation issues (#7567)
* fix: fix a couple of OS cache invalidation issues
Fixes issues where we might be using outdated os definitions.

* use Config and fix style issue

* only pull in settings from config.php (otherwise will possibly contain populated os config)
2017-10-27 21:03:58 +01:00
Tony Murray
1cd4fcb8b1 feature: issue warning notification if php version is less than 5.6.4 (#7418)
* feature: issue warning notification if php version is less than 5.6.4
rename set_notification function in daily.sh to set_notifiable_result
print output when a daily.sh process fails

* further notifiable clarification

* Update the notification message.

* make sure to remove the notification when updates are disabled
move the notification code into the php check
2017-10-22 19:30:31 +01:00
Tony Murray
de8bcf3a6c fix: update notification for users with updates disabled (#7253)
Don't show the toast when the notification is marked as read
2017-08-29 09:32:24 -05:00
Tony Murray
0def643e09 feature: Notify about failed updates, block detectable bad updates (#7188)
* Feature: Notify about failed updates, block detectable bad updates
Ability to post notifications when the update fails.
Detect and roll back updates that will cause broken installs. (Needs testing)
Add severity to notifications, critical (2) notifications will display a toast.

This will be used for removing in-tree dependencies and raising the minimum php version.

* Improve naming a bit add phpdoc to new_notification
In case multiple notifications are created, remove them all.

* Remove notifications when update is disabled.

* update travis to use db testing

* added missing index
2017-08-26 21:35:39 +01:00
Tony Murray
3a89820646 prepare for upcoming composer changes by cleaning the vendor directory (#6986) 2017-07-21 23:21:42 +01:00
Tony Murray
41882dfd8b fix: perf_times cleanup (#6908)
* fix: perf_times cleanup

* Truncate perf_times to save some headaches
2017-06-28 21:43:19 +01:00
Jonathan Price
2186e3b79a fix: Update Shebangs and daily.sh for FreeBSD compatibility (#6413)
* Where shebangs had no flags, updated them to use /usr/bin/env for cross-platform compatibility
Updated daily.sh to support FreeBSD (su has different args, replaced with sudo when not on linux)

* Added myself to AUTHORD.md as per contributor guidelines

* Set all platforms to use sudo rather than su
Re-added missing arguments to sudo
2017-04-17 20:14:23 -05:00
Neil Lathwood
097f4ebe99 moved pdb caching (#6233) 2017-03-22 11:36:32 +00:00