Commit Graph

15393 Commits

Author SHA1 Message Date
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
mattie47
0c5ff933be Update Syslog.md (#9220)
Added configuration for Allied Telesis Alliedware Plus. 

Note: This should be accepted after #9219 has been delivered.
2018-09-18 10:31:20 -05:00
Tony Murray
1fc6a031b3
AD Authorization fixes (#9216)
* AD Authorization fixes
Remove mres() and $_SESSION usage.
Remove broken addUser function and use Mysql addUser.

* AD Authorization fixes
Remove mres() and $_SESSION usage.
Remove broken addUser function and use Mysql addUser.
Extract common AD auth code to ADUtils

* AD Authorization fixes
Remove mres() and $_SESSION usage.
Remove broken addUser function and use Mysql addUser.
Extract common AD auth code to ADUtils

* Send no user info to log instead of toast.

* Remove commented code

* add abstract getConnection() method that is required.

* Actually return the value
2018-09-18 07:57:23 -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
TheGreatDoc
8f89cd5e2c
Merge pull request #9217 from murrant/gh-templates
Update github templates
2018-09-17 22:18:33 +02:00
Tony Murray
1a7ec8823d verbage 2018-09-17 12:08:13 -05:00
Tony Murray
7642b56f54 Update github templates 2018-09-17 12:07:11 -05:00
TheGreatDoc
cf31776a6b Show sensors warnings values + moved to json and toastr (#9210)
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-16 18:23:12 +01:00
Neil Lathwood
57b16c77bf
Remove api rate limits (#9211) 2018-09-16 17:17:02 +01:00
TheGreatDoc
8bde5a93b9
Merge pull request #9202 from murrant/components_errors
Work around for annoying Components errors
2018-09-16 12:49:56 +02:00
James Andrewartha
e0e08e9b52 Fix AD auth with large SID components (#9207)
* Fix AD auth with large SID components
Per http://php.net/manual/en/function.unpack.php unpack on 32bit will convert large unsigned long values into signed long values, so we check for PHP_INT_SIZE and fix them up if necessary.

* Fix indentation
2018-09-15 13:30:32 -05:00
Tony Murray
3e4315c158 Don't output non-fatal errors from legacy web pages. (#9208)
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-15 14:16:30 +01:00
TheGreatDoc
ee85264772 Switch IRC to Discord link in database validation (#9209) 2018-09-15 10:16:45 +01:00
Lucas Dousse
4bd1f6711a change : with . (#9206) 2018-09-14 15:05:06 +01:00
PipoCanaja
1041c640bb VRP: improving extraction of HW and Version (#9167)
* VRP: improving extraction of HW and Version

* VRP: Improving extraction of HW and Version - CodeClimate update

* VRP: Improving extraction of HW and Version - Review and debug code cleaning

* VRP: Improving extraction of HW and Version - resolve OIDs and swap order of poll

* VRP: Improving extraction of HW and Version - resolve OIDs and swap order of poll

* Device: VRP: Update test data

* Device: VRP: Travis code clean

* Device: VRP: Update test data for variants

* Device: VRP: Update test data for variants
2018-09-14 08:05:03 -05:00
TheGreatDoc
cc225bd39c Fixed format for snmpd configuration step (#9203) 2018-09-14 08:03:51 -05:00
Lucas Dousse
c8c703a04f Add line break (#9205) 2018-09-14 08:03:25 -05:00
PipoCanaja
9aa429c8dc WebUI: Use generate_url for Oxidized List device (#9200) 2018-09-13 21:10:28 -05:00
Peter Musolino
4e1a8bdcc4 Updated example for new alerting engine (#9193)
* Updated example for new alerting engine

Using the example of port utilization caused errors when trying to use it with the new alert system.  Putting variables in curly braces and removing php calls resolved it.  Updating docs to reflect this.

Also removed examples with hash tags in the body of the template as pasting this in will cause syntax errors by the alerts script.

* Update Templates.md
2018-09-13 21:08:40 -05:00
Tony Murray
e769d6b648
More codeclimate tuning (#9197) 2018-09-13 12:18:58 -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
TheGreatDoc
aa51613a1d
Merge pull request #9199 from murrant/last-polled
Fix devices unpolled check
2018-09-13 16:22:59 +02:00
Tony Murray
486e0824b1 Fix for real... 2018-09-13 08:27:43 -05:00
Tony Murray
58e1233d77 Import DB 2018-09-13 08:21:44 -05:00
Tony Murray
9189928b76 use is_array() to guard against more garbage. 2018-09-13 08:19:33 -05:00
Tony Murray
867586c416 Work around for annoying Components errors. 2018-09-13 08:18:04 -05:00
Tony Murray
02cb1af892 Fix devices unpolled check 2018-09-13 08:02:58 -05:00
Tony Murray
79333c45f6
Allow trusted proxy via APP_TRUSTED_PROXIES (#9196)
* Allow trusted proxy via APP_TRUSTED_PROXIES
Set to '*' by default to emulate legacy behavior.
Set up doc describing environment variables

* Create helper to parse environment variables into arrays properly.

* Update doc blocks
2018-09-13 07:26:42 -05:00
Tony Murray
c222d0e516
Update Test-Units.md 2018-09-12 21:00:47 -05:00
Mike Rostermund
df31b02036 Allow uppercased interface name used in Cisco SG350X models (#9178) 2018-09-12 20:53:21 -05:00
Tony Murray
387a79e297
Fix anonymous bind (#9195)
With the retriveByLegacyId() split out this should just be a simple get from the db.
2018-09-12 12:51:52 -05:00
Tony Murray
588b115d66
Fix up ldap-authorizer, create non-existent users (#9192)
* First attempt at ldap-auth fixes

* no, guest, so it is not allowed.

* cast to int

* don't count on Session

* return full user

* Specific error for guest not allowed.

* fix up external auth user creation

* fix check

* Fix user level missing
Simplify middleware

* use guard if configured
2018-09-12 12:51:24 -05:00
TheGreatDoc
31e931d8ee
Merge pull request #9180 from murrant/astext-dns
ignore dns errors when fetching astext
2018-09-12 16:00:25 +02:00
Tony Murray
f32e095f36
Fix error in logout (#9189)
session_destroy(): Trying to destroy uninitialized session
2018-09-12 08:50:16 -05:00
Tony Murray
4abd8494c5
Fix auth user level not updated (#9190)
* Fix auth user level not updated

* Update all fields
2018-09-12 08:49:54 -05:00
Jari Schäfer
3ba1c44005 use UTC if date.timezone is not set (#9181) 2018-09-12 08:12:32 -05:00
Tony Murray
46d5333d1b
Init and refresh the php session each page load (#9186) 2018-09-12 08:12:19 -05:00
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