Commit Graph

137 Commits

Author SHA1 Message Date
Jellyfrog
77c531527c Apply fixes from StyleCI (#12117)
* Apply fixes from StyleCI

* Disable style check
2020-09-21 14:54:51 +02:00
Tony Murray
ab6fa22c46 Hide pip3 missing error (#11987)
we don't care.
2020-08-01 09:27:59 -05:00
Tony Murray
0c334f130d Fix users that set a non-array for cors (#11921)
* Fix users that set a non-array for cors
combine two Env util classes

* Used the wrong thing.
2020-07-09 15:03:12 -05:00
Tony Murray
aac25798ed Merge pull request #11867 from murrant/more-install-changes
Fix validation and other issues when config.php is missing
2020-06-29 17:49:28 -05:00
Tony Murray
63ba612fe8 Drop group write validation (#11873)
causes more pain than it highlights issues
New install docs mitigate the original issue
2020-06-29 16:29:43 +02:00
Tony Murray
4aec56dc42 Merge pull request #11868 from murrant/fping6
Make fping work when fping6 is not present
2020-06-29 01:06:56 -05:00
Tony Murray
3cd240daf4 Merge pull request #11870 from murrant/remove-session-validate
PHP session is no longer required
2020-06-28 20:56:24 -05:00
Tony Murray
d4add95e1f reorganize code to be better 2020-06-28 20:48:11 -05:00
Tony Murray
dad79ae69b PHP session is no longer required 2020-06-28 20:07:20 -05:00
Tony Murray
79c46cbce0 Make fping work when fping6 is not present 2020-06-28 00:46:39 -05:00
Tony Murray
23c33f753f WIP validation cleanup missing config 2020-06-27 22:57:29 -05:00
Tony Murray
a5fbf853c9 validation fixes 2020-06-27 07:47:08 -05:00
Tony Murray
5f0388f0e3 Remove DB credentials from config.php
Better validation when config.php does not exist

Update docs and quote password

only populate legacy vars in config_to_json
drop .travis.yml config copy
remove credentials from config.php.default

Check for existance of .env instead of config.php in python scripts

legacy credential cleanup

tiny cleanups

consistent env for artisan server and artisan dusk
2020-06-27 07:47:08 -05:00
Tony Murray
224e191f14 Fix pip3 validation (#11788)
don't error when pip is missing
2020-06-08 08:11:53 -05:00
Tony Murray
6da2f43e6b Debug pass-through exceptions for Ignition (#11773)
* pass-through exceptions for ignition

* Warn when APP_DEBUG is enabled
2020-06-05 11:50:01 -05:00
Tony Murray
f96a24a916 Check python3 and pip3 versions (#11739) 2020-05-30 11:09:54 -05:00
Tony Murray
f7d77777fc Fix python validation user check (#11626) 2020-05-16 11:33:59 -05:00
Tony Murray
216f16f159 Validate PHP version mismatch (#11621)
* Validate PHP version mismatch on the web interface

* fixes
2020-05-15 23:44:18 -05:00
Tony Murray
8513026b1a Hide python user warning if deps met at system level (#11590) 2020-05-12 08:16:22 -05:00
Tony Murray
0e00454b8f Full path to requirements.txt in validate (#11581) 2020-05-09 14:26:24 -05:00
Tony Murray
257d596c3b Add python validation fix suggestions (#11563)
* add python fixes

* re-order python requirements so most important deps show first.

* Only check dependencies if we are running as the poller user
2020-05-08 09:54:30 -05:00
SourceDoctor
e170529692 Python3 Module Dependency Check (#11544)
* Python3 Modul Dependency Check

* code climate

* binary existance check

* move Python Modul Version Check

* .

* adding verbose argument

* args parser nicement

* enhance Validator for detailed approvements

* Update Python.php

* Update check_requirements.py

* python version to Version class
use Process

Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-05-06 10:58:17 -05:00
Jellyfrog
05507526c0 Set PHP 7.2.5 as minimum supported version (#11470) 2020-04-24 11:04:36 +02:00
Tony Murray
cc60a76c7b Show full path to ini file for timezone errors. (#11444) 2020-04-21 07:30:19 -05:00
Tony Murray
1c08c11a77 Remove Laravel helpers (#11428)
* Remove Laravel helpers

* Replace qualifier with import
2020-04-18 00:37:56 +02:00
Tony Murray
67f3d889b9 Only check depedencies once in validate.php (#11316)
* Only check depedencies once in validate.php

* Update librenms-service.py
2020-03-23 09:05:18 -05:00
Nick Hilliard
fb7c578fdf symfony requires php-dom extension (#11320) 2020-03-22 14:02:07 -05:00
Tony Murray
df16de9d2f Refactor Datastores to allow future improvements. OpenTSDB Tags. (#11283)
* Datastores to object oriented code, using the Laravel IoC container

Change instantiation
better DI
move OpenTSDB

Small re-orgs

remove unused stuff

Fix graphs and other scripts

Use DI for all except rrd

fix up connection error handling

Add tests, fix up a "few" things
Add Config::forget()

Style fixes

Don't reference legacy code

remove accidental code paste

Add datastores phpunit groups

some tests

* rebase fixes

* some test fixes

* shorter tests

* shorter tests

* Don't except when rrdtool can't be started.

* restore tests

* fix rrd tests

* fix iterable change upstream

* fix isValidDataset

* fix invalid data bug

* fix mysql incorrect ds

* fix issue with data that is too long

* use regular data_update()

* Use log facade

* OpenTSDB mis-ordered arguments fix

* Making a singleton with different options makes different singletons.  Just use the global config settings to disable datastores.

* only filter tags for datastores that won't it don't modify the tags permanently

* Update copyrights to include original authors.

* Stats for all datastores

* Fix mysql sends different rrd / other ds names

* fix snmp last stats not initialized
remove unused function

* remove unused function and move single use function closer to its use

* InfluxDB does not need to update null or U values.
Skip write if all fields are empty

* Fix smart value checks

* fix style issues

* Make sure port data is stored the same way as before for Graphite and OpenTSDB
Add ifIndex tag to all to be compatible

* Missed rrdtool_tune() call

* Test update WIP

* OpenTSDB now includes tags

* fix style
2020-03-16 09:17:58 -05:00
SourceDoctor
4e349efd11 Rewrite Poller Management to Blade/Eloquent (#11277)
* Rewrite Poller Management to Blade/Eloquent

* remove further no more needed file

* Code Climate

* Code Climate

* hardcode tabs

* change URL style

* change prefix from poller-groups to poller

* .

* parameter fix

* Refactor to use more direct routing.
remove switch statement.

Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-03-13 20:58:37 +01:00
Tony Murray
7fe895bd08 Revert "Refactor datastores to classes (#9179)" (#11273)
This reverts commit e5dad7a64e.
2020-03-11 07:52:52 -05:00
Tony Murray
e5dad7a64e Refactor datastores to classes (#9179)
* Datastores to object oriented code, using the Laravel IoC container

Change instantiation
better DI
move OpenTSDB

Small re-orgs

remove unused stuff

Fix graphs and other scripts

Use DI for all except rrd

fix up connection error handling

Add tests, fix up a "few" things
Add Config::forget()

Style fixes

Don't reference legacy code

remove accidental code paste

Add datastores phpunit groups

some tests

* rebase fixes

* some test fixes

* shorter tests

* shorter tests

* Don't except when rrdtool can't be started.

* restore tests

* fix rrd tests

* fix iterable change upstream

* fix isValidDataset

* fix invalid data bug

* fix mysql incorrect ds

* fix issue with data that is too long

* use regular data_update()

* Use log facade

* OpenTSDB mis-ordered arguments fix

* Making a singleton with different options makes different singletons.  Just use the global config settings to disable datastores.

* only filter tags for datastores that won't it don't modify the tags permanently

* Update copyrights to include original authors.

* Stats for all datastores

* Fix mysql sends different rrd / other ds names

* fix snmp last stats not initialized
remove unused function

* remove unused function and move single use function closer to its use

* InfluxDB does not need to update null or U values.
Skip write if all fields are empty

* Fix smart value checks

* fix style issues
2020-03-10 19:08:00 -05:00
SourceDoctor
c059225652 Changed poller member validation step and message (#11239) 2020-03-05 16:50:53 +01:00
Tony Murray
21518a5cfd Validate that php sockets is available (#11177) 2020-02-25 19:00:12 -06:00
joseUPV
3b8e6c619e Change Poller time validation (#11108) 2020-02-11 20:32:54 +01:00
CrazyMax
58459ff0c5 Detect if LibreNMS is installed from the official Docker image (librenms/docker#46) (#10879) 2019-11-25 14:05:34 +00:00
Tony Murray
1111f0a027 Fix mysql table engine validation (#9989)
It would never show because the schema was checked first and it would always be wrong if the table engine was myisam.
2019-03-18 21:26:49 -05:00
David
569b1f0fb2 Fix database validation for MySQL 8 (#9923) 2019-03-09 14:15:03 -06:00
Paul Parsons
fd2bd62f57 fix: removed curly bracket from end of the command 2019-02-24 21:20:17 +00:00
Tony Murray
2f8964ce27 Recommend InnoDB engine in validation (#9799) 2019-02-12 17:55:52 -06: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
61a48fbdd2 Fix schema validation and os def cache invalidation (#9789) 2019-02-06 10:53:25 -06:00
Tony Murray
e5eb32c4a9 Migration fixes (#9776)
* add migrate:install to lnms, but hide it

* Fix Database migration validation

* remove extra import

* Don't allow install to continue if db build fails
2019-02-05 16:50:51 -06:00
Tony Murray
3a1d13dcd1 Rename librenms script to lnms (#9696) 2019-01-18 11:39:10 -06:00
Tony Murray
10f6eac677 Validate database constraints (#9670)
* Validate database constraints

* Fix some differences with migrations

* Update functions.php
2019-01-17 08:59:42 -06:00
Tony Murray
e403d01967 Fix first column validate (#9683)
* Fix first column validate

* fix index, remove vardump
2019-01-17 08:58:26 -06:00
Paul Heinrichs
ebe2ecf524 Laravel migrations (#8868)
* Add migrations and seeds

* Fix spacing validation issues

* Fix linting

* Update tabs to spaces

* Update daily and install process

* Make build-base.php use the new migrations if empty or at dbschema 1000.
Seed 1000 into the database.
Temp fix for the route table index length (this table basically isn't used...)

* Fix typo in seed.
Hard code legacy schema checks to version 1000 (999 would have worked as is)

* Port association table no longer exists

* Make database validate again

* DB schema, remove as many DB::statement as possible

* update migrations
add librenms cli entry point (artisan)
update validate to check laravel migrations

* remove statements from users migration

* Fix up daily.sh and the 1000 migration

* Update migrations to current state
Take advantage of environment variables to set DB credentials.

* Fix style issues

* Update schema

* fix test db collation

* Fix migration table definition

* update db migrations

* Update migrations

* Update stats callback.  Just count the total migrations applied.

* Update 1000.sql.

* update migrations

* remove the graph type seeder, it is no longer needed

* update docs

* fix whitespace

* remove extra schema

* update tests

* fix sort

* add message

* dbSchema should actually be 1000

* add character set to db create

* Fix some artisan issues

* Update schema
2019-01-14 06:44:23 -06:00
Tony Murray
def8b3e514 Add librenms command (#9619)
* Add librenms command

Hook up to artisan.  Hide dev commands and most other commands if app environment is production.
Register all commands for php artisan or when not in production.

* remove dead end line

* Console application name and version.
Had to shift some stuff from legacy code, but deferred others as it was too extensive of a change.

* switch check order

* always get local version now

* update array format

* whitepace

* fix style
2019-01-08 21:42:56 -06:00
voipmeister
2618bb5c7a Typo fix (#9541)
* Typo fix

* Typo fix

* Added database to 'Your database schema...' and remove a double space
2018-12-13 07:16:08 -06:00
Tony Murray
c7f70b6e47 Added detection if this is a git based install or not. (#9379)
Not sure about the warning or text.

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`
After you are done testing, you can remove the changes with `./scripts/github-remove`.  If there are schema changes, you can ask on discord how to revert.
2018-12-07 22:29:37 +00:00
Tony Murray
0ec8f18459 Graph of overall poller performance (#9381)
* Graph definitions

* Stacked.

* Add display

* remove old poll-log, add redirect

* Handle undefined data in graphs

* Standard pollers

* Change doc to send to the global poller module page.

* remove test code :)

* Link parent menu
2018-10-26 21:04:30 +01:00