Commit Graph

64 Commits

Author SHA1 Message Date
Jellyfrog 0040f38d1e Python 3.4 is the minimum requirement (#11881)
And not 3.5
2020-06-30 09:09:39 -05:00
Tony Murray 8bc196d242 Send to PHP 71/Python2 support branch 2020-05-09 14:29:01 -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
Neil Lathwood 5f5dc2a854 feature: Peeringdb integration to show the Exchanges and peers for your AS' (#6178) 2017-03-22 10:17:13 +00:00
Neil Lathwood fd93d7ef7f fix: daily.sh install path (#5152) 2016-12-12 15:00:09 +00:00
Neil Lathwood 63fc4679db feature: Added support for sending email notifications to default_contact if updating fails (#5026) 2016-12-12 14:26:17 +00:00
Tony Murray 287449510e Run daily.sh as the user set by $config['user'] (#5036) 2016-12-01 19:45:53 +00:00
Tony Murray a0e33786fa fix: daily.sh log_dir failed when install_dir and log_dir were not set 2016-11-14 16:03:51 -06:00
Layne 768158062f refactor: daily.sh updated (#4920) 2016-11-11 07:14:57 +00:00
Neil Lathwood 126f82843e fix: Updated check to use != in daily.sh (#4916) 2016-11-01 17:57:18 +00:00
Neil Lathwood 635bc7036f Revert "Refactored and added support for $config['log_dir']" (#4911) 2016-11-01 08:53:57 +00:00
Layne 9f50559f58 refactor: Refactored and added support for $config['log_dir'] to daily.sh 2016-11-01 00:25:08 +00:00
Neil Lathwood e1fac851f9 refactor: Update alert rules to generate sql query and store in db (#4748) 2016-10-15 00:29:55 +01:00
deutor 3691928455 fix: support for Bash version 3 in daily.sh (#4347) 2016-09-06 17:31:16 +01:00
laf 318c9cd2b0 Added cleanup for old RRD files 2016-07-30 16:57:09 +01:00
laf b8d9ab3292 Added the logging of which version upgrading from -> to 2016-07-09 00:11:45 +01:00
laf c14577db34 Added alert log purge setting - defaults to 365 2016-05-02 19:06:51 +00:00
Richard dc0f695796 Add optional cleanup task for old bill_data 2016-03-07 18:31:12 +00:00
Christopher Smith d9098d3c3c if no code is updated, do a schema update check and also a cleanup. move to a separate script call to make it easier to add more tasks if required in the future. 2016-02-23 13:38:29 +11:00
Christopher Smith 731c2eb443 check if daily.php returns 0 and only do the db clean up if it does (dont update submodules or do a schema upgrade etc) 2016-02-23 09:20:14 +11:00
Daniel Preussker ddfdbfac4d Typo in Daily 2016-01-25 14:14:08 +00:00
laf 58d585e6fe Updated daily.sh/daily.php to support removing users that have not logged in for X days - Radius only for now 2015-12-13 16:16:39 +00:00
Daniel Preussker 10ca173f1b Don't abort logfile error
Q&A Missed this, Apologies
2015-12-10 10:04:56 +00:00
Daniel Preussker 45b6a4c558 Restructured daily.sh
Added staged update and check for distributed poller setups
2015-11-22 16:27:04 +00:00
Daniel Preussker 0ff693bd0e Added notifications poller,page,schema,display 2015-11-21 11:22:59 +00:00
Daniel Preussker 982121bb6e fixup 2015-08-03 17:19:16 +00:00