Commit Graph

379 Commits

Author SHA1 Message Date
Tony Murray
830429ee03 Fixed .gitingore "changed" files with github-remove script (#9616)
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.
2019-01-06 15:36:04 +00:00
VVelox
fd573bc879 json-app-tool fix (#9593)
* add insert the metrics stuff into the right place now

* properly exit now when -l is given or -k, -m or -s is not given

* Update json-app-tool.php
2018-12-28 20:11:04 -06:00
Tony Murray
1def6897a6
allow pre-commit.php to work without changes (#9597)
* allow pre-commit.php to work without changes

* make it actually work :D
2018-12-28 20:05:52 -06:00
Neil Lathwood
a5eddc0393 Updated dlink support with additional health,mempools and processors (#9464)
* Updated dlink support with additional health,mempools and processors

* Update dlink.inc.php

* Update dlink.inc.php

* Added test data

* add tests/data/dlink_dgs-1510-28.json

* actual data for the new items
2018-12-19 11:29:00 -06:00
Tony Murray
ad41a18f5c
GitHub test script updates (#9507)
* GitHub test script updates
add --reject to apply so it will skip binary files since GitHub does not create diffs for them correctly
Add new directories to the removal cleanup. Remove non-existant ones.

* Cleaner way to apply skip png files explicitly.
That way patches are still atomic.
2018-12-05 10:48:56 -06:00
tarik
f91fca8072 fixing option to let user pick saved test data filename, exit if ther… (#9242)
* fixing option to let user pick saved test data filename, exit if there are many os/variant combination for a single output filename

* fixing style issues

* Update save-test-data.php

* Update save-test-data.php
2018-11-21 13:27:53 -06:00
VVelox
e4ac31890e add a tool for working with JSON apps (#9084)
* add initial work on script for working with json apps

* finish the code portion

* -h now done

* rename it to be slightly more accurate

* make hash key strings

* exit if -a is not present

* now exit after checking the file if -s or -t is given

* now properly add the applications key
2018-11-21 08:18:12 -06:00
Luuk Paulussen
a143452e5d Add new sysDescr string for AlliedWare Plus products. (#9430)
* Add new sysDescr string for AlliedWare Plus products.

Release 5.4.8-2.1 of AlliedWare Plus will change the format of the
sysDescr string. This patch updates Allied Telesis yaml files to work with
this change.

Signed-off-by: Luuk Paulussen <luuk.paulussen@alliedtelesis.co.nz>

* save-test-data.php: Use correct variable for 'os' argument.

Signed-off-by: Luuk Paulussen <luuk.paulussen@alliedtelesis.co.nz>

* Create awplus_5.4.8-2.json

* Update awplus_5.4.8-2.json
2018-11-20 16:57:23 -06:00
Tony Murray
1d48cf7db2 Discovery YAML. Do not implicitly append $index (#9315)
Require it explicitly. Makes it easier to understand and matches the style of other values

Questionable YAML changes (either broken before or now broken):
secureplatform: haStatCode
ptp600: receiveModulationMode

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-11-10 23:45:24 +00:00
Stefan
4695bc14df Added ScreenOS Syslog Hook (#9438)
* Add ScreenOS Syslog Hook

Adds Syslog Hook for ScreenOS
https://community.librenms.org/t/juniper-screenos-syslog-hook/6146

* Update Syslog.md

* Update syslog-notify-oxidized.php
2018-11-10 22:12:12 +00:00
CrazyMax
07162ae1fe Remove legacy application left over from migration (#9399)
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-10-29 22:26:02 +00:00
Neil Lathwood
0726d479ce
Revert how we deploy docs (#9394)
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.

- [ ] 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-10-27 23:16:41 +01:00
Neil Lathwood
1ee2e8e0e0
Updated to use new theme for docs site (#9320)
* Updated to use new theme for docs site

* Updated theme location

* Removed librenms.css

* Updated index page + re-added librenms.css

* Use built in theme modification

* flexbox grid, dump bootstrap

* tidy up things

* Added path and updated deploy script + mkdocs config

* Removed db schmea changes

* Updated to install python/pip 3

* Removed pip3 install

* Pip3 install

* Updated deploy-docs

* Updated deploy-docs
2018-10-27 23:04:34 +01:00
Tony Murray
be642f0173
Include test data in tests os filter (#9387) 2018-10-25 13:44:17 -05:00
Tony Murray
daec72f8a0 Move ext-mysqlnd to suggested for now (even though it is actually required) (#9229)
* Move ext-mysqlnd to suggested for now (even though it is actually required)
Remove extra dependency version locks, they are more trouble than they are worth.  I just run composer with php 5.6 when updating composer.lock.
Update dependencies.

* Trigger full build on composer updates

* Update composer.json
2018-09-20 00:05:10 +01:00
Tony Murray
2c7a19712f Run all tests in os group when testing specific OS (#9235)
https://phpunit.de/manual/6.5/en/textui.html#textui.examples.filter-patterns

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-09-19 23:18:15 +01:00
Tony Murray
87ed73ec5c More specific test filtering (#9226)
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-09-18 20:54:22 +01:00
mattie47
22f07914e8 device: Add Allied Telesis oxidized syslog hook support (#9219)
This patch adds support for Allied Telesis AW+ devices running at
least 5.4.8-2.1 the ability to automatically have oxidized pull
configs when the device config has been saved.

Syslog hook for LibreNMS config.php
$config['os']['awplus']['syslog_hook'][] = Array
  ('regex' => '/IMI.+.Startup-config saved on/',
    'script' => '/opt/librenms/scripts/syslog-notify-oxidized.php');

Note: V5.4.8-2.1 should be released on roughly Nov 2 2018.

Refer to the following for latest release notes:

https://www.alliedtelesis.com/documents/release-notes-alliedware-plus-548
2018-09-18 10:31:40 -05:00
Neil Lathwood
5e9d032e16 Speed up testing based on changed files (#9214)
* Speed up testing based on changed files

* Updated to use phpunit instead of foreach loop
2018-09-17 21:32:41 -05:00
Tony Murray
d08593e8d6
Only run unit tests on 7.2 (#9201)
* Only run unit tests on 7.2
Move style check to 7.1

* stop build when a script fails
2018-09-13 12:18:42 -05:00
Tony Murray
a5f2dc46b5
Don't allow underscores in variant names (#9182)
* Don't allow underscores in variant names

* forgot test files

* Update test data
2018-09-11 19:21:07 -05:00
Tony Murray
32a7c50189
Use Laravel authentication (#8702)
* Use Laravel for authentication
Support legacy auth methods
Always create DB entry for users (segregate by auth method)

Port api auth to Laravel

restrict poller errors to devices the user has access to

Run checks on every page load.  But set a 5 minute (configurable) timer.
Only run some checks if the user is an admin

Move toastr down a few pixels so it isn't as annoying.

Fix menu not loaded on laravel pages when twofactor is enabled for the system, but disabled for the user.
Add two missing menu entries in the laravel menu

Rewrite 2FA code
Simplify some and verify code before applying

Get http-auth working
Handle legacy $_SESSION differently.  Allows Auth::once(), etc to work.

* Fix tests and mysqli extension check

* remove duplicate Toastr messages

* Fix new items

* Rename 266.sql to 267.sql
2018-09-11 07:51:35 -05:00
PipoCanaja
3f806fdff3 WebUI: Oxidized Device List: Link to config and refreshDevice Btn (#9129)
* WebUI: Direct link to oxidized config from list, oxidized refresh device capability

* WebUI: Direct link to oxidized config from list, oxidized refresh device capability

* Move oxidized_node_update in functions.php to avoid code duplication

* Update refresh-oxidized-node.inc.php

* Update functions.php
2018-09-04 19:09:27 -05:00
Tony Murray
0a210208e0 Fixed alert notes (#9093)
Fix test-template.php to work like the actual alert code.

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-08-27 21:02:36 +01:00
Tony Murray
f632521bda Display user id for auth_test.php -l (#9066)
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-08-24 09:05:23 +01:00
Tony Murray
d83b675090 Check for incorrect heartbeats in rrdtstep.php script (#9041)
Also, fix some incorrect config names (rrd_step -> rrd.step)

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-08-21 22:21:55 +01:00
Misha Komarovskiy
7c10909d06 Added Juniper Junos syslog notification code (#9006)
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-08-11 22:49:39 +01:00
Hayden Seitz
8ec1966093 Update scripts/rrdstep.php (#9004)
Use system_step in icmp_step and system_heartbeat
2018-08-09 12:58:12 -05:00
Tony Murray
deb405fac9 Alert transport fixes (#8967)
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-31 21:53:03 +01: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
PipoCanaja
83f414552d BUG - test-template.php upgrade after #8803 + #8908 PR (#8910)
* Update test-template.php

* Test-Template.php - Use AlertData Class

* Update test-template.php
2018-07-17 21:14:08 +01:00
PipoCanaja
2c26c08020 test-template.php fixed after #8803 PR
Hello

Following this post, ( https://community.librenms.org/t/bug-test-template-php-not-running-after-laravel-upgrade/4639/9 ), here is the PR.

PipoCanaja

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-16 23:58:14 +01:00
Neil Lathwood
ad6ec7f72a
Refactor alert templates to use Laravel Blade templating engine (#8803)
* Initial start on new templating support

* further updates

* more updates

* More working version

* Last fixes

* Small updates

* modified test to look for dbname.

* Schema update

* Added fix for not being able to disable Philips Hue transport

* Updated sql file

* Updated db_schema

* Set myclabs/deep-copy to be 1.7.x version in composer

* Fixes from murrant

* Forced nikic/php-parser to version 3.1.x in composer

* Updated composer to use custom fork of string-blade-compiler + fixed transport use

* Updated to always use correct template

* Merged legacy and blade templating engines

* Removed template type + fixed test-alert.php

* Added more template placeholders

* Added ability to reference data in templates as $alert->X

* Updated docs for templates

* Updated db_schema.yaml

* Added $alert->builder

* Clarify the use of $alert->builder

* Fixed the use of $alert->transport

* renamed schema file

* Added template validation

* Small update to fix travis issue

* Add Docs text to title bar

* Updated amqp to new of version

* Consistency in alert rule and template title bars
2018-07-14 22:15:43 +01:00
Tony Murray
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
Tony Murray
0ba76e6d62 New python service for poller, discovery + more (#8455)
Currently has a file handle leak (and will eventually run out of handles) related to the self update process.

Either need to fix that or rip out self-update and leave that up to cron or something.


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-06-30 12:19:49 +01:00
Tony Murray
e151aa94e4 github-remove the app directory too (#8849)
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-06-29 22:57:01 +01:00
Neil Lathwood
02348be861 Clear the OS cache when running collect and save test data scripts (#8767) 2018-05-26 10:33:56 -05:00
Tony Murray
fc77900266 fix pre-commit.php --quiet (#8771)
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-05-26 09:11:38 +01:00
Tony Murray
8afafe7eb0 refactor: pre-commit.php updates (#8679)
Disable the log for unit tests to speed things up hopefully
2018-05-09 12:53:45 +01:00
Tony Murray
350b3a1ef8 fix: Fixed alerting with dynamic contacts for rules made with the new builder (#8677)
Update test-alert.php too

Thanks to @dsgagi on Discord for identifying the issue
2018-05-08 21:35:21 +01:00
Neil Lathwood
d799600cab refactor: Updated the oxidized script (#8572)
* refactor: Updated the oxidized script

* Updated to use rmccue::Requests + Config::get()
2018-04-26 10:14:28 -05:00
PipoCanaja
b133aaa718 feature: Added support for syslog Oxidized notification on Huawei VRP switches… (#8562) 2018-04-17 10:32:41 +01:00
Tony Murray
d841625f12 refactor: Refactor database and config init (#8527)
* Refactor database and config init
Connect to the database without loading full config
Load config completely so post-processing is always done consistently.
Erase existing $config when loading, fixes issues in case we load the config twice.
If the database is not connected, don't try to load database settings. (Fixes some db errors on install)
Attempt to remove $config access/modification before init.php
Remove usage of db_name, that might not match the connected database.
Centralize db config loading, so we consistently apply db_test database settings.
Many of these changes are influenced by Laravel port.

* Some safety so we don't assign strings to numeric port field
Smooth out phpunit bootstrap

* Fix a couple of scrutinizer warnings.
2018-04-11 16:15:13 +01:00
Tony Murray
ca09cf61ac auth_test.php -v override config.php (#8508) 2018-04-05 22:43:54 +01:00
Tony Murray
5c83aa1e28 refactor: LDAP debug output (#8434)
* LDAP debug
Updated LDAP and AD docs
ldap protocol default to v3 (so we don't have to set it all the time).  If this fails it should revert to v2.
ad was using auth_ad_timeout incorrectly (1 I think)

* Add option to list all users.
2018-03-29 11:40:27 +01:00
Ruairi Carroll
665229be40 Follow on to PR 8168 - Fixed merge of manage_bills.php (#8467)
* Adding 1st rev of manage_bills.php

* Stlye fixes

* Freshinging PR 7633. Changing -r to -f, to be less confusing. Adding code style changes as per @laf's suggesting

* Adding in option for sysname or hostname variable. Fixing hostname lookup bug

* style fixes

* -renaming add_ports to add_ports_to_bill
- changing -i to -b for clarity sake
- Will print help if -s and -h are not set

* Adding check to ensure -i is set via cli

* I'm stupid

* I'm stupid

* Fixing help messages, fixing argument checking, moving help to it's own function

* Adding create_bill functionality, update help and opts as needed

* Adding 1st rev of manage_bills.php

* Stlye fixes

* Freshinging PR 7633. Changing -r to -f, to be less confusing. Adding code style changes as per @laf's suggesting

* Adding check to ensure -i is set via cli

* I'm stupid
2018-03-28 22:44:32 -05:00
Tony Murray
8c94ccf4d6 refactor: Use custom phpcs ruleset for LibreNMS (#8418)
* Use custom phpcs ruleset for LibreNMS
PSR2 with exclusions

* Don't check line length

* Restore build_excludes()
Drop influxdb lib exclusion

* Fix whitespace
2018-03-20 11:32:52 +00:00
Tony Murray
8cc8eb8dd2 refactor: Use elseif instead of else if (#8417) 2018-03-19 21:40:17 +00:00
Tony Murray
69b066ab3d
Fix mib renamer script when in a different directory (#8379)
* Fix rename mibs script when in a different directory
Add count

* fix spaces
2018-03-14 23:57:18 -05:00
Neil Lathwood
03076c4025
feature: Added new alert rule builder UI and rule mapping UI (#8293)
* feature: Added new alert rule builder UI

* Updated to export sql queries

* More updates

* more changes

* removed debug

* fix scrut

* Updated to include import options + various other fixes

* fix rule

* Populate name from collection rules.

* Fix default rule import
Allow new and old style rules in the collection.
Don't add new yet as I'm not sure GenSQL() is working.

* Fix GenSQL call

* Extract filter building to class so it is nicely contained in one place

* moved schema

* some fixes and tweaks

* travis fixes

* Some more features / updates

* Fix up my mistakes when adding default rules

* Use a modal for new alert (Incomplete)
Larger dialog!!
Remove page loading stuff.

Working:
Loading rules, resetting dialog, importing from collection.

Not working yet:
select width
device limited rule access? don't know what this is...

Lots of unused stuff to delete...

* reload "table" after save

* fixed editing rule

* Auto select2 width

* Reload window on save

* Restore per-device alert. Remove debug.

* Small cleanups. Rule Name first.

* Restore button to button type. Rename schema.

* Fixes: wrong command to reload window, remove extra attributes, rule is never passed

* Fixed old rule editing

* some small updates for old imports

* travis update to use trusty

* maybe travis fix

* Ability to set alert rule mappings on the rule edit screen

* pip installs one line, no quiet for deploy

* update schema def

* Fix style and some copyright headers

* fix docs missing file

* Allow new versions of snmpsim and libraries

* Parser WIP

* Fix default rules insert

* reorganize

* Legacy import first draft done

* Implement saving
Skip translation to sql for now

* Working on glues

* small rule collection fix

* Working on glues

* Working on glues

* Docs updates + small UI changes

* Parser WIP

* reorganize

* Legacy import first draft done

* Implement saving
Skip translation to sql for now

* Working on glues

* Working on glues

* Working on glues

* Add table mapping, should move to it's own class

* WIP

* Glue working!!

* Extract Schema class

* Some final touches.
revert alerts_rules.json for now.

* Finish up initial implementation
Needs more tests

* Fix a few places

* small doc updates

* Fix finding tables in grouped rules.

* remove unused code

* code format fixes

* Some quick tests for Schema
Simplified output for findRelationshipPath. Always includes start and target in the result.
This simplifies a lot of code in QueryBuilderParser.php
This also always loads the target table data now (which we want)

* Make bill_id the PRIMARY index for the bills table

* Load macros from a json file in misc instead of the database.

* Fix whitespace and wrong key for collection.

* Handle IN properly when generating SQL

* Fix glue (devices.device_id = ports.port_id) is incorrect :D
Show ALL tables we can resolve relationships for in the query builder filter.

* Remove all macros from the database
Remove insert statements, leave updates to update user's existing rules.
2018-03-14 20:25:19 +00:00
Tony Murray
bacab61af2 refactor: Use composer.phar first and self-update it. (#8339)
* Use composer.phar first and self-update it.

* Ansi output for interactive shells.
If HOME isn't writable, set COMPOSER_HOME.

Simulated cron with env -i

* More verbose failures when attempting to download composer.phar.

* Change the regex again
Matches all versions here https://getcomposer.org/download/
2018-03-13 20:08:40 +00:00
Tony Murray
9459eeb55f refacotr: Use HTTPS to fetch Composer (#8309)
* use https for composer

* Fixe alternate --version output for composer
2018-02-28 20:04:44 +00:00
Tony Murray
b2ce9b173b
save-test-data.php: Print a message when we encounter a bad module name (#8274)
* Print a message when we encounter a bad module name (likely a typo)

* Raise exception for invalid module name and handle it.
2018-02-25 20:03:18 -06:00
lewisvive
0e0c8d1cbe feature: Added ironware syslog notify code (#8268)
* Added ironware syslog notify code

* Update syslog-notify-oxidized.php
2018-02-21 10:03:43 +00:00
Tony Murray
1188b53192 security: Use more secure password hashes (#8213)
* More secure password hashes
Use PHP 5.5 password_hash(), currently uses bcrypt
increase password field length as per php documentation

* Use password_hash()/password_verify() for cookies too

* forgot to update db_schema.yaml
2018-02-08 23:08:21 +00:00
Tony Murray
11147d3bbf
Major Processors rewrite (#8066)
* Extract DiscoveryItem and move some things to better places.
Extract model class
Fix up model construction.  I have problem with construction...
Makeshift model working.  Switch constructor to factory.  discover() and create()
Support legacy discovery.
Remove uneeded custom pollers
Remove netonix custom detection as we try ucd on all os now.
Add a few yaml procs.  Fix a couple things.
More processor discovery conversions
Move Calix e7 to standard hrProcessorLoad, but it doesn't fully implement the HR-MIB, move things around to make it work.
Add a few yaml procs.  Fix a couple things. Correct some stupid mib stuff.
Move more, drop php 5.3
Add netscaler which uses string indexes.  Port fiberhome to yaml and use skip_values
More conversions.  BroadcomProcessorUsage Trait
Serveriron and Ironware share some mibs.  Create a common abstract os for them.
Add yaml support for mib specification in each data entry
Make legacy discover_processor() set 0 for hrDeviceIndex

Untangle Dell switch OS processors

Use use shared OS for groups if they don't have a specific group.
fix silly mib mistake

Make index optional

Move HR and UCD to Traits and out of Processor.

* forgot to update the fortiswitch index

* Make sgos and avaya-ers match the old index.

* fix comware test data

* fix merge errors

* fix dsm and remove pointless empty modules

* file not found exception is in the wrong place.

* Updated processor development docs
2018-02-05 07:39:13 -06:00
Tony Murray
dc2883f59d Use composer wrapper in pre-commit (#8192) 2018-02-03 22:40:15 +00:00
Tony Murray
b2762d9fa7 refactor: Prevent function collisions with Laravel (#8166)
Make function call compatible
drop insensitive starts_with and ends_with for now as they aren't needed.
2018-01-29 21:58:21 +00:00
Tony Murray
20335bce5d
Fix collect-snmp-data.php when the os is generic. (#8164) 2018-01-29 07:50:56 -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
494c29aefa
Split save-test-data.php into two scripts, allow mass update (#8115)
* Add mass update to save-test-data.
Fail when snmpsim doesn't start and try to give a hint.

* Split save-test-data.php into two scripts

One for updating snmprec files.
One for updating db dump files.
2018-01-20 20:22:47 -06:00
Paul Heinrichs
d4bd566d36 newdevice: Added Support for cambium PTP 300, 500, 600 and 800 (#7998)
* Add Support for cambium-ptp500

Added mibs for ptp500, ptp300

* ptp500 - Switch modulation to a state

* Update label on 500 to 500/300

300 and 500 use the same mibs

* Request changes

Added overhead graph's to all current ptp devices

* wrap text in quotes

* Fix discovery bug

* Ptp600 support

* PTP800 Support

* Fix ptp600 issues

* Remove meh copy and pasta

* Remove modulation from OS file

* Update value modifiers / typos

* +x rename-mibs.php

* Modify cambium mibs
2018-01-16 22:52:11 +00:00
Tony Murray
cabc0eb71d feature: Quick script to rename mibs to their proper names (#8068)
So I can stop re-writing it ;)
2018-01-11 22:19:13 +00: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
Tony Murray
b2a54dae3b
Testing updates: module testing and collect only (#8063)
* Testing updates module testing and collect only

* cache clear no-longer needed.
2018-01-09 11:40:26 -06:00
Neil Lathwood
42e5819130 refactor: Updated discovery/poller to use numeric sysObjectID (#7922)
* refactor: Updated discovery to use a core module for sysDescr/sysObjectID use

* final update hopefully

* revert changes

* more changes + docs

* migrated poller to use numerical sysObjectID

* more updates for sysObjectID

* update any alert rules which might have enterprises. in

* moved schema file

* small updates

* updated getHostOS()

* scrut fixes

* updated sysObjectId -> sysObjectID

* updated sysObjectId -> sysObjectID

* updated remainder of sysObjectId -> sysObjectID

* another sysObjectId -> sysObjectID

* fixed secureplatform test data

* Fix tests: $device is not pulled from the database before polling
Also, update the db in the core discovery module.
2018-01-06 23:00:47 -06:00
Tony Murray
5c5de59f8e
Test docs before deploying (#7992)
* Test docs before deploying
fix issue with docs

* Actually check the result of the doc build
add error for testing

* Fix up docs

* use original logic

* only deploy docs if build succeeds.
Make pip quiet
2018-01-02 08:20:19 -06:00
Tony Murray
20865b0ca4
OS Testing update (#7971)
* OS Testing update
Option on pre-commit.php to run tests for just one OS. Reorganize tests a bit to support this.
Improved bgp-peers capture and os module capture (initial)
Better output when phpunit tests fail

* fix a couple issues.  Better output for another

* Use the correct setup function
2017-12-28 16:12:08 -06:00
Tony Murray
fff66d3c00
Feature: Generic discovery and poller tests (#7873)
* Processor Tests!

* Capture data from live devices easily.

* fix up some stuff, remove powerconnect things as they seem to be just broken.

* formatting, fix missing assignment
add netonix processor data

* fix multi-line, always add sysDescr and sysObjectID
ios cpm test file

* revert composer change and fix whitespace issues

* add help text

* missed help text

* tighter debug output

* handle empty strings properly and mibs with numbers

* use keys for sorting as intended

* fix type with empty data

* oops :)

* whitespace fix

* try installing fping

* Fix TestCase collision + cleanup

* mark TestCase as abstract
don't run two instances of snmpsim

* better database dumps, improved capture

* style fixes

* fix quotes add a few more tables

* add --prefer-new, properly merge data

* Support separate discovery and poller data. But don't waste space if they aren't needed.

* refactor to use class
collects all code in one place for reusability

* reorganize

* Print out when not saving.

* Support for running multiple (or all) modules at once.

* tidy

* Change unit test to a generic name and test all modules we have data for.

* Add documentation and a few more tidies

* whitespace fixes

* Fix tests, add a couple more modules, more docs

* More docs updates

* Fix scrutinizer issues

* add bgp-peers
2017-12-20 08:36:49 -06:00
Ruairi Carroll
731261b509 feature: Added manage_bills.php script
* Adding 1st rev of manage_bills.php

* Stlye fixes

* Freshinging PR 7633. Changing -r to -f, to be less confusing. Adding code style changes as per @laf's suggesting

* Adding in option for sysname or hostname variable. Fixing hostname lookup bug

* style fixes

* -renaming add_ports to add_ports_to_bill
- changing -i to -b for clarity sake
- Will print help if -s and -h are not set

* Adding check to ensure -i is set via cli

* I'm stupid

* I'm stupid
2017-12-02 20:26:19 +00:00
Tony Murray
6b5dccc169
refactor: AD Auth defer connection until it is needed (#7768)
* refactor: AD Auth defer connection until it is needed
Nice error if php-ldap is missing instead of http 500.

* Add the same error when ldap is missing to other auth methods.
Not as graceful looking in the authorizers since they do not defer connection.
2017-11-28 09:19:34 -06:00
mcq8
c9728a1f71 refactor: Refactored authorizers to classes (#7497)
* Refactored authorizers to classes

* Merge changes for #7335

* ! fix php 5.3 incompatibility

* Update ADAuthorizationAuthorizer.php

* Fix get_user -> getUser

* Rename AuthorizerFactory to Auth, fix interface missing functions

* Add phpdocs to all interface methods and normalize the names a bit.

* Re-work auth_test.php AD bind tests to work properly with the new class.
Reflection is not the nicest tool, but I think it is appropriate here.
Handle exceptions more nicely in auth_test.php

* Restore AD getUseList fix

Not sure how it got removed

* fix auth_test.php style
2017-11-18 10:33:03 +00:00
Tony Murray
af27195746 feature: Script to collect port polling data and compare full walk vs selective port (#7626)
* Script to collect port polling data and compare full walk vs selective port polling.

* Select hosts. Colors. Percent. Units (s). Enable sel poll.

* Moved the colors. Disable selective if needed. Report set status and count.

* Style fix.

* CLI help.

* Docs.

* Style fix.

* Allow comma separated device_id list.
Better color formatting for output
Fix issue when using &$device by reference
2017-11-17 09:10:37 +00:00
Maximilian Wilhelm
95024af2c0 feature: Added purge-port scipt to allow deleting of ports from the CLI. (#7528)
* Add purge-port scipt to allow deleting of ports from the CLI.

  This script allows deleting single ports by their port_id or a list
  of ports read from a file or STDIN.

  LibreNMS Port purge tool
        -p <port_id>    Purge single port by it's port-id
        -f <file>       Purge a list of ports, read port-ids from <file>, one on each line.
                        A filename of - means reading from STDIN.

Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>

* Update CLI-Tools.md
2017-11-09 12:57:41 +00:00
Tony Murray
a688a77864 fix: github-apply sometimes fails on PRs with lots of commits (#7604)
.patch is all commits individually, .diff is all commits merged
2017-11-01 21:19:41 +00:00
Tony Murray
9d73cd401a feature: LDAP auth update: alerts, api, remember me (#7335)
* feature: LDAP auth update: alerts, api, remember me
Defer ldap connection until it is needed (saves connections from pollers)
Add ability to use a bind account if the server does not allow anonymous bind.
If the server does allow anonymous bind, no config change is needed.
Use Config class

FYI, I have no way to test this.

TODO: update/validate docs

* prevent duplicate users in get_userlist()

* fix bug in Config get for auth_ldap_uid_attribute, `.` should have been `,`
Change case of uidNumber to match common configs (should be case insensitive anyway)

* revert uidnumber case changes and fix up user supplied ones as it is unintuitive that they need to be lowercase.
Add auth_ldap_binddn setting to allow more a more specific way to enter the bind user.
2017-10-30 19:28:40 +00:00
Tony Murray
51ba934e11 feature: Added web validation (#7474)
* refactor: convert validations to modules to prep for gui integration

* accidentally dropped, schema update

* fix accidental output to webui

* mention discovery-wrapper.py and re-arrange.

* refine some fix statements

* rename the Config validation group to Configuration.

* fix some scrutinizer issues
remove as many local functions from validator.php as possible
move extensions from pre-check
remove duplicate timezone check
looks like there is some db schema differences between mariadb 10.1 and 10.2, investigating

* mariadb version diff take2

* Check schema version first for database.
Remove stop to go back to command line for install docs.
Add helpful link when there is no devices added to /addhost

* fix incorrect validation for empty string defaults

* Fix style

* Add additional file permissions checks

* catch exception and fail for invalid timezone
Change visuals a bit.

* add php version warning

* fix space
2017-10-26 07:56:09 +01:00
Neil Lathwood
f1b50737bb Docs refactor (#7389)
* docs: Refactored docs for new layout

* some more changes

* more doc updates

* More doc updates

* small update

* small update
2017-10-02 21:36:22 +01:00
Neil Lathwood
e0040b2831 newdevice: Added support for Toshiba RemotEye4 devices (#7312)
* newdevice: Added support for Toshiba RemotEye4 devices

* small updates thanks to kate

* Update new-os.php

* Update new-os.php
2017-09-12 22:27:06 -05:00
Neil Lathwood
edae33507a feature: Added script to generate config for new OS (#7161)
* feature: Added script to generate config for new OS

* scrut fixes
2017-09-04 21:38:09 +01:00
Zmegolaz
5441bafc81 fix: Fixed IPv6 host renaming (#7275)
* Fixed IPv6 host renaming

* Added get_rrd_dir() and modified other files to use it where appropriate.

* rrd_name() now uses the new function get_rrd_dir(), to make it simpler to modify the escaping in the future.

* Wrong function name in rrdstep.php
2017-09-02 13:45:31 -05:00
deepseth
809c9ea591 feature: Added Syslog hook for ASA support (#7268)
* Added limited support for ASA using emblem logging

* Updated documentation

* Updated ASA support to cover regular and emblem logging

* Gave the variable a more suitable name

* Removed debug output
2017-09-01 18:37:01 +01:00
Robert (KHobbits)
e3fab24e1c fix: Added Extreme OS mapping to 'gen_rancid' (#7261)
This is based on git-rancid code base, seems to be mirrored in upstream.
2017-08-30 20:05:32 +01:00
Jonathan Thurman
30c1b79b3d fix: Update gen_rancid.php to the correct arista os name (#7214) 2017-08-23 19:29:40 +01:00
Neil Lathwood
7b97e0e761 Attempt to fix repeated sql issue we come across (#7123)
* Attempt to fix repeated sql issue we come across

* renamed sql file
2017-08-14 22:00:41 +01:00
Neil Lathwood
66008a0fd5 feature: Added script to test alerts (#7050)
* feature: Added script to test alerts

* actually added the file

* Add text when no alert is found.
2017-07-23 19:56:22 +01:00
Neil Lathwood
a58a2d8677 fix: Updated sed commands to allow rrdstep.php to be used to increase and decrease values (#6941) 2017-07-03 16:02:30 -05:00
deepseth
683c93cdf5 Non greedy match for IOS-XR works better (#6872) 2017-06-23 22:16:35 +01:00
Olen
bcaeae5976 feature: Added support for passing state to alert templates test
* Added option to specify transport when testing a template

* Allow you to specify "state" on commandline
2017-06-19 06:58:52 +01:00
deepseth
bcc618a3ad feature: Added Syslog hooks for Oxidized integration (and more) (#6785)
* Creating syslog hooks with example script for Oxidized integration

* Corrected IOS-XR matching and stopped spurious calls to Oxidized
2017-06-17 15:21:21 +01:00
Olen
e70e3763d2 feature: Added option to specify transport when testing a template (#6755) 2017-05-31 21:26:47 +01:00
Caio Silva
423c735819 Update test-template.php (#6723)
fix: Added option -h in the example.
2017-05-24 21:26:16 +01:00
Tony Murray
f723f0ba12 fix: auth test script (#6673)
Need to pull in web includes
fix variable collisions...........
2017-05-18 22:06:42 +01:00
Neil Lathwood
0338734fe7 feature: Added script (scripts/test-template.php) to test alert templates (#6631)
* feature: Added script (scripts/test-template.php) to test alert templates

* moved remaining functions, fixed php 5.3 and include dir

* added docs on use for test-template script
2017-05-13 06:46:08 -05: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
Tony Murray
b1483e3d2e feature: Unit test to validate the db schema (#6367)
* Unit test to validate the db schema
Changes build-schema.php to just write misc/db_schema.yaml

* Only build base if needed
Fix 178.sql

* Database is always created by init.php
add dbSchema test too, should guard against testing against an empty database

* feature: support non-standard unix socket (#5724)

* Add support for custom MySQL unix-socket

* NULL must be lowercase!

* Naive edit of html/install.php

* fixup

* Refactor dbConnect
Use it everywhere

* $config needs to be global
Don't need to set $database_link

* small cleanups

* Connect to the database for every test.

* travis fix for blank line
2017-04-07 15:07:44 +01:00
Neil Lathwood
e583fb8c46 updated schema build user (#6363) 2017-04-05 15:24:00 +01:00
Tony Murray
55162129ff Update schema manually (#6362)
Allow build-schema.php to be run by hand more easily.
2017-04-05 09:06:11 -05:00
Neil Lathwood
6a73e725af updated schema build user (#6360) 2017-04-05 14:18:30 +01:00
Neil Lathwood
b4488e84a1 Deploy schema (#6358)
* updated username

* updated username

* updated username

* updated username

* updated username
2017-04-05 12:10:38 +01:00
Neil Lathwood
284bb19b2e Deploy schema (#6357)
* updated username

* updated username

* updated username

* updated username
2017-04-05 11:47:32 +01:00
Neil Lathwood
d8b651f736 Deploy schema (#6356)
* updated username

* updated username

* updated username
2017-04-05 11:21:09 +01:00
Neil Lathwood
2c3599d3e5 Deploy schema (#6354)
* updated username

* updated username
2017-04-05 10:56:18 +01:00
Neil Lathwood
c6a51adb44 updated username (#6352) 2017-04-05 10:32:36 +01:00
Neil Lathwood
03deb6434a feature: Added ability to validate database schema (#6303)
* feature: Added ability to validate database schema

* small scrut fixes

* Check for extra tables and columns
Print 30 items of schema updates, easier to copy paste sql

* Now supports detections and suggested fix for:
tables: missing, extra
columns: missing, extra, incorrect
indexes: missing, extra, incorrect

* final changes + hook into travis
2017-04-05 09:00:28 +01:00
Tony Murray
1ea7af424b feature: bind user for active_directory auth (#6255)
* feature: bind user for active_directory auth
Optional, allows the use of "remember me", API, and alerting.

* missing global (but still may not be working)

* always return a value from reauthenticate()

* Make sure the ldapbind credentials are correct on reauth.
Do not send output if they are incorrect (use d_echo) this breaks ajax calls, etc.
Add scripts/auth_test.php, to make it easier to debug authentication.

* Refine auth_test.php a bit more
A few small cleanups in other places of the auth

* Add auth_test.php to docs
Some more improvements in the auth_test.php output.

* Update Authentication.md
2017-03-29 08:22:02 -05:00
Neil Lathwood
8ca1f169b3 feature: Added rrd step conversion script (#6081)
* feature: Added rrd step conversion script

* updated to support all for hostname

* update docs + code

* small updates as per murrant
2017-03-11 07:32:43 -06:00
ollb
698584e14d feature: Add support for dynamic interfaces in ifAlias script (#6005)
* add support for dynamic interfaces in ifAlias script

* netlink and ip support alias (`ip link set IFACE alias ALIAS`). In an
  environment with dynamic interfaces, it is useful to be able retrieve
  aliases from ip.

* we cannot assume next iface oid is n + 1 since oids do not necessarily
  follow incrementally when some interfaces has been destroyed and
  recreated.

* use straight POSIX shell

* I agree to the conditions of the Contributor Agreement contained in
doc/General/Contributing.md.
2017-02-26 23:22:03 +00:00
Tony Murray
676e5563b9 Only allow integers for input to github-apply
Remove some unneded code from github-remove
2017-02-17 21:49:29 -06:00
Tony Murray
6b33bdc949 require -d -s or -r 2017-02-17 21:39:22 -06:00
Tony Murray
3c22633cea Port remove script to python 2017-02-17 21:33:09 -06:00
Tony Murray
bf32690abc Port remove script to python 2017-02-17 21:29:52 -06:00
Tony Murray
62c49fedf7 Scripts to easily apply and remove github Pull Requests 2017-02-15 15:07:24 -06:00
Neil Lathwood
5aef36abd6 Tune port update (#5795)
* updates to rrdtune docs and script

* added all support
2017-02-06 18:49:16 -06:00
Xavier Beaudouin
cb5dd299af feature: Rancid config file generator (#5689) 2017-02-02 15:44:15 +00:00
David Bell
a33ae25d0b fix: ifAlias script now works with snmpbulkwalk #5547 2017-01-31 22:19:16 +00:00
patrick7
91dd6a2670 fix: Update ifAlias script to deal with GRE interfaces (#5546) 2017-01-27 23:16:33 +00:00
Tony Murray
839dd31093 feature: Added pre-commit git script to support failing fast 2017-01-24 21:37:49 +00:00
Neil Lathwood
3c0a2109e5 tidy up some file permissions and removed unused files (#5563)
* tidy up some file permissions and removed unused files

* Delete makemini.pl
2017-01-24 12:44:16 -06:00
Neil Lathwood
317402c378 trying to fix docs build (#5340) 2017-01-07 22:14:16 +00:00
Neil Lathwood
03e3249c50 fix: specify specific mkdocs version (#5339) 2017-01-07 18:09:46 +00:00
Tony Murray
e20a242785 refactor: use Composer to manage php dependencies (#5216) 2017-01-01 09:37:15 +00:00
Neil Lathwood
f5a16be0e3 refactor: Move OS definitions into yaml files (#5189) 2016-12-23 17:53:19 +00:00
Tony Murray
9a33464c52 refactor: Centralize includes and initialization (#4991) 2016-11-21 20:12:59 +00:00
Scott Armitage
075c94d2eb Clean up migration scripts by doing a chown on destination folders and files to the LibreNMS user and group, remove leftover XML files from source directories, and allow user to specify the SNMP version string in the 'settings' section of . (#4792) 2016-10-15 00:48:04 +01:00
Tony Murray
cab2597807 Remove some debug output.
Don't call terminate on null (it will be called automatically anyway)
2016-09-23 15:24:24 -05:00
Tony Murray
c31b3c0301 feature: use snmpsim for testing
fallback feature so we don't have to run snmpsim on devel computers, should be adequate for now
./scripts/pre-commit.php -u -snmpsim will start an snmpsimd.py process automatically
2016-09-23 14:57:31 -05: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
Tony Murray
a6ed7cc888 feature: pre-commit script: allow test order based on command line option order (#4393) 2016-09-10 17:42:27 +01:00
Neil Lathwood
7ff35ca6ef docs: More doc updates (#4365)
* More doc updates

* Updated to add update

* added tune option
2016-09-09 12:06:26 -05:00
Aaron Daniels
a27ecd1f0c fix: calling rrdtool_pipe_open() instead of rrdtool_initialize(); (#4343) 2016-09-04 16:26:38 -05:00
Neil Lathwood
6e8e00e204 fix: Added config.php to be excluded in psr2 pre-commit check (#4260) 2016-08-29 15:09:21 -05:00
Tony Murray
883a0e6fd3 Check that commands are available for pre-commit.php. (#4257)
If not install them with composer, If composer isn't available, spit out an error message and direct them to the documentation.
2016-08-29 20:18:52 +01:00
Tony Murray
abc6a5b799 PSR-2 Final cleanup (#4247)
refactor: Final PSR2 cleanup
2016-08-28 23:32:55 +01:00
Tony Murray
b7d0b97c64 More pre-commit.php improvements (#4224)
* more pre-commit.php improvements
do not check influx-db on hhvm
Use parallel-lint to increase lint check speed and improve output
Add option to print out the commands that would be executed, makes it easier to modify them and run by hand
Fixed a couple of bugs

* Integrate the environment check
Flip it so we don't interfere with command line users
2016-08-28 21:44:36 +01:00
Tony Murray
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
Tony Murray
f042f9aa56 Use pre-commit.php in for travis-ci tests (#4212) 2016-08-26 10:30:43 +01:00
Neil Lathwood
9f1930a81e More more docs (#4197)
* Updated docs + some small code changes

* Added validating code doc for developers

* Doc updates

* Updates and improvements
2016-08-25 18:40:11 -05:00
Tony Murray
27382b157b Update Applications docs (#4171)
Move scripts to librenms-agent repo
Remove LibreNMS.zip from scripts, update docs to point to the extracted folder
2016-08-23 19:46:56 +01:00
Neil Lathwood
15ef8bbd23 Updated themes doc + added Google analytics (#4158) 2016-08-21 21:10:01 +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
3147a00258 Updated repo details 2016-08-19 16:54:30 +01:00
laf
7958ea821c Updated repo details 2016-08-19 16:43:53 +01:00
laf
c6d8604463 Updated repo details 2016-08-19 15:26:37 +01:00
laf
ae7d13d299 Ready for new docs site 2016-08-19 14:37:44 +01:00
Tony Murray
0105d8cac7 Delete distro script, it has moved to librenms-agent snmp directory. 2016-08-09 14:32:07 -05:00
Neil Lathwood
ec3520e518 Merge pull request #3865 from murrant/remove-agent-scripts
Remove agent scripts
2016-07-28 20:22:20 +01:00
Tony Murray
6119aa9c22 Remove agent scripts
Leave a note that they have been moved to https://github.com/librenms/librenms-agent
The goal is to prevent divergence.
2016-07-21 22:34:11 -05:00
crcro
ff5b6c9a2b app: nfs-v3-stats
Rewrite of the original nfs-stats app.
Includes more stats, nicer graphs, no more nfsstats bin requirement.
2016-07-20 02:14:30 +03:00
crcro
263d33f107 added some how to for nfsstats.sh 2016-07-07 11:11:36 +00:00