Commit Graph

42 Commits

Author SHA1 Message Date
Tony Murray 586f7e90c5 fix: validate mysql queries (#5365) 2017-01-09 20:17:16 +00:00
Tony Murray 6890a71be4 feature: validate list devices that have not been polled in the last 5 minutes or took more than 5 minutes to poll (#5037) 2016-11-23 17:41:13 +00:00
Tony Murray 9a33464c52 refactor: Centralize includes and initialization (#4991) 2016-11-21 20:12:59 +00:00
Neil Lathwood 5f8e5e7d3a Added check for local timezone = php timezone (#4965) 2016-11-15 07:18:07 +00:00
Layne 99e5970357 Change output to create a table when pasted into github (#4938) 2016-11-04 19:26:05 +00:00
Tony Murray 2eb504f194 fix: do not show fail if running as the librenms user + slightly less false positives (#4821) 2016-10-19 20:14:12 +01:00
Tony Murray c5177c26af feature: validate.php: check poller and discovery status (#4663) 2016-10-03 17:48:19 +01:00
Tony Murray d2193f76ca feature: allow scripts to be run from any working directory (#4437)
* feature: allow validate.php to be run from any working directory

* remove redundant realpath() call

* re-add realpath() to remove symbolic links

* realpath() isn't needed...

* chdir() in all php scripts in ./ and ./scripts/

* update-sql.php clearly is not used, as it was broken.

* Change some scripts to executable
Remove extra chdir() call in snmp-scan.php

* Missed console-ui.php
Kind of fixed console-ui.php help output

* Re-add newline
2016-09-14 16:53:04 +01:00
deutor 5f68bb82cd Formatting issues
Formatting issues
2016-08-31 11:01:33 +02:00
deutor 74675a7b00 Change the way username is obtained
Username should be obtained by getting user name for effective UID. Using USERNAME or USER variables is not the right way (when you just "su" and not "su - " it keeps previous username):
id  :  uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel) context=user_u:system_r:unconfined_t
./validate.php:   [FAIL]    You need to run this script as root
echo $USER: <name of user that did su>
2016-08-31 10:20:07 +02:00
Tony Murray abc6a5b799 PSR-2 Final cleanup (#4247)
refactor: Final PSR2 cleanup
2016-08-28 23:32:55 +01:00
Tony Murray b8e9b2d917 Implement an autoloader (#4140)
* Implement an autoloader

When cleaning up classes for psr2, things got a bit unwieldy, so I implemented a class autoloader.
I created a PSR-0 compliant LibreNMS directory and moved all classes there that made sense.
Implemented LibreNMS\ClassLoader which supports adding manual class mappings

This reduces the file includes needed and only loads classes when needed.

* Add teh autoloader to graph.php

* Add a small bit of docs
Fix incomplete class in includes/discovery/functions.inc.php
2016-08-21 14:07:14 +01:00
laf 817ac245c0 Updated validate script to put markers in place 2016-08-01 19:42:48 +01:00
laf b35321cdad Updated version_info to output unix timestamp 2016-07-31 22:41:39 +01:00
Tony Murray f10d74f372 Validate.php timezone failure
Move the timezone into the constructor.
2016-07-22 10:09:25 -05:00
Tony Murray aa23223f71 Also check the output of git before saying there is modified files
Indent files to improve readability
2016-07-14 15:46:24 -05:00
Neil Lathwood 0f5cfb5af1 Merge pull request #3782 from murrant/git-date
Add date to git version info
2016-07-07 19:09:15 +01:00
Tony Murray 846c5ab0c9 Add date to git version info
valdiate: local tz, rfc2822
poller: iso 8601
about: iso 8601 -> browser local
Also, do not fetch github info on about page, it isn't used.
2016-07-06 13:17:13 -05:00
laf a01dc6620d Changed mysql strict from warn to fail 2016-07-06 14:47:07 +01:00
Tony Murray 080c59c387 Correct check for command results. 2016-07-01 16:16:23 -05:00
Tony Murray 2dbec67088 Run git as the configured user when ./validate.php is run as root
Move the modified files check out of the get_version function
2016-07-01 12:49:44 -05:00
laf dc0379cdee fix php 5.4 in validate 2016-05-02 21:41:36 +00:00
Tony Murray bf1e7c2822 Three new validate.php checks
* Check that $config['install_dir'] is set correctly by checking that config.php exists there.
* Check if the local branch is not master, warn that it will prevent updates
* Check for modified files and list them (this will not include staged files)
2016-04-29 12:53:02 -05:00
laf ad45ade8a0 Added check for php.ini timezone being set 2016-04-26 13:08:21 +00:00
laf e64483521b Added command to chown install dir to correct user 2016-04-23 15:13:43 +00:00
Paul Gear 1a3213b81f Minor clarifications 2016-03-17 10:18:16 +10:00
laf d85a9f688f Removed innodb check from daily and updated validate to warn 2016-03-03 20:52:23 +00:00
laf 0e83e14405 Added rrdcached check, disable_function check and more binary location checks 2016-02-11 21:26:06 +00:00
KHobbits 5ebe6b44c0 Code clean up 2016-02-02 00:56:19 +00:00
KHobbits 92a7e5796d Add ./validate.php -m rrdcheck
This will loop through rrd files and highlight any corrupt files.
2016-02-01 23:29:37 +00:00
laf b7630667f4 Removed logs folder from being excluded from validate check 2016-01-25 23:17:02 +00:00
laf fdc0eca44d Centralised version info + used in output 2016-01-06 00:14:35 +00:00
laf 106a83308c Added checks for php extensions and classes we depend on 2015-12-10 23:02:48 +00:00
laf 2e791308f1 Centralised innodb buffer check and added to validate 2015-11-19 10:20:56 +00:00
laf 4cc9482dbe Added support for specifying user in config and then validating install 2015-09-21 21:06:57 +00:00
laf b1c7b1ee67 Added docs for MySQL strict mode + update validate to warn about it 2015-08-06 19:02:05 +00:00
laf 5c5c7fdd76 Finished distributed poller check 2015-07-24 07:52:28 +01:00
laf 5abd0f2e62 Adding validation of poller 2015-07-24 07:39:20 +01:00
Job Snijders d8693f05ae Fix coding style part 2 2015-07-15 11:04:22 +02:00
Mike Rostermund a41f0922a2 Added a few missing characters 2015-05-27 09:35:52 +02:00
laf 435f47d42a Added check for binaries - fping 2015-05-24 21:41:42 +01:00
laf 32c547cedd Added validation tool and docs 2015-05-22 16:35:38 +01:00