5656 Commits

Author SHA1 Message Date
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
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
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
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
df31b02036 Allow uppercased interface name used in Cisco SG350X models (#9178) 2018-09-12 20:53:21 -05:00
31e931d8ee Merge pull request #9180 from murrant/astext-dns
ignore dns errors when fetching astext
2018-09-12 16:00:25 +02:00
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
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
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
ec1b6060eb ignore dns errors when fetching astext 2018-09-10 21:40:41 -05:00
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
2b983865ea fix edgecos issue (#9150) 2018-09-10 20:59:26 -05:00
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
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
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
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
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
9fc3891441 Add OpenBSD Carp State Sensor (#9143)
* Add OpenBSD Carp State Sensor

* Added json test data
2018-09-04 18:53:39 -05:00
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
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
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
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
7778e2d66c Fix edgeswitch numeric oids (#9138) 2018-09-03 07:45:18 +01:00
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
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
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
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
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
d7c84785e5 Fixed varchar comparision when using numeric and text sensor_index (#9114) 2018-09-01 10:55:20 -05:00
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
f90d0637c0 Additional debug output when sending/testing email (#9120)
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-31 23:44:50 +01:00
3268fca4cf Set ip to null when a device is renamed (#9112)
Oddly this doesn't check if the target hostname exists in the database, so that is left to the caller.  (likely the target rrd directory will exist).

If we wanted to check that in function this I'd probably covert it to Exception errors so we could signal the different types of failures.

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-30 20:38:29 +01:00
e603fcfd6f Converted PagerDuty to new transport format (#9092)
* Converted PagerDuty to new transport format

* Attempt at oauth for transports

* clean

* missing images

* reverted wrong file. phpstorm saved me...

* fix typo

* Updated to help the display

* Fix validation error, start to try to send alerts.
Editing the transport, deletes the service_key...

* Ignore hidden config options

* Fix up api call, proper feedback.

* hide oauth field in print list
2018-08-29 09:44:29 -05:00
b411f6c5d8 Small fix to not throw error if details is already empty (#9086) 2018-08-29 09:34:23 -05:00
f2253d70fd SNMP v3 auth is no longer checked for case sensitivity + push pass v3 creds to front of queue (#9102)
* Match api code to addhost.php for v3 config order

* Updated v3 auth checks for case insensitivity + docs
2018-08-29 09:16:33 -05:00
340ee6cccc Add fanspeed for EdgeSwitch (#9013)
* Add fanspeed for EdgeSwitch

* Added test files

* Move existing EdgeSwitch discovery to yaml

* Updated json test data

* remove bgp test data
2018-08-29 08:10:16 -05:00
23b46c7681 Improved port polling in certain scenarios (#9082)
* Improved port polling in certain scenarios

* Update ports.inc.php

* Update ports.inc.php

* Remove temporary variables
2018-08-28 10:29:28 -05:00
90a0bd656a Improved hiveos-wireless OS Detection (#9046)
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-08-27 21:06:51 +01:00
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
6d62026751 convert NTP to JSON and json_app_get (#9088)
* add tests for v1 of the JSON NTP client stuff

* update the NTP stuff to work with legacy and JSON

* add the NTP client legacy tests

* Update ntp-server.inc.php
2018-08-27 08:16:53 -05:00
485dc3affb Added Basic Support for Arris D5 EdgeQAM (#9083)
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 10:11:16 +01:00
e9ff8c48b6 Fixed IN db queries (#9077)
Most were fine as they hardcoded the in into the query.
Change them all to use PDO properly.
Did not fix IRCBot, they are are all hardcoded.

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-26 13:42:21 +01:00
c0b667ebc0 Isolate poller and discovery modules (#9074)
An exception in one module should not interrupt the process for other modules.

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-25 21:00:03 +01:00
05a77b7bd2 Optimize OSPF poller (#9080)
if there are no instances, don't check for areas, neighbors, and ports

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-25 09:57:28 +01:00
d46f300260 Fix port_id is null in ospf poller (#9078)
set it to 0 instead of null
2018-08-24 16:45:27 -05:00
af300f7984 Added Basic Support for Allworx VoIP Systems (#9057)
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:06:24 +01:00
4158615f85 Fixed OSPF duplicate DB entries (#9051)
Re-write ospf polling using Eloquent

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 14:06:49 +01:00
2e3aef6929 Workaround for storage bigint (#9049)
Fix is to use mysqlnd driver instead of mysqli.
2018-08-20 23:58:26 +01:00
2d2612de91 Fix broken and unused sql query in billing code (#9039) 2018-08-19 22:35:11 -05:00
e134a55556 convert zfs over to use json_app_get (#8573)
* convert zfs over to use json_app_get

* make the format checker happy

* change array brackets used and update for upcomming changes to json_app_get

* change it over to do exception checking

* styling cleanup

* cleanup error handling

* update to the latest json_app_get

* correct a bit of logic for legacy and cleanup some formatting

* add the snmprec files for the ZFS app

* add the tests for ZFS with legacy extend

* add another check

* convert these from base64 to hex

* remove improper commas

* Match upstream spacing

* fix typo

* fix bad data and zfs metrics, allow float values

* bad capture

* improve comment

* Update db_schema.yaml
2018-08-19 17:44:11 -05:00