49 Commits

Author SHA1 Message Date
eeb3d58f5b Improved Logging and Debugging (#8870)
Use Log facility when Laravel is booted.
Update init.php so we can easily boot Laravel for CLI scripts. (and just Eloquent, but that may go away)
Move all debug setup into set_debug() function and use that across all scripts.
Log Laravel database queries.
Send debug output to librenms log file when enabling debug in the webui.
Allow for colorized Log CLI output. (currently will leave % tags in log file output)

** Needs testing and perhaps tweaking still.

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-13 23:08:00 +01:00
72ce39cf9b refactor: schema updates (#6370)
Test the schema files with STRICT_TRANS_TABLES and fix any issues
2017-04-13 10:18:12 +01:00
d5296319fb refactor: MySQL strict and query fixes (#5338)
* refactor: MySQL strict and query fixes

* moved sql file
2017-01-13 06:47:16 -06:00
9a33464c52 refactor: Centralize includes and initialization (#4991) 2016-11-21 20:12:59 +00:00
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
7dec670494 refactor: Updated a lot of references to LibreNMS - copyright still left intact (#4339) 2016-09-08 08:12:23 -05:00
abc6a5b799 PSR-2 Final cleanup (#4247)
refactor: Final PSR2 cleanup
2016-08-28 23:32:55 +01:00
200e670315 Fix defunct process issues: create Proc class (#4210)
* Proc class
Encapsulate processes in a class, when they go out of scope, we can use the __destruct() process to make sure the process terminates.

* Fix rrdtool_last checks failing

* Don't close rrdtool in rrd_graph
Try to start rrdtool process if they haven't been started yet
Remove some extra debug output

* phpdocs added
several cleanups
should still be functioning the same
Only open one  rrdtool process for graph.php
2016-08-26 07:50:29 +01:00
e80a385b7f RRDtool dual process (remote creation/check) (#4104)
* Prepare for dual rrdtool processes
Disabled at this time
Split out rrdtool version checks into rrdtool_create_command()
Tests for rrdtool_create_command()
Fixes a few small issues.

* Enable dual process and remote rrd check/creation

* remove full path for remote commands

* Doc updates
minor fix to rrdtool_tune()

* Set up bootstrap for phpunit
Fix issues with FileExistsException

* Attempt to fix phpunit

* Fix classloader and bootstrap to use full paths only (not depending on $config)

* Fix phpunit tests, config.php does not exist.
2016-08-22 16:32:05 +01:00
09b4497778 When ifSpeed is not returned by the switch, billing was broken. 2016-08-01 14:46:33 +02:00
laf
5a9a963a03 Final fixes for billing 2016-07-17 20:35:50 +01:00
laf
47f7c37b03 Updated code to detect bad data 2016-07-17 07:16:38 +01:00
laf
e5e1e89331 Sanity check the in/out_delta value, if it's out of the range of the
ifSpeed then we use the previous value
2016-06-15 16:25:14 +00:00
laf
bc26c910ef Fixed issue with new bills not grabbing data 2016-04-21 11:37:46 +00:00
042ddaa6fe Remove duplicate data from bill_data and add PK to prevent recurrence 2016-03-07 18:31:12 +00:00
19e9cda8d0 Replace port_in/out_measurements with latest values only 2016-03-07 18:31:12 +00:00
648db1e455 Fix previous delta being reported when no traffic passed 2016-03-01 12:41:41 +00:00
d8693f05ae Fix coding style part 2 2015-07-15 11:04:22 +02:00
a507ac2479 Move the \$now variable to where it is needed 2015-02-18 18:34:57 +00:00
63d428c0e1 Revert "update copyright notice" after discussion with Paul
This reverts commit 774233327e3b300011b7a6fdcbef3a375f34b8b8.
2013-10-28 12:01:36 -07:00
774233327e update copyright notice 2013-10-28 01:46:59 -07:00
8c83b6a3c7 update foundry mibs
git-svn-id: http://www.observium.org/svn/observer/trunk@3250 61d68cd4-352d-0410-923a-c4978735b2b8
2012-05-29 13:08:01 +00:00
4db1454e92 move from port_id to interface_id. make ports discovery only discover. add some cleaner functions. add a tiny bit of alerting infrastructure.
git-svn-id: http://www.observium.org/svn/observer/trunk@3195 61d68cd4-352d-0410-923a-c4978735b2b8
2012-05-16 13:25:50 +00:00
dbf212f652 phpDocumentator headers. retire static-config. IF YOU ARE READING THIS, REMOVE IT FROM THE BOTTOM YOUR CONFIG.PHP. YES. YOU.
git-svn-id: http://www.observium.org/svn/observer/trunk@3150 61d68cd4-352d-0410-923a-c4978735b2b8
2012-05-09 10:01:42 +00:00
6b210ea056 change directory to observium root, now also for other commandline tools
git-svn-id: http://www.observium.org/svn/observer/trunk@2990 61d68cd4-352d-0410-923a-c4978735b2b8
2012-04-08 10:44:41 +00:00
ed6ffa6067 syntaxer run
git-svn-id: http://www.observium.org/svn/observer/trunk@2964 61d68cd4-352d-0410-923a-c4978735b2b8
2012-04-05 16:17:41 +00:00
a1e96f708f billing rewrite (disabling svn after)
git-svn-id: http://www.observium.org/svn/observer/trunk@2758 61d68cd4-352d-0410-923a-c4978735b2b8
2011-12-06 22:17:37 +00:00
d94b0bd1c2 add bill from device/port, some billing changes
git-svn-id: http://www.observium.org/svn/observer/trunk@2756 61d68cd4-352d-0410-923a-c4978735b2b8
2011-12-05 12:15:41 +00:00
a369c442eb syntaxer run
git-svn-id: http://www.observium.org/svn/observer/trunk@2643 61d68cd4-352d-0410-923a-c4978735b2b8
2011-10-04 14:38:54 +00:00
66dd6dbd61 use rrdtool pipe in poller.
git-svn-id: http://www.observium.org/svn/observer/trunk@2631 61d68cd4-352d-0410-923a-c4978735b2b8
2011-10-01 14:54:06 +00:00
f87ed09e1b more code cleanup
git-svn-id: http://www.observium.org/svn/observer/trunk@2519 61d68cd4-352d-0410-923a-c4978735b2b8
2011-09-20 14:34:27 +00:00
d864ce234f kill a whole bunch of trailing spaces
git-svn-id: http://www.observium.org/svn/observer/trunk@2516 61d68cd4-352d-0410-923a-c4978735b2b8
2011-09-20 09:55:11 +00:00
b03bb8181c fixes to billing. add realtime graphs for port bits.
git-svn-id: http://www.observium.org/svn/observer/trunk@2424 61d68cd4-352d-0410-923a-c4978735b2b8
2011-09-08 02:57:02 +00:00
164ada67d7 no debug!
git-svn-id: http://www.observium.org/svn/observer/trunk@2301 61d68cd4-352d-0410-923a-c4978735b2b8
2011-05-13 12:36:25 +00:00
72d0af238c fix poll-billing to use db*
git-svn-id: http://www.observium.org/svn/observer/trunk@2300 61d68cd4-352d-0410-923a-c4978735b2b8
2011-05-13 12:34:37 +00:00
f55a30f744 some formatting cleanups, introduce some more FIXMEs to look at, plus replace mysql_fetch_array by mysql_fetch_assoc, for great justice
git-svn-id: http://www.observium.org/svn/observer/trunk@2029 61d68cd4-352d-0410-923a-c4978735b2b8
2011-04-06 13:54:50 +00:00
51e242b896 FFFFFFFffffffuuuuuuuuuuuuuuuuuuuuuu
git-svn-id: http://www.observium.org/svn/observer/trunk@2028 61d68cd4-352d-0410-923a-c4978735b2b8
2011-04-05 14:16:27 +00:00
340c71b2e7 more code cleanups, modify renamehost to also take a source parameter so we can build a renamehost function into the web gui some day
git-svn-id: http://www.observium.org/svn/observer/trunk@1980 61d68cd4-352d-0410-923a-c4978735b2b8
2011-03-27 10:21:19 +00:00
de7ff537cc revert r1957 patch
git-svn-id: http://www.observium.org/svn/observer/trunk@1960 61d68cd4-352d-0410-923a-c4978735b2b8
2011-03-23 09:54:56 +00:00
6501cd29b5 - Code cleanup by Bastian Widmer.
git-svn-id: http://www.observium.org/svn/observer/trunk@1957 61d68cd4-352d-0410-923a-c4978735b2b8
2011-03-22 20:27:39 +00:00
46e2af2c7f fix some billing shit. thanks to fall0ut
git-svn-id: http://www.observium.org/svn/observer/trunk@1954 61d68cd4-352d-0410-923a-c4978735b2b8
2011-03-22 12:09:25 +00:00
c6428480bc remove dead map.php code, rename some .inc to .inc.php files, general trailing space cleanup part 1, some reindent. No expected functionality change whatsoever ;)
git-svn-id: http://www.observium.org/svn/observer/trunk@1824 61d68cd4-352d-0410-923a-c4978735b2b8
2011-03-12 08:50:47 +00:00
92777ab03b cleanups, reindents, etc
git-svn-id: http://www.observium.org/svn/observer/trunk@1821 61d68cd4-352d-0410-923a-c4978735b2b8
2011-03-11 18:03:49 +00:00
cd76567edb ginger patch
git-svn-id: http://www.observium.org/svn/observer/trunk@1699 61d68cd4-352d-0410-923a-c4978735b2b8
2010-09-03 18:26:59 +00:00
4fc6629f00 billing bugfix :)
git-svn-id: http://www.observium.org/svn/observer/trunk@1228 61d68cd4-352d-0410-923a-c4978735b2b8
2010-06-21 04:28:37 +00:00
fca6fafb60 include defaults.php before config.php, not FROM config.php
git-svn-id: http://www.observium.org/svn/observer/trunk@966 61d68cd4-352d-0410-923a-c4978735b2b8
2010-02-27 14:44:38 +00:00
0bee34b6ad change interfaces table to ports (to match GUI conventions)
git-svn-id: http://www.observium.org/svn/observer/trunk@889 61d68cd4-352d-0410-923a-c4978735b2b8
2010-02-20 17:22:22 +00:00
96bb007d4b per-port SNMP polling. thanks to jonathan@studenteninternet.be
git-svn-id: http://www.observium.org/svn/observer/trunk@340 61d68cd4-352d-0410-923a-c4978735b2b8
2009-02-02 16:00:11 +00:00
ab77b6e2f1 Fixing lots of bugs and fixing billing
git-svn-id: http://www.observium.org/svn/observer/trunk@129 61d68cd4-352d-0410-923a-c4978735b2b8
2008-03-09 21:13:27 +00:00