Commit Graph

15606 Commits

Author SHA1 Message Date
TheGreatDoc
6908063fae Fixed routing edit to use LegacyAuth (#9188) 2018-09-12 08:11:32 -05:00
Tony Murray
e8cf6bb385
Fix API auth issues (#9185)
* Fix API auth issues
Api access page now creates tokens with the correct ID.
Correctly creates users for legacy user tokens.
Fix Ldap comparison
Laravel Util class to make code easier to access/read

* More api access page fixes

* fix style
2018-09-11 22:36:52 -05:00
Dan Langille
c3a24fe88f Correct typo (#9184)
- boolean on weather to call rndc stats
+ boolean on whether or not to call rndc stats
2018-09-11 19:21:51 -05:00
Tony Murray
93d909c877
Fix extra large login images (#9183) 2018-09-11 19:21:29 -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
5dae25b48b Feature: Collect VRP Entity details in the Huawei MIB (#8888)
* Feature: Collect VRP Entity details in the Huawei MIB

* Feature: Collect VRP Entity details in the Huawei MIB - Add Test Data

* Renaming of the test file vrp_5720_vrf.snmprec

* Added json test files

* Update vrp_5720_vrf.snmprec

* Update vrp_5720_vrf.snmprec

* Update vrp_5720_vrf.json

* Updated processor and mempool discovery to limit descr field

* Updated test

* Updated tests again

* Updated json test data

* Update vrp_ce12804-entity.json

* Update vrp_ce12804-entity.json

* Update vrp_5720_vrf.json
2018-09-10 23:07:45 -05:00
TheGreatDoc
d475665601 Added BGP Peer Descriptions (#9165)
* Added BGP Peer Descriptions

* Fixed formatting

* Added to device routing tab too

* Some text formatting

* Test files

* Added default null to bgpPeerDescr

* Added db_schema.yaml

* Fix default value for bgpPeerDescr

* Fixed Order and Search box

* Added glyphicon for success/error

* Switch to toastr notification

* Removed unused bootstrap code
2018-09-10 22:54:46 -05:00
Tony Murray
ec1b6060eb ignore dns errors when fetching astext 2018-09-10 21:40:41 -05:00
PipoCanaja
e367f46fee device: Initial support for CXR-Networks Terminal Server (#9169)
* device: Initial support for CXR-Networks Terminal Server

* device: Support for CXR-Networks Terminal Server - CodeClimate + cleaning

* device: renamed cxr-networks-ts and code improvement

* device: cxr-networks-ts test data

* device: renamed os as cxr-ts

* device: renamed os as cxr-ts, test data
2018-09-10 21:32:06 -05:00
Tony Murray
2b983865ea
fix edgecos issue (#9150) 2018-09-10 20:59:26 -05:00
crcro
12612b76f7 fix: edgeswitch fans (#9162)
* fix fan state
fix fan duty instead of rpm

* changed check to os definition bad_fanspeed

* revert back fan rpm

* Fix other state generics

* Update fanspeed.inc.php

* Update edgeswitch.json

* snmpsim tests data

* Update tests
2018-09-10 20:58:16 -05:00
Tony Murray
af7539ff3b
Fix Travis (#9176)
Output something for phpunit tests, if they take over 10 mins, it will fail the test.
2018-09-10 09:16:32 -05:00
PipoCanaja
56aed0ffbe WebGUI Oxidized - Add author+message + refresh button (#9163)
* WebGUI Oxidized - Add author+message + refresh button

* WebGUI Oxidized - Add author+message + refresh button

* WebGUI oxidized - move refresh_oxidized_node to js/librenms.js

* WebGUI oxidized - Style upgrade for refresh button

* WebGUI oxidized - move refresh_oxidized_node to js/librenms.js

* Update showconfig.inc.php
2018-09-10 09:04:39 -05:00
TheGreatDoc
9f0afa2927 Fixed edit processors/storage/memory search query (#9172)
* Fixed edit processors search query

* Fixed 2 more search queries
2018-09-08 09:43:56 -05:00
Tony Murray
3c530d6a4f
Sanitize data in dashboard add/edit/delete (#9171)
* sanitize data in dashboard add/edit/delete

* handle access differently
2018-09-08 08:54:03 -05:00
TheGreatDoc
67e883f1a0 Fixed template to alert mapping (#9173) 2018-09-08 08:53:14 -05:00
Tony Murray
8c83838f99 Fixed latency over 1s causes db update to fail (#9157)
* fix latency over 1s causes db update to fail

* Moved schema file 264-265.sql
2018-09-06 23:11:28 +01:00
Søren Rosiak
b9898273c7 Added HPE iLO Version Polling (#9146)
* Add HPE iLO Version Polling

* Added json test data

* Fix style
2018-09-06 23:06:23 +01:00
Tony Murray
6ac9980c20 Squelch PBN processor warnings (#9153)
Don't use NMS-PROCESS-MIB for pbn processors.  This keeps tests from spitting out warnings about the broken mib.

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-09-06 23:05:44 +01:00
Tony Murray
4ecb12dd81 Add note to cron file advising not to disable daily.sh (#9164)
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`
2018-09-06 22:30:31 +01:00
Tony Murray
96c352e987
Improve updating note about cron 2018-09-06 11:12:22 -05:00
Dan Langille
e6d67a9dbd change Indexs -> Indexes (#9161)
I think Indexes is the proper word.  What flow-on affects will this have?
2018-09-05 21:16:13 -05:00
Tony Murray
06a7cb2412 Fix a couple of validation items (#9154)
- Ignore .pki/nssdb. This happens when /opt/librenms is set as the home directory of the librenms users, personally, I would suggest adding cd /opt/librenms in ./bashrc (or equivalent) instead.
- fix validate when db connection fails.

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-09-05 19:29:27 +01:00
TheGreatDoc
4bb9ac7797 Fixed PeeringDB module (#9158)
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`

Fixed "Show connected IXes" that I broke in my past PR (Sorry for that)
Changed remote_as in pdb_ix_peers from varchar to unsigned int for correct ordering.
Also I've corrected a typo in the "Show connected IXes" button
2018-09-05 19:26:18 +01:00
Tony Murray
4d9924242f
Database schema cleanup (#9064)
* target db_schema

* Database schema cleanup
Remove several inconsistencies (mostly with data types and lengths)
Make things a bit nicer to implement with Laravel database migrations.
poller* tables had f'd up indexes

* Update tests, extra noise because db returns numeric types now.

* Update test data again.

* fix 253 migration for mysql 5.3
2018-09-05 07:34:50 -05:00
Vitali Kari
daeadbc4e3 Update Rules.md (#9156) 2018-09-05 07:24:07 -05:00
Neil Lathwood
f67a380ea9 Added FAQ on where to update database credentials if they change (#9127) 2018-09-04 19:30:43 -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
Søren Rosiak
9fc3891441 Add OpenBSD Carp State Sensor (#9143)
* Add OpenBSD Carp State Sensor

* Added json test data
2018-09-04 18:53:39 -05:00
dupondje
fbb6d35061 Added support for Rancid git (#9036)
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`


This pull req adds support for Rancid GIT backend (instead of the current supported SVN).
Not only git is preferred these days, also php-svn is non-existing on php 7+, so the only Rancid option is broken on PHP 7+, so might be nice to have this included :)
2018-09-04 22:41:51 +01:00
Søren Rosiak
b5a2a59e6e Added Comware Power Usage (#9016)
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-09-04 22:31:58 +01:00
Tony Murray
b99f14bca5 fix testing snmp timeouts and junos mib error (#9147)
convert the junos call to translate too.
Not 100% sure what was wrong with arris-c4, but removing this data fixed it and tests still pass.

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-09-04 22:20:01 +01:00
Tony Murray
5c4a298cfc Remove duplicate mib directories from snmp queries (#9148)
General cleanup of that function

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-09-04 22:14:03 +01:00
Denis
2978e52edd Modified timestamp sent to nagios transport in order to fix an issue with flapjack
…ith flapjack

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-09-04 14:08:51 +01:00
lug-gh
4cba0a5244 Syntax error in documentation (#9145)
just found a little syntax error in the docs, nothing special :)

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 9145`
2018-09-04 14:04:42 +01:00
Neil Lathwood
fe45eacae9
Fixed print date selector (#9142) 2018-09-04 10:24:02 +01:00
Tony Murray
d17eb4faaa Do not try to fetch data again if previous attempts failed (#9139)
result is null, which will fail isset() check
2018-09-03 07:55:34 +01:00
Tony Murray
ade409c4ec Disable test devices to block normal poller (#9131)
Still could happen, but much less likely.
2018-09-03 07:46:02 +01:00
Tony Murray
7778e2d66c Fix edgeswitch numeric oids (#9138) 2018-09-03 07:45:18 +01:00
Lukáš Staňa
914ad124c2 Added support for EdgeCore ES3510MA (#9081)
* device: Added support for EdgeCore ES3510MA

* Update edgecos.yaml

* Create edgecos_es3510ma.snmprec

* Create edgecos_es3510ma.json
2018-09-02 23:50:33 +01:00
Tony Murray
6c5a4f0531 Improve error handling (#9111)
Handle exceptions more correctly.  Before we could bypass some important logic if APP_DEBUG was set to false.

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-09-02 23:49:02 +01:00
TheGreatDoc
a1e2222191 Fixed Total Chassis Power sensor_index for SmartAX MA5603T/MA5683T (#9115)
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`

In SmartAX MA5683T/MA5603T Starting index for Per Card power starts in '0' instead '1'. '0' was also the index for Total Chassis Power.
2018-09-02 23:48:19 +01:00
Mark Nagel
9311c75a49 Enable and catch exceptions for PHPMailer to gather error messages. (#9132)
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-09-02 23:45:39 +01:00
Tony Murray
0f0ae34d77 Don't update ospf stats if there are none. (#9133)
Also fixes fatal error ->count() on null.
2018-09-02 23:42:50 +01:00
Tony Murray
30790bafd1 Remove js symlinks and extra files (#9134)
All symlinks are removed except:
./html/api_v0.php -> index.php
./html/pages/device/neighbours/list.inc.php -> ../ports/neighbours.inc.php

Allows things to mostly work on Windows Linux subsystem when LibreNMS resides on the ntfs partition.

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-09-02 23:32:58 +01:00
Tony Murray
1fbb4419a9 Fixed edgeswitch temperatures (#9130)
There was a typo in the definition

https://community.librenms.org/t/ubuiquiti-ubnt-switches-not-showing-temperatures/5243

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-09-01 21:47:19 +01:00
TheGreatDoc
d7c84785e5 Fixed varchar comparision when using numeric and text sensor_index (#9114) 2018-09-01 10:55:20 -05:00
Neil Lathwood
a8f10deee5 Fixed web installer to allow users to change db creds if we can't connect (#9126) 2018-09-01 10:54:25 -05:00
Tony Murray
f5f964fd65
Email debug (#9123)
* print email debug info when sending

* Actually list the emails, not the names
2018-08-31 20:48:04 -05:00