Commit Graph

15606 Commits

Author SHA1 Message Date
FTBZ
2757232dd6 Added specific support for APC Automatic Transfer Switch (#9221)
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.


----------------------------

**APC Automatic Transfer Switch are now detected has generic APC device like a PDU, but the overall information is not the same.**

Long time that I've not added a new device, sorry in advance for the mistakes...

![screen shot 2018-09-18 at 10 02 55](https://user-images.githubusercontent.com/1927109/45676643-7fb30e00-bb32-11e8-82e2-bd08f27b9757.png)
<img width="912" alt="screen shot 2018-09-18 at 10 38 10" src="https://user-images.githubusercontent.com/1927109/45676644-7fb30e00-bb32-11e8-84e9-bab33ccce72a.png">
<img width="899" alt="screen shot 2018-09-18 at 10 40 07" src="https://user-images.githubusercontent.com/1927109/45676645-7fb30e00-bb32-11e8-867e-caa5d731981a.png">
2018-09-19 23:20:34 +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
fc12175ee0 Fixed remember me for login (#9233)
remember me and AuthenticateSession are incompatible on Laravel 5.4

6ca154f2b6

More info: https://kfirba.me/blog/the-undocumented-authenticatesession-middleware-decoded

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:05:32 +01:00
TheGreatDoc
ba8497d484 Added Transit+Peering to Port Aggregator in the graph widget (#9234) 2018-09-19 15:50:40 -05:00
therealshibe
05d6720a01 Add universe repo (#9238)
adjustment to ## Install Required Packages ## section > add-apt-repository universe
2018-09-19 15:49:22 -05:00
therealshibe
720e6289a8 add-apt-repository universe (#9237)
adjustment to ## Install Required Packages ## section > add-apt-repository universe
2018-09-19 15:49:11 -05:00
PipoCanaja
41cc344106 VRP: Discovery improvement for optical power + Mib upgrade (#9225)
* Huawei Mib file update

* VRP: Improve sensor discovery for optical equipment

* VRP: Improve sensor discovery for optical equipment

* VRP: Adding Test data after sensor dbm update
2018-09-19 10:00:11 -05:00
tarik
85f78e76e4 Fixing Sentry 3 and 4 Temperature Sensors (#9177)
* fixing sentry3 temperature sensor issues: read all sensors not just first two, fix reading limit and current values, fixing snmp get options

* fixing sentry4 temperature sensor issues: read all sensors not just first two, fix reading limit and current values, fixing snmp get options

* fixing code style issues

* addressing review items from murrant, removing individual snmp_gets, fixing fahrenheit to celcius code back

* addressing review items, putting back the celcius fahrenheit conversion logic back

* using snmpwalk_cache_oid instead of reinventing in sentry3 code

* using pre-cache for sentry4 temp sensors, addressing review items

* checking all sentry3 humidity sensors instead of first two, bulk reading instead of individual gets

* addressing style issues

* pre-caching sentry4 humidity warning table removing duplicate temp sensor event config table

* adding two more sentry snmprec files after temperature and humidity sensor updates

* making sensor index values for sentry3/4 unique

* adding sentry3 and 4 test data files after temperature and humidity sensors update
2018-09-19 08:16:04 -05:00
Neil Lathwood
466b5a35a8 Added ability to set a custom SQL query for alert rules. (#9094)
* Added support for AVG in rules

* More updates

* Final work to have advanced sql queries

* Added missing use

* Fix exception when invalid json is passed

* Fixed api for alert rules

* updated docs
2018-09-19 07:47:45 -05:00
Neil Lathwood
53a1730fc7 Fixed PagerDuty alert to show rule name + device as summary (#9213)
* Fixed PagerDuty alert to show rule name + device as summary

* Update Pagerduty.php
2018-09-19 02:28:50 -05:00
Tony Murray
e81a1fc79d Updated file permissions check for validate (#9218)
Always post generic full fix commands.  Use chmod instead of setfacl in case the filesystem doesn't support acls.

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:58:47 +01:00
Tony Murray
173b1339e9 Fixed install.php not redirecting when it should (#9224)
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:56:48 +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
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