44 Commits

Author SHA1 Message Date
0ae1f30f7d Indent cleaning for bills (#10268)
* Correct indentation and empty lines

* Update new_bill.inc.php

* Update addoreditbill.inc.php
2019-05-28 07:08:24 -05:00
9c837bee87 Added aggregate config option to Billing 95th percentile calculations (#10202)
* Added configuration options to aggregate input and output bits before making 95th percentile billing calculations

* Changed aggregate to per-bill instead of global.  Added config options for making aggregate the default selected option.  Refactored out mres() calls in touched files.  Changed to Config::get where appropriate.

* Fixed documentation typo

* Fixed scope of aggregate default config option to be under billing
2019-05-27 21:44:02 -05:00
7c86234815 fix an issue with bills with no data (#10009)
Still gets a an error message when graphing, but it better relates to what the issue is.
2019-03-22 19:36:50 -05:00
fad0bffc43 Escape SNMP & IPMI shell commands (#9537)
hopefully doesn't break anything
Mostly issues with snmp oids and options containing spaces.  Try to remove all of those.

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-16 13:42:50 +00:00
2d2612de91 Fix broken and unused sql query in billing code (#9039) 2018-08-19 22:35:11 -05:00
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
37bdba7c0a Change Billing Graph Data Max/Avg/Last from bytes to bits (#8270) 2018-02-21 21:55:08 +00:00
10829893ec api: Added Billing Graphs & Data (#8245)
* Move Billing/Bandwidth Graphs to common format, extract data generation to central function

* Add API functions to access billing graphs and graph data

* Scrutinizer fixes

* Fix transfer graphs with from/to

* Scrutinizer Fix

* Fix docs, transfer page and missing from API param

* Document and fix reducefactor, Add Graph Stats to Graph Data

* Standardise times in graphdata

* Fixed renamed function for History GraphData
2018-02-20 14:57:56 +00:00
9284bc60ff Update code in includes to be PSR-2 compliant (#4220)
refactor: Update code in /includes to be psr2 compliant #4220
2016-08-28 18:32:58 +01:00
laf
11d91215cb Added predicated usage to bills, basic at present 2016-08-13 01:11:20 +01:00
laf
5a9a963a03 Final fixes for billing 2016-07-17 20:35:50 +01:00
laf
eb58daa207 Scrut fixes 2016-07-07 19:10:37 +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
2455feb1c9 Scrut fix + Notification 2016-03-07 18:41:51 +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
d759c4ac9d Improve performance of billing poller 2016-03-01 10:20:25 +00:00
0a48338fe0 Fix getRates should return in and out average rates
/billing-calculate.php depends on these return values.
2015-11-02 03:48:12 +02:00
d8693f05ae Fix coding style part 2 2015-07-15 11:04:22 +02:00
a4d3c8709d Fixed the scrut coding style issues 2015-02-22 16:45:40 +00:00
4fad2ccc68 syntaxer run
git-svn-id: http://www.observium.org/svn/observer/trunk@2967 61d68cd4-352d-0410-923a-c4978735b2b8
2012-04-05 16:44:58 +00:00
ff9d09911b more accurate 95th (order by rate, not delta, duh)
git-svn-id: http://www.observium.org/svn/observer/trunk@2772 61d68cd4-352d-0410-923a-c4978735b2b8
2011-12-12 12:05:25 +00:00
d0cee15757 billing fixes and improvements
git-svn-id: http://www.observium.org/svn/observer/trunk@2764 61d68cd4-352d-0410-923a-c4978735b2b8
2011-12-07 13:52:46 +00:00
38f95ce512 fixes
git-svn-id: http://www.observium.org/svn/observer/trunk@2762 61d68cd4-352d-0410-923a-c4978735b2b8
2011-12-06 23:02:31 +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
f7eb392298 billing improvements from codekiller.
git-svn-id: http://www.observium.org/svn/observer/trunk@2715 61d68cd4-352d-0410-923a-c4978735b2b8
2011-11-05 14:55:08 +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
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
770ccc46a3 updates to billing setup
git-svn-id: http://www.observium.org/svn/observer/trunk@2448 61d68cd4-352d-0410-923a-c4978735b2b8
2011-09-12 10:51:50 +00:00
5f8edbc426 fixes to displaying billing (incomplete)
git-svn-id: http://www.observium.org/svn/observer/trunk@2420 61d68cd4-352d-0410-923a-c4978735b2b8
2011-09-05 17:09:50 +00:00
ebcbf22317 move includes/billing.php includes/syslog.php and includes/functions.php to dbFacile
git-svn-id: http://www.observium.org/svn/observer/trunk@2278 61d68cd4-352d-0410-923a-c4978735b2b8
2011-05-12 11:58:17 +00:00
4bc15529d4 eradicate split() in favour of explode()
git-svn-id: http://www.observium.org/svn/observer/trunk@2054 61d68cd4-352d-0410-923a-c4978735b2b8
2011-04-11 09:22:12 +00:00
bb4746d4d0 cleanups, small fixes and remove test-*php from the root
git-svn-id: http://www.observium.org/svn/observer/trunk@1998 61d68cd4-352d-0410-923a-c4978735b2b8
2011-03-31 10:51:02 +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
06ad6dc881 zeropad for jeeves
git-svn-id: http://www.observium.org/svn/observer/trunk@1877 61d68cd4-352d-0410-923a-c4978735b2b8
2011-03-16 15:02:39 +00:00
d077282444 Reindent/cleanup, remove dead files
git-svn-id: http://www.observium.org/svn/observer/trunk@1858 61d68cd4-352d-0410-923a-c4978735b2b8
2011-03-15 15:39:57 +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
dde365e30c many polling and discovery performance improvements
git-svn-id: http://www.observium.org/svn/observer/trunk@408 61d68cd4-352d-0410-923a-c4978735b2b8
2009-04-24 15:04:45 +00:00
7249a1d947 add jpgraph (Q LICENSE)
git-svn-id: http://www.observium.org/svn/observer/trunk@358 61d68cd4-352d-0410-923a-c4978735b2b8
2009-03-17 20:49:01 +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
f738fd09db cleanups
git-svn-id: http://www.observium.org/svn/observer/trunk@322 61d68cd4-352d-0410-923a-c4978735b2b8
2008-11-26 18:22:11 +00:00