Commit Graph

760 Commits

Author SHA1 Message Date
Notre1
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
Tony Murray
557de49ee3 Prevent bgp-peers module from adding json data for every device (#9091)
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:03:12 +01:00
VVelox
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
TheGreatDoc
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
Cole R. Davis
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
VVelox
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
TheGreatDoc
7298c135c2 Improved SmartAX OS support. Added CPU&Temperature for each card and … (#9023)
* Improved SmartAX OS support. Added CPU&Temperature for each card and hardware detection

* Minor fixes

* Uploaded test data

* Moved to snmpwalk_array_num()

* Fixed Temperature

* Added sensor power

* Fixed Style issues and proper hardware detection

* Fixed last style issue

* Last update. Added version and serial. Added traffic and processors mini graphs
2018-08-19 13:33:17 +01:00
Neil Lathwood
62190a30d4
Fixed pre-commit (#9035) 2018-08-19 09:29:34 +01:00
Cory Hill
460d95e1d6 Cleaned up Trango Apex Lynx OS code and added wireless sensors (#9026)
I removed an incorrect mib and added the correct one.  Changed initial detection to use mib instead of numeric oid. Removed trim function.  Added wireless sensor class.

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-18 21:00:18 +01:00
Cole R. Davis
8eaffe90ad Added basic support for IBM i (AS/400) (#9030)
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-18 20:49:02 +01:00
Tony Murray
a2e33efba8 Use PDO for MySQL queries (#8935)
Gut dbFacile
mres() now does nothing... could have some vulnerable queries, but most are ok

TODO
- [x] IRC client broke
- [x] Install broke

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-17 21:29:20 +01:00
Tony Murray
184f5a5f99
Fix invalid json in test data (#9015)
* Fix invalid json in test data
Most simply needed the syntax fixed
fail2ban needed updated data (added non-zero values in test data too)
awplus: ntp application cannot be enabled by tests since it doesn't use snmp extend... ntp app is enabled by ntp module... pass on that for now.

* missed awplus change somehow...
2018-08-16 11:11:03 -05:00
PipoCanaja
731da950d9 Added support for Huawei iBMC (#9011)
* Device: Huawei iBMC - Initial support for Huawei iBMC on RH servers

* Device: Huawei iBMC - Server management Console

* Device: Huawei iBMC - Server management Console - snmp_get_multi_oid

* Added json test data
2018-08-15 21:50:12 +01:00
Cory Hill
2adecd5ddb device: Added detection for SIAE Microelettronica ALFOplus2 microwave radio device (#8953)
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-15 20:06:40 +01:00
Tony Murray
4c6f917d9e Updates to snmptrap handling (#9010)
* Updates to snmptrap handling
fix a bug in findDeviceByIP.  Add more tests for that.
Move handle outside of the Trap class, it doesn't fit.
Add developer docs.

* fix tests copy paste issue.

* Fix findByIp when port may not exist.

* Logging: Output context (and extra) if they exist

* Generic trap event logging and new config setting.
2018-08-14 07:56:16 +01:00
tomarch
bdfea272be Check if value is valid for Linux servers (#8956)
Fix for issue #8950 


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-13 22:40:54 +01:00
TheGreatDoc
9940c884f5 Fixed snmptraps. (#8898)
* Fixed snmptraps.

* Fixed space

* Added bgp down/up and authentication failure

* Fixed typo

* Fixed some typos, arrays, astext and format_hostname

* Updated documentation

* Moved code to a function

* Some refactor

* Minor fixes

* Minor fixes 2

* More minor fixes

* Changes requested by Tony

* Minor fixes

* Moved include to snmptrap.php

* Refactor traps to use object oriented code.

Should trigger events too/instead, but we'll leave that.
Testing todo

* Add tests and fix things so they actually work
Not checking events yet.

* Fixed typo and severity level

* Update composer deps, I think the lock file wasn't right.
add json and mbstring extension deps while I'm at it.

* Fix several issues with phpunit fixtures
2018-08-11 16:37:44 -05:00
Tony Murray
50bb72f530 Remove port association mode map from the database (#8941)
* Remove port association mode map from the database

* Renamed sql file

* Renamed sql file
2018-08-05 09:50:13 +01:00
Tony Murray
bd6c51e3ab Update sonus-sbc detection (#8978) 2018-08-04 22:55:49 +01:00
Neil Lathwood
cf01c3a8d1 Fixed whitespace bug in ceraos temperature sensor (#8948)
* Fixed whitespace bug in ceraos temperature sensor

* Update ceraos.json

* Update ceraos.json
2018-07-26 18:34:47 -05:00
Steve Johnson
ac3fa28f7e Added Citrix Netscaler HA sensors and alerts (#8800)
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-07-25 22:51:06 +01:00
TheGreatDoc
0bee4b3d74 Arris CMTS - C4/C4c remamed and Added C3 support (#8883)
* Added Arris C3 to cmts.yaml

* Added Arris C3 hardware

* ARRIS CMTS->Move from cmts to arris_c4 yaml

* Fixed some Arris_c4 definitions

* Added Arris C3 CMTS

* Fixed some typos

* Arris C3 test files

* Arris C4 test files

* Deleted not anymore valid files

* Renamed from underscore

* Fixed some typos

* Correct test files

* Removed old snmprec files

* Correct test files v2

* Deleted more old files

* Return to cmts for valid_sensor() for Arris C4/C4c

* Re-done test files

* Re-do test files after rebase
2018-07-24 22:31:44 +01:00
PipoCanaja
532c55335e Added VRF support on VRP devices (huawei) (#8879)
* Feature: Enable VRF handling in Huawei VRP devices using standard MPLS-L3VPN-STD-MIB

* Feature: Enable VRF handling in Huawei VRP devices using standard MPLS-L3VPN-STD-MIB

* Feature: VRF on VRP devices - Fix Codeclimate error

* Feature: VRF on VRP devices - Fix Codeclimate error

* Feature: Enable VRF handling in Huawei VRP devices using standard MPLS-L3VPN-STD-MIB

* Feature: VRF on VRP devices - Fix PR ChangeRequest

* Feature: VRF on VRP devices - Fix PR ChangeRequest

* Create vrp_ce12804-withvrf.json

* in_array, not str_contains
2018-07-23 20:44:13 +01:00
Tony Murray
8f4a041b8d
Fix Calix OS definitions (#8832)
* Fix Calix OS definitions

The main change is EXA (E7, etc) and B6 (Occam) devices are now their own OS

Now the follow OS exist:
exa: E7 EXA, E5-400, E5-48, E3-48, E3-8G
occamos: B6

Unchanged:
calix: E5-1**, E3-12C
axos: E7-2 AXOS, E9-2, E3-2, E5-520, E5-16F, E3-16F, E5-30x

* fix tests
exa_e7-2 seems like bogus data.

* additional tests, fix an error in the yaml

* Remove extra line return

* Add missed file
2018-07-23 12:44:53 -05:00
Marcus Pink
60a1a02f88 Added discovery of serverscheck flooding sensor (#8923)
Added discovery for state of serverscheck flooding sensors.

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-22 22:25:00 +01:00
vivia11
e1118b628a Added Alert Transports Mapping (#8660)
Hello all,
I guess this is the second version of a more fully fleshed out alert contact mapping feature. The old one was GH-8507

Transports to convert:

  - [x] API
  - [x] Cisco Spark
  - [x] Elasticsearch
  - [x] GitLab
  - [x] Philips Hue
  - [x] Jira
  - [x] Mail
  - [ ] ~~PagerDuty~~ - Requires a callback so leaving for now
  - [x] Nagios
  - [x] IRC
  - [x] Discord
  - [x] Rocket.chat
  - [x] Hipchat
  - [x] Pushover
  - [x] Boxcar
  - [x] Telegram
  - [x] Pushbullet
  - [x] VictorOps
  - [x] OpsGenie
  - [x] Clickatell
  - [x] PlaySMS
  - [x] Canopsis
  - [x] osTicket
  - [x] Microsoft Teams
  - [x] SMSEagle
  - [x] Syslog
  - [x] Slack

The intention is for this feature to have three different levels to it:
1. Alert rule to an alert contact mapping (where the code is at now)
2. Alert rule to an alert group (made up of alert contacts) mapping
3. Alert contact mapping to different transport configurations.

There will be three transport configuration types.
1. Default (the configuration that is held in the configs table)
2. None (no transport configuration - will explain later)
3. Other (a configuration that will be defined in a different able)

Take Mail transport for example. It can either be of a "default" or "other" configuration. The hope is that in the future, users can send mail from different mail servers if they wish.
However, for ciscospark which requires a room ID and an api-token, I've decided that it has no transport configuration. Most likely, every alert contact will contain a different room-id and an api-token - which is why it has the transport config of "none".
For other transports : I am not familiar with them, so hopefully the community can add support for these. I can definitely help!

To add support for each transport will require several things:
- addition to the UI
- addition to forms/alert-contacts.inc.php
- modifications to its object class

Screenshots
![image](https://user-images.githubusercontent.com/28970851/39594533-2092ce9e-4eca-11e8-9c5d-cd002ece1425.png)
![image](https://user-images.githubusercontent.com/28970851/39594544-276e9856-4eca-11e8-80cc-82789ee0b2b2.png)
![image](https://user-images.githubusercontent.com/28970851/39594553-2fdf528c-4eca-11e8-8a40-4f149e767054.png)

I'm not sure if this is the best way to do things, so please let me know if there's a better way to structure the code! Any comments on code/db schema,/UI etc is welcome and encouraged! 

The UI is heavily based on alert rules (front end is not my strong suit). And parts of the code are based on the code that was written for alert rules.

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-21 20:34:59 +01:00
Søren Rosiak
9ebe70e446 Improve DCN Device Support (#8878)
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`
fix #8755 

I have not added test data as it would require filterting quite some LLDP/IP's etc information.
2018-07-19 22:01:21 +01:00
CrazyMax
d0943313e2 Added detection for CoreOS devices (#8899)
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-07-16 17:36:42 +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
Paul Heinrichs
f22e1a6ba6 Improved support for cambium cmm and added cmm4 (#8737)
- Added port discovery for cmm3 (not available for cmm4, not that i could find)
- Added discovery for cmm4
- Added Power port cmm4
- Removed Processor bug by disabling processor on device.

I am unable to test CMM4 and may need someone to do so or review for possible errors.

Fixes Issues #8732, #8731

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-07 13:56:54 +01:00
Søren Rosiak
37e3643679 Small Cleanup (#8871)
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-07 13:55:17 +01:00
Søren Rosiak
87a4174f3e Added APC Environmental Manager Support (#8872)
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`
fix #8781
2018-07-07 13:54:22 +01:00
mattie47
b8a89094b3 Added Allied Telesis Wireless Support (#8692)
* device: Initial support for Allied Telesis Wireless devices

This commit provides basic info for Allied Telesis TQ Access Points

* device: allied wireless initial test data

* device: allied wireless

Fix up mibs.
-- Moved ATKK-WLAN-ACCESS to awplus mibs folder
--- ATKK-WLAN-ACCESS mib relies on AT-SMI-MIB
-- Changed Allied-wireless to look at awplus mibs folder instead of allied
--- As above due to newer AT-SMI-MIB file
- Performed new snmprec with walk on enterprise OID
-- For some reason the enterprise and wireless specific tables are not
   walked by a default snmpwalk.

* add snmpwalk for analysis

* Attempt at wireless polling

* Delete allied-wireless-snmpwalk.txt

* device: fix basic allied wireless

* Update allied-wireless.json

* Simplify Allied Wireless test data

* fix allied-wireless definition

* device: allied-wireless renamed to allied-tq

* Update allied-tq.yaml
2018-07-02 21:17:00 +01:00
Richard Mayhew
528b91a056 corrected display of minigraph when using sysName as hostname (#8842)
* corrected display of minigraph when using sysName as hostname

* Check to see if its an IP or hostname. Make sure all 3 scenarios work.

* removed test rrd symlink

* removed test rrd symlink

* reverted old change

* Improve and add tests.
2018-07-02 08:23:09 -05: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
Neil Lathwood
d11a852651
Added tests for latest hpe ilo changes (#8835) 2018-06-23 21:59:28 +01:00
TheGreatDoc
8c610326e3 Added SNR Sensor to CMTS Arris (#8840)
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-23 21:57:59 +01:00
Neil Lathwood
69a6098d43
Added detection for Netscaler SD-WAN devices (#8825) 2018-06-20 22:39:05 +01:00
Reinier Schoof
7b182e2a80 Improved support for DNOS/FTOS M-Series (#8749)
Current implementation for Force10 series doesn't support the switch-blade M-Series model. This PR adds support for mempools and temperature. In my test environment (still 1.31) I have processors utilization support as well, but I have to test that in the new way processors are handled since 1.37

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-16 12:47:30 +01:00
centralscrutiniser
646a37f55e Added detection for EfficientIP SOLIDserver (#8773)
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`

- Added initial detection for EfficientIP SOLIDserver
2018-06-15 14:00:20 +01:00
Tony Murray
e736f5efec Updated YAML schema validation (#8808)
Changed some values to be explicitly boolean


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-15 09:45:20 +01:00
Paul Heinrichs
05c03a2290 Clean up old cambium code / migrate more data to wireless sensors (#8725)
* Clean up old cambium code / migrate more data to wireless sensors

Update tests

* Fix tests

* Update 450m tests
2018-06-13 22:34:37 +01:00
Andrew Steen
c5a8794f9b Added Juniper SRX Branch Session Graphing (#8815)
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 was previously a pull request that was closed #8721 

Not sure why it was closed or if it was abandoned since the branch they had was deleted, but I just put everything back together along with some test data. Kudos to @centralscrutiniser for the code in the original request.
2018-06-13 21:15:43 +01:00
vivia11
7eb107acb9 Added additional sensors to omnitron iconverter (#8806)
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-07 00:00:46 +01:00
vivia11
94693b0d9e Use CISCO-VRF-MIB for vrfs on non MPLS cisco devices (#8756)
* Add vrf for non mpls cisco devices, add mib and test data

* Fix custom_where in vrf module

* Better VRF module test data collection

* Update ios_6500.json

* don't include ifVrf in ports

* update all ports add dependencies to pre-commit.php

* new json files
2018-05-25 23:27:54 -05:00
Neil Lathwood
216c554b7f testing: Added test unit for Docs (#8745)
* testing: Added test unit for Docs

* Update mkdocs.yml

* Avoid extra function

* contains -> diff
2018-05-25 23:10:25 -05:00
VVelox
c3007b483a add json_app_get and convert fail2ban over to JSON (#8571)
* add json_app_get function

* add numeric testing and version support

* now use json_app_get

* remove some unneeded code

* update the docs for json_app_get some more

* make the format checker happy

* add in min version support and now take extend name instead of the partial OID

* hmm... don't make min version optional

* add Exception usage for this all make min version actually work

* minor formatting cleanup

* minor style cleanup

* update json_app_get with $throw_me setting

* Use exceptions to fully handle errors.
Always update the application.  Include error message for use in UI.
Move data to data key for easier parsing.
Add test data

* make a few changes to the lovely changes from @murrant

* style cleanup

* now attempt parsing it the old way if a error of -5 is returned

* add new exceptions and rework them all

* add new exceptions and min version 0 no longer bypasses the key checks

* redo the error codes a bit and improve the comment about it all

* fix a a bit of formatting

* added JsonAppException and make the other JsonApp stuff a sub of it

* note JsonAppException

* fix class creation

* JsonAppBlank now extends JsonApp

* doh! add <?php

* update the poller to properly use the new exceptions

* no longer check for error twice and make sure the data key is present

* cleanup processing of legacy scripts

* tweak this a bit

* white space fix

* fix the tests for fail2ban
2018-05-25 21:16:16 -05:00
Steven Barnes
cb9077a983 device: Update Barracuda Spam Firewall detection
New product name change confirmed via Barracuda chat on May 9, 2018
I plan on extending this a bit further but I'll submit a pull for that later.
2018-05-24 23:22:10 +01:00
angryp
1d4f662e02 device: Added SFP sensor discovery for Procurve devices (#8746)
* Added SFP sensor discovery for Procurve devices

* Added SFP sensor discovery for Procurve devices

* Added json test data
2018-05-24 21:30:36 +01:00
Tony Murray
c18bc38364 fix: Fixed Mimosa PtP frequency and power (#8741)
Add test data
There were also some sensor name collisions and an incorrect divisor.

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-20 20:32:07 +01:00
PipoCanaja
f663f8dec4 device: Added FDB table support for VRP using HUAWEI-L2MAM-MIB (#8719)
* Adding VRP support for FDB table using HUAWEI-L2MAM-MIB

* Test data + review corrections

* Test data correction

* Remove double text

* PHP EOL at the right spot

* Rename vrp_5720.fdb.snmprec to vrp_5720.snmprec

* Update vrp_5720.snmprec

* Create vrp_5720.json

* Update vrp_5720.json

* Update vrp_5720.json

* Fix fdb query, test data, and mibs
2018-05-19 09:46:42 +01:00
Tony Murray
909aacd27a
Add fdb-table module to tests (#8723)
* Add fdb-table module to tests
Also add the capability to select fields on joins, makes it easier to have consistent data without extra storage.

* add ticks for safety

* support multiple fields, but not aliasing

* more ticks

* Fix up selects

* Add Vrf Support too

* Fix application select
2018-05-17 09:42:00 -05:00
PipoCanaja
a1a13de0f6 feature: Added PoE graphs and improved PoE polling code (#8705)
* Poe Polling Code, Poe Graphs, and Huawei MIB

* Reverting the reindent done after pre-commit script

* Cleaning of code not used for Cisco IOS, removal of untested Procurve code, and restore of legacy generic code (tested with Cisco+huawei)

* Rename MIB file

* Rearranged duplicated code

* Cleaning of variable not used

* Cleaning of commented code after night validation in test environnement

* Cleaning after pre-commit.php comments

* test data with PoE oids for huawei 5720

* test data with PoE oids for cisco 2960X
2018-05-15 21:39:36 +01:00
theherodied
c664fbe1a6 device: Update Cumulus Support (#8626)
* Enhance Cumulus Support 001

* Enhance Cumulus Support 002

* Enhance Cumulus Support 003

* removed mibs

* Added test data

* Update cumulus.inc.php

* Update cumulus.inc.php
2018-05-13 22:09:09 +01:00
centralscrutiniser
ba0ed73d5f device: Added and Updated Blue Coat device support (#8664)
* Blue Coat device updates

* Blue Coat device updates

* Updated PHP code per @laf comments

* YAML update for Packetshaper

* SSL Visibility YAML and snmprec file

* Cleanup problematic MIB files which should not have been there

* Reset Packetshaper YAML to original

* Added json test data
2018-05-13 21:54:10 +01:00
centralscrutiniser
7cb930e318 Added AP/Client Count detection for FortiWLC (#8662)
* Added AP/Client Count detection for FortiWLC

* Corrected PHPCBF error on LibreNMS/OS/Fortiwlc.php

* Corrected PHPCBF error on includes/polling/os/fortiwlc.inc.php

* Removed IPV6-TC and re-added config.php.default per murrant comment

* Re-added config.php.default per murrant comment

* Added CPU% usage detection for FortiWLC

* Updated includes/polling/os/fortiwlc.inc.php with get_snmp_multi_oid

* Updated includes/polling/os/fortiwlc.inc.php with get_snmp_multi_oid

* Updated tests/snmpsim/fortiwlc.snmprec

* Create fortiwlc.json
2018-05-12 10:33:57 -05:00
vivia11
0797d0892f Fix sensors for cimc os (#8591)
* fix OIDs for temperature sensor and add test data

* Add current values to discover sensor and test data

* Redo test data

* Split up power/current/voltage sensors to individual files and remove json data

* Whitespace fix

* Fix temperature sensors - spelling mistakes

* Code changes to voltage/power/current sensors

* Go to yaml, add mibs and json
2018-05-11 22:23:37 -05:00
vivia11
5fd81db819 device: Added Open Access Netspire OS support (#8674)
* Add netspire os support

* Update netspire.yaml

* Change from numerical oid to regular oid and readd poller/discovery modules

* Remove mib_dir and change os polling
2018-05-10 20:17:42 +01:00
Tony Murray
1ad7f3138b
Add Laravel to LibreNMS (#8318)
* Add Laravel to LibreNMS.

* Try to set permissions during initial install and first composer update to Laravel.

* Fix composer.lock
Fix missing db config keys

* Start building v1 layout
Port ajax_setresolution, inject csrf into jquery ajax calls
Layout works, building menu
Partially done.

* Fix device group list
remove stupid count relationships

* Print messages for common boot errors.
Don't log to laravel.log file.
Log to error_log until booted, then librenms.log

* Fix up some issues with Config loading
Start of custom directives

* Custom blade directives: config, notconfig, admin

* Preflight checks
Only load config files once.

* Update the composer.lock for php 5.6

* Menu through routing

* Start of alert menu

* Better alert scopes

* reduce cruft in models

* Alerting menu more or less working :D

* Fix style

* Improved preflight

* Fix chicken-eggs!

* Remove examples

* Better alert_rule status queries
Debugbar

* fix app.env check

* User Menu

* Settings bar (dropped refresh)
Search JS

* Toastr messages

* Rename preflight

* Use hasAccess(User) on most models.
Add port counts

* Missed a Preflight -> Checks rename

* Fix some formatting

* Boot Eloquent outside of Laravel
Use Eloquent for Config and Plugins so we don't have to connect with dbFacile inside Laravel.
Move locate_binary() into Config class

* Config WIP

* Try to fix a lot of config loading issues.

* Improve menu for non-admins removing unneeded menus
url() for all in menu

* Only use eloquent if it exists

* Include APP_URL in initial .env settings

* Implement Legacy User Provider

* Helper class for using Eloquent outside of Laravel.
Allows access to DB style queries too and checking the connection status.

* Fix up tests

* Fix device groups query

* Checking Travis

* copy config.test.php earlier

* dbFacile check config before connecting
Don't use exception to check if eloquent is connected, it gets grabbed by the exception handler.
Ignore missing config.php error.

* Fix config load with database is not migrated yet.

* Remove Config::load() from early boot.

* Use laravel config settings to init db (this prefers .env settings)
Fix bgp vars not set in menu
add _ide_helper.php to .gitignore

* Restrict dependencies to versions that support php 5.6

* Update ConfigTest

* Fix a couple of installation issues

* Add unique NODE_ID to .env

* Correct handling of title image

* Fix database config not loading. Thanks @laf

* Don't prepend /

* add class_exists checks for development service providers

* Fix config value casting

* Don't use functions that may not exist

* Update dbFacile.php

* d_echo may not be defined when Config used called.

* Add SELinux configuration steps
More detailed permissions check.
Check all and give complete corrective commands in one step.

* Ignore node_modules directory

* Re-add accidetal removal
2018-05-09 08:05:17 -05: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
mattie47
e898075c36 device: Add NTP support for Allied Telesis AWPlus products (#8580)
* Add support for Allied Telesis AlliedWare Plus products

- Uses mibs from 5.4.7-2.1 for AlliedWare Plus products
- Updates Legacy AlliedWare mibs
- Added Allied Telesis svg

* Remove unnecessary "trim" from snmpget

* Add new line to end of file

* Minor fixes for commit

* awplus: initial ntp commit

This isn't completely working, however initial patch of it partially working

* awplus: Add NTP support

- Fixed polling issues for awplus. Now offset and delay graphs work.

- html/includes/graphs/device/ntp_*.inc.php
--  Removed extra "\" from MAX count which showed up in Graph legend

- html/includes/graphs/device/ntp_delay.inc.php
-- Present legend in either seconds, or milliseconds (depending on vendor)

- html/includes/graphs/device/ntp_dispersion.inc.php
-- Present legend in either seconds, or milliseconds (depending on vendor)

- html/includes/graphs/device/ntp_offset.inc.php
-- Removed rrd minimum (-l 0). This is because offset can be below 0.
--- It's better for the graph to auto scale than set a fixed minimum to display here.

- html/includes/graphs/device/ntp_stratum.inc.php
-- Changed graph to go from 0 to max of 16. NTP Stratum can only be 0 to 16.

* awplus: Add NTP test data

* updated awplus ntp poller

* device: awplus convert NTP poller into seconds

* device: fix NTP graph formatting

* device: Improve NTP formatting

* device: unset awplus NTP variable

* fix formatting

* device: awplus change NTP from numerical OIDs to named

* device: update awplus ntp json tests

* device: fix cisco and awplus ntp database creation

* device: update awplus json
2018-05-08 20:37:06 -05:00
Tony Murray
b94ad929b8
Restore OpenBSD version/features/hardware (#8673)
* Restore OpenBSD version/features/hardware

* Add os test data

* Update openbsd.inc.php
2018-05-08 20:05:09 -05:00
Paul Heinrichs
ce2b9f9e5d fix: Updated Discovery on Ceragon to re-add wireless (#8647)
* Update Poller / discovery moduls of ceragon

* Update test / snmpsim data

* Update overhead graph

* remove definition in yaml
2018-05-08 22:27:16 +01:00
mattie47
88312c0928 device: rename awplus sensor state_name (#8671)
* device: rename awplus sensor state_name

* device: update awplus test data

* Update fiberhome.json

* Update fiberhome.json
2018-05-08 06:49:38 -05:00
theherodied
d204a1beca Change Dell iDrac from Server to Appliance (#8642)
* Change HPE iLO from Appliance to Server

* reverted ilo to appliance, set idrac to appliance

* Added OS test data
2018-05-07 23:28:21 -05:00
githubuserx
9401e43eb9 Added sysObjectID for Canon LBP printer series (#8644)
* Added sysObjectID for Canon LBP printer series, previously mentioned in issue (#5637)

* Added snmprec data for Canon LBP6670 (#5637)

* Create canonprinter_lbp.json
2018-05-06 20:41:12 -05:00
Søren Rosiak
74e6e3481c newdevice: Fortinet FortiWeb Basic Support (#8654)
fix #8651
2018-05-05 00:02:05 -05:00
Kevin Ying
d257fa0ea5 Updated XIRRUS-MIB; added Temperature sensor (#8631)
* Updated XIRRUS-MIB; added Temperature

* Corrected field and indentation

* Added test data

* More test data

* Create xirrus_aos.json
2018-04-30 10:03:16 -05:00
Kevin Krumm
0c0b724b58 updated HPE iLo yaml to include HPE iLO 5 (#8634)
Detect HPE iLO 5
2018-04-30 09:06:07 -05:00
Tony Murray
d1e8e2177f fix: Fixed Q-BRIDGE-MIB VLANs (#8623)
* Fix Q-BRIDGE-MIB VLANs
Properly handle dot1qVlanTimeMark index (by ignoring it instead of assuming it is 0)
Adds test data for at least one device that uses Q-BRIDGE-MIB.

Fixes: #8516

* fix whitespace

* remove unused variable
2018-04-27 14:22:49 +01:00
Neil Lathwood
efe8b8858b device: Added detection for Red Lion Sixnet devices (#8576)
* device: Added detection for Red Lion Sixnet devices

* Added state sensors
2018-04-26 08:47:15 -05:00
Neil Lathwood
3d65deaf91 device: Added detection for Corero CMS devices (#8574)
* device: Added detection for Corero CMS devices

* remove files added by accident
2018-04-26 08:46:10 -05:00
Neil Lathwood
7b2c1e0fe4 Added Dahua NVR processor and sensors (#8570)
* Added Dahua NVR processor and sensors

* moved cpu

* updated proc data
2018-04-26 08:45:15 -05:00
vivia11
96fa9c6ec6 Rewrite state sensors to walk entire table for TIMOS (#8588)
* Rewrite state sensors to walk entire table

* Adding test data
2018-04-24 21:36:14 -05:00
Tony Murray
d69e965309 Fix incorrect word polled/discovered (#8606) 2018-04-24 08:51:01 +01:00
Tom Sealey
ecfdb681a9 bug: Fixed high/low calculations (#8603)
* changed limit values in routeros.yaml to allow for the divisor value of 10

* changed the code so divisor/multiplier is only used for oids

* updated json test file
2018-04-23 21:30:13 +01:00
CZ
fa035be4c9 New FiberHome SVG Logo (#8601)
- replace PNG with SVG
- adjust testing json data to *.svg
  (fiberhome_switch and fiberhome)
2018-04-23 21:17:51 +01:00
TheGreatDoc
aa8bc5c26d device: Added support for HWG Poseidon sensors (#8593)
* newdevice: Add support for HWG Poseidon 4002

* Added snmprec file

* Added json test file
2018-04-23 20:48:47 +01:00
CZ
23740bce6f device: Added support for FiberHome Switches S5800/S4800/S2800 (#8569)
* Fiber Home Switch Device Support
- Basic OS support
- New Logo
- Sensor support
- Fiberhome MIBS (wriSMI)

* Fibrehome Switch Device Support
- add mempools discovery

* Fiberhome Switch Device Support
- remove mib bases high/low limit for FAN entity

* Fiberhome Switch Device Support
- remove unsupported processor high_limit option

* FiberHome Switch Device Support
- snmpprec files for S28/S48/S58 added
- removed not used FH MIB files

* Fiberhome Switch Device Support
- add snmprec for FHN5800 FHN4800 FHN2800

* Update fiberhome.svg

* FiberHome Switch Device Support - changes as per request

* FiberHome Switch Device Support
- adjusted code to PSR2 standard

* FiberHome Switch Device Support - add tests

* FiberHome Switch Device Support - added back fiberhome.png since currently expected in other json

* FiberHome Switches Device Support - Deleted fiberhome.svg (for now)

* Fiberhome Switch Device Support - corrected wrong MIB renaming

* Update fiberhome-switch.inc.php

* Update fiberhome-switch.inc.php

* Update fiberhome-switch.inc.php

* Update fiberhome-switch_fh4800.json

* Update fiberhome-switch.json

* Update fiberhome-switch_fh2800.json

* Update fiberhome-switch.yaml
2018-04-22 14:01:37 +01:00
ospfbgp
9a420a6910 device: Rebranding of Avaya BOSS and VOSS OS' (#8469)
* Update avaya-ers.yaml

Extreme bought avaya network assests so rebranding and moving some files.

* Add files via upload

Extreme bought avaya networking assets and so rebranding to Extreme and adding logos with OS for easier reading when on devices pages

* Update avaya-vsp.yaml

removing .1.3.6.1.4.1.45.3.79.1  This is a VSP 7024xl from avaya.  This is techincally not VOSS but BOSS operating system.  It should be in BOSS and avaya-ers.yaml

* Add files via upload

* Update and rename avaya-vsp.inc.php to extreme-voss.inc.php

* Update and rename avaya-vsp.inc.php to extreme-voss.inc.php

* Update and rename avaya-vsp.inc.php to extreme-voss.inc.php

* Update extreme-voss.inc.php

* Rename avaya-vsp.inc.php to extreme-voss.inc.php

* Rename avaya-vsp.inc.php to extreme-voss.inc.php

* Rename avaya-vsp.yaml to extreme-voss.yaml

* Update and rename avaya-vsp.yaml to extreme-voss.yaml

* Update avaya-ers.yaml

* Rename avaya-ers.yaml to extreme-boss.yaml

* Rename avaya-ers.inc.php to extreme-boss.inc.php

* Update and rename avaya-ers.inc.php to extreme-boss.inc.php

* Update and rename avaya-ers.inc.php to extreme-boss.inc.php

* Update and rename avaya-ers.inc.php to extreme-boss.inc.php

* Update and rename avaya-ers.inc.php to extreme-boss.inc.php

* Update and rename avaya-ers.inc.php to extreme-boss.inc.php

* Update extreme-boss.yaml

* Update extreme-voss.yaml

* Update and rename extreme-boss.yaml to boss.yaml

* Update extreme-voss.yaml

* Rename extreme-voss.yaml to voss.yaml

* Rename extreme-boss.inc.php to boss.inc.php

* Rename extreme-voss.inc.php to voss.inc.php

* Rename extreme-boss.inc.php to boss.inc.php

* Rename extreme-voss.inc.php to voss.inc.php

* Update and rename extreme-voss.inc.php to voss.inc.php

* Rename extreme-voss.yaml to voss.yaml

* Rename extreme-voss.inc.php to voss.inc.php

* Update and rename extreme-voss.inc.php to voss.inc.php

* Update and rename extreme-boss.inc.php to boss.inc.php

* Update and rename extreme-boss.inc.php to boss.inc.php

* Update and rename extreme-boss.inc.php to boss.inc.php

* Rename extreme-boss.inc.php to boss.inc.php

* Update voss.inc.php

* Update boss.inc.php

* Update boss.inc.php

* Update voss.inc.php

* Update voss.inc.php

* Update voss.inc.php

* Update voss.inc.php

* Update voss.inc.php

* Update voss.inc.php

* Update boss.inc.php

* Update boss.inc.php

* Update voss.inc.php

* Update boss.inc.php

* Update voss.inc.php

* Update voss.inc.php

* Rename avaya-vsp_8404c.snmprec to voss_8404c.snmprec

* Rename avaya-vsp_8404.snmprec to voss_8404.snmprec

* Rename avaya-vsp_8284xsq.snmprec to voss_8284xsq.snmprec

* Rename avaya-vsp_7254xtq.snmprec to voss_7254xtq.snmprec

* Rename avaya-vsp_7254xsq.snmprec to voss_7254xsq.snmprec

* Rename avaya-vsp_7024xls.snmprec to boss_7024xls.snmprec

* Rename avaya-vsp_4850gts.snmprec to voss_4850gts.snmprec

* Rename avaya-vsp_4850gts-pwr.snmprec to voss_4850gts-pwr.snmprec

* Rename avaya-vsp_4450gsx-pwr.snmprec to voss_4450gsx-pwr.snmprec

* Rename avaya-ers.snmprec to boss.snmprec

* Rename avaya-ers_1.snmprec to boss_1.snmprec

* Update and rename avaya-ers.json to boss.json

* Update and rename avaya-vsp_8404.json to voss_8404.json

* Update and rename avaya-vsp_8404c.json to voss_8404c.json

* Update and rename AvayaErs.php to Boss.php

* Update Boss.php

* Restore processor_type to avaya-ers in test data

* Update voss_8404c.json

* Update extremeboss.svg

* Update extremevoss.svg
2018-04-21 11:21:14 +01:00
Richard Mayhew
350045995c webui: Replaced old Mikrotik SWOS vendor logo with the correct Mikrotik Logo (#8584)
* Replaced old Mikrotik SWOS vendor logo with the correct Mikrotik Logo

* Uptated RouterOS and SWOS to use a common Mikrotik logo

* Removed unused routeros.svg image file

* Updated test to use new defined icon
2018-04-21 09:56:54 +01:00
vivia11
f9da8ef2a1 device: Added dection for ibm-dpi os (#8541)
* Add ibm-dpi os support

* SNMP test data

* Remove blank space

* remove snmp_get

* Rename to dpi

* Add json test data and change text to IBM DPI

* Update json test
2018-04-20 11:12:24 +01:00
vivia11
146fc985aa device: Fixed polling for state sensor on ict-pdu (#8558)
* Remove if/else for polling. Gives incorrct index.

* delete ict-pdu file for state polling

* Added test data
2018-04-15 15:46:32 +01:00
Alan Gregory
d08e1e6bb9 Fiberhome updates (#8561)
* Added new Fan and Power state

* Update test cases

* Low voltage si warning level

* Update test
2018-04-13 21:57:34 -05:00
Neil Lathwood
1c94cddd70 fix: Apply divisor / multiplier to high/low limits in sensors (#8427)
* fix: Apply divisor / multiplier to high/low limits in sensors

* Updated test data for airos

* updated sensors test data

* Updated test data

* Updated test files

* updated dell-rpdu tests

* Updated to do division / multiply after check for value
2018-04-13 21:43:40 -05:00
Slashdoom
d7a82f0e6e ArubaOS mempool scale fix (#8557)
* mem scale fix

* update test data
2018-04-13 08:58:53 +01:00
Slashdoom
041de7e822 device: Added mempols and cpu for ArubaOS controllers (#8548)
* arubaos mempools discovery

* arubaos mempools poller

* add mibs_dir to yaml

* discovery typo

* correct filenames might help

* remove debugs

* fix

* arubaos processor yaml

* processor yaml with sup cpu override

* remove mib_dir to use default mib search

* requested cleanup items

* WLSX-SYSTEMEXT-MIB added to mib line

* added test files

* update tests with mempools and processors info
2018-04-12 08:31:19 +01:00
Neil Lathwood
974b5eb84f device: Updated cyberpower sensors and os support (#8551) 2018-04-11 22:32:24 -05:00
Alan Gregory
5d708e53b4 Update sensors and tests for fiberhome OS (#8549)
* Moved temperature sensor to yaml

* Enabled sensors , it's working now

* Enable mempools and disable unused wireless discovery.

* Tests for fiberhome OS, variants can be merged on future
2018-04-11 22:29:51 -05: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
Neil Lathwood
c09e44aa94
device: Added support for Dahua NVR (#8542)
* device: Added support for Dahua NVR

* Update dahua-nvr.yaml
2018-04-11 15:34:21 +01:00
Paul Heinrichs
c828114639 device: Pmp 450m metrics added (#8537)
* Update cambium MIBS

* Add pmp-450m utilization metrics

Added test data

* Re-run json test data

* Rremove application data from json

* Rename pmp tests to match hardware
2018-04-11 07:59:08 -05:00
Neil Lathwood
94abddcd1b device: Updated buffalo OS detection (#8536) 2018-04-11 07:58:00 -05:00
theherodied
e74af0a411 device: AeroHive Wireless added AP130. (#8543)
* Added AP130.

* Added AP130 Test Data.

* Fix Test Data 001.
2018-04-11 10:16:20 +01:00
djamp42
d1ad2696d1 device: Added CPU Information for Ruckus Wireless Type (#8529)
* Add CPU Information for Ruckus Wireless Type

Tested on ZD1100 & ZD1200

* Create ruckuswireless_zd1100.json

* Create ruckuswireless_zd1200.json
2018-04-10 15:36:35 +01:00
Søren Rosiak
7e4bae26ca device: Improve DCN detection (#8531)
* newdevice: Improve DCN support

fix #8452

* Updated dcn-software tests
2018-04-09 21:45:41 +01:00
theherodied
2b093323f6 AeroHive added AP Env Temp. (#8520)
* Added AP Env Temp.

* Changed to yaml

* Corrected yaml

* Added over graphs

* Updated json test data.
2018-04-09 13:17:00 -05:00
theherodied
313b46236e Added Tegile Storage OS detection, storage pool, and project storage. (#8464)
* added Tegile Storage 001

* Tegile fixed whitespace 002

* Added tegile.snmprec 003

* Added TEGILE-MIB

* Tried to fix svg size issue

* Tried to fix svg size issue 005

* Tried to fix svg size issue 006

* Trying dedup 007

* Revert "Trying dedup 007"

This reverts commit b30a3edb49.

* Tried to fix svg size issue 009

* Tried to fix svg size issue 010

* Reverted changes and created new branch

* changed tegile to intelliflash

* changed tegile to intelliflash

* changed tegile to intelliflash 002

* added intelliflash snmprec

* added Json test data

* Update intelliflash.json

* Redid logo

* Update tegile.svg

* changed to intelliflash1. intelliflash2 will come later.

* removed previous commit I made

* Adding project usage

* simplified project calculations

* simplified project calculations

* simplified project calculations

* simplified project calculations

* Cleaned up comments

* Added disco OS if check and removed network over graph

* chenged os detection to sysObjectID. Fixed disco if check.

* Updated json test file

* Fixed intelliflash-pr storage units.

* Updated test data

* Updated test data to remove bgp module
2018-04-09 00:57:22 -05:00
Søren Rosiak
e0b7cc1b5f newdevice: Add basic Ubiquiti LTU airFiber support (#8521)
* newdevice: Add basic Ubiquiti LTU airFiber support

* Update airos-af-ltu.json
2018-04-09 00:34:25 -05:00
Paul Heinrichs
098c948a04 device: Added Last Mile CTM support (#8478)
* Add Listmile mibs

Created custom lastmile mib

* Add Lastmile CTM support

* Update test description and remove wireless sensor

* Requested changes

Renamed OS

* json test data

* Updated test data
2018-04-08 09:32:41 +01:00
djamp42
a3f822b7a3 device: Added Total Wireless Client and AP count for Ruckus Wireless OS Type (#8503)
* Create Ruckuswireless.php

Add Total Authorized Clients and Total AP Connected to Zone Director, Tested on Zone Director 1200 & 1100.

* Update Ruckuswireless.php

* Create ruckuswireless_zd1200.snmprec

* Create ruckuswireless_zd1100.snmprec

* Add AP count and Wireless Client over graphs

* Update ruckuswireless_zd1200.snmprec

* Update ruckuswireless_zd1100.snmprec
2018-04-07 20:13:18 +01:00
theherodied
a81e2d25cd Added 2n device detection. (#8490)
* Added 2n Intercom mib

* Added 2n png logo

* Added 2n definitions yaml

* changed 2n logo. still needs to be changed later.

* changed 2n logo. still needs to be changed later 2.

* changed os name

* png not working

* trying svg. need to fix still.

* changed to object id detection

* added includes/polling/os/2nipforce.php

* named file correctly 2nipforce.inc.php

* added 2nipforce.snmprec

* added uptime to over graphs

* Changed to HeliosIP OS

* Changed to HeliosIP OS

* Removed Device Traffic from over graphs

* working on review requests 001

* Like so

* Create heliosip.json

* Update heliosip.json

Forgot to clear os cache

* Removed svg dimensions.

* Made 2n logo again.
2018-04-07 10:53:17 -05:00
theherodied
f69412525e device: Added AeroHive Wireless Support (#8500)
* AeroHive 001

* AeroHive 002

* AeroHive 003

* Removed duplicate HiveOS for OS

* Added AP550 detection

* changed to Hiveos-Wireless

* changed back to HiveosWireless. Hiveoss-Wireless doesn't work

* changed back to HiveosWireless. Hiveoss-Wireless doesn't work

* Added Processor Usage.

* Added Mempool.

* working on review requests 001

* working on review requests 002

* stuck on radio stats

* WirelessSensor.php added channel 165

* Added AP250 snmprec

* Frequency work in progress.

* Frequency trying another way.

* Frequency trying another way 002

* Fixed AH-SMI-MIB? Added array try 003

* Frequency array is working thanks to Murrant.

* Frequency array description working.

* Added TX Power

* changed interface naming method

* Review changes 001

* Review changes 002

* Review changes 003

* Added json test data.

* Fixed test data 001.
2018-04-07 13:27:19 +01:00
Søren Rosiak
831bd01004 newdevice: Add Dell Rack PDU Support (#8498)
* newdevice: Add Dell Rack PDU Support

fix #7945

* Updated json test data
2018-04-05 22:09:27 -05:00
Tony Murray
cc377353f3 Snmpsim fail when it fails (#8392)
* Update snmpsim to fail better if it can't be started.
The main issue is the isRunning() check was done too soon after forking, the sh process was still running.

* increase default delay to 2s

* Pull this back, all we need is the sleep really.

* Remove removed exception
2018-04-05 22:49:58 +01:00
vivia11
b71febf372 device: Added WTI-MPC OS and mib (#8492)
* Add icon and initial discovery

* Added more discovery for wti-mpc. Add mib.

* Add snmp data and edit discovery

* Remove discovery due to weird mib[C

* Update wti-mpc.yaml
2018-04-01 21:38:47 +01:00
Tony Murray
9885be4837
Test data for #8487 (#8493) 2018-03-29 22:29:54 -05:00
cchance27
63d6cf810a Cambium pmp ap client count discovery (#8487)
* Add pmp450 AP client count support

* add tests
2018-03-29 21:58:53 -05:00
Neil Lathwood
250b02fe23 device: Added detection for Cisco SPA devices (#8446)
* device: Added detection for Cisco SPA devices

* Drop sysDescr check
2018-03-29 00:27:24 -05:00
Søren Rosiak
8ec70a92af Improve Sentry4 discovery (#8407)
* feature: Improve Sentry4 discovery

* Added test data

* Updated to take into account C/F conversion

* fixed test json data
2018-03-29 00:22:17 -05:00
vivia11
314a552437 devices: Add Phybridge OS support (#8456)
* OS yaml definition for Phybridge

* Add images and snmp data

* Removed width/height from svg and added more specific discovery for phybridge

* Minimized svg and inverted icon

* added json test file

* update to json file

* Changing os name: phybridge to phybridge-flex

* Update json file to phybridge-flex

* Remove unneeded test data
2018-03-28 23:54:02 -05:00
James Andrewartha
2313e9c967 Add serial number detection to xerox, which is the standard prtGeneralSerialNumber from Printer-MIB (#8439) 2018-03-28 23:53:14 -05:00
Neil Lathwood
07ee21b04d fix: Fixed and improved toner discovery (#8428)
* fix: Fixed and improved toner discovery

* Update konica data
xerox tries to insert too long of descriptions.  Lets remove the part and serial number, they are ugly to look at in the ui.
2018-03-28 22:13:45 -05:00
Neil Lathwood
4c2822fe77 device: Improved detection for dlink and dlinkap devices (#8447) 2018-03-23 15:04:25 -05:00
Neil Lathwood
41dbc3547d device: Added detection for Raritan KVM and EMX devices (#8279) 2018-03-23 12:26:09 -05:00
Neil Lathwood
e0589e0efe Added better detection for HiveOS devices (#8277)
* device: Added better detection for HiveOS devices

* Added MIBs for later use
2018-03-23 12:25:46 -05:00
Tony Murray
333efe1402 Query builder fix root OR with more than one rule (#8457)
pushed the first recursion loop down, makes the code cleaner.
2018-03-23 14:39:13 +00:00
Neil Lathwood
9019f6c599 device: Added additional detection for Calix B6 (#8445) 2018-03-22 13:38:21 -05:00
ospfbgp
dba3f3fdfd device: Update avaya-vsp.yaml to reflect new vendor name (#8373)
* Update avaya-vsp.yaml

Extreme purchased the Avaya network assets and so I need to rebrand the VSP to be Extreme.  I am changing the icon to be Extreme.  I am also adding support for the 8404c which is  sysObjectID .1.3.6.1.4.1.2272.220

* Create avaya-vsp_8404c.snmprec

need to add a new vsp 8404c chassis support for avaya/extreme

* Added generated json file

* Udated test files
2018-03-22 08:37:12 +00:00
Tony Murray
2f25d11747 More complete query builder parsing (#8422)
* fix like and is null operators

* Add between operator support

* Can't have one if ($expand) clause

* fix up empty, add tests

* Use single quotes for strings

* Fix moxa sensors order

* Fixed travis
2018-03-20 10:54:02 +00:00
Tony Murray
10237ea097 Update screenos data (#8410) 2018-03-19 21:37:19 +00:00
priiduonu
f68f4b2240 newdevice: Added support for Moxa EDS-P510A-8PoE (#8384)
* newdevice: add support for Moxa EDS-P510A-8PoE

Support PoE port consumption, SFP module monitoring and power input statuses for Moxa EDS-P510A-8PoE industrial switch.

* Add Moxa EDS-P510A-8PoE MIB

* Rename MOXA-EDSP510A_8POE-V3.7-MIB.my to MOXA-EDSP510A_8POE-V3.7-MIB

* Update moxa-etherdevice.yaml

Moved MIB definitions to the top as proposed by @laf

* Create moxa-etherdevice_edsp510a8poe.snmprec

* Create moxa-etherdevice_edsp510a8poe.json

* Rename MOXA-EDSP510A_8POE-V3.7-MIB to MOXA-EDSP510A8POE-MIB
2018-03-19 20:58:41 +00:00
axemann
d20d6fcc18 AOS-EMU2: Add contact,relay,outlet discovery; update yaml,snmprec,json (#8317)
* Add contact,relay,outlet discovery; update yaml,snmprec,json

* Fix formatting

* Another attempt at fixing sensors

* Update state mappings and fix json sensor ordering

* Capture values numerically.
Remove extra if/else statement
Make test data more interesting.

* Fix whitespace.

* Update sensors test data for order_by
2018-03-17 14:11:00 -05:00
vivia11
281e01d4f8 device: Added Radwin OS Wireless Sensors (#8372)
* Radwin OS added.

* Changing whitespace.

* Added test data for radwin 5550-0h150,5550-0150, 5200-0150

* Added radwin json test data

* Adding json test data for Radwin
2018-03-17 13:08:00 +00:00
Jason Cheng
a570165f85 device: "DEVELOP" Support (#8153)
* device: "DEVELOP" Support 

support "DEVELOP", it's fork by KONICA MINOLTA.

* Update konica.yaml

* Add tests
2018-03-17 01:07:04 -05:00
Søren Rosiak
8fdedcf484 device: Added more Dell iDrac state sensors (#8254)
* feature: Add more Dell iDrac state sensors

* add test data

* Added drac.json test data

* Re-run test data

* Fix drac.inc.php
2018-03-16 10:21:22 +00:00
mattie47
0491e2edd0 device: Improve Allied Telesis Chassis product support (#8139)
* device: Improve Allied Telesis Chassis product support

Fix - Wrong Serial number was displayed
Enhancement - Show the type of Controller card in chassis

Controller card can be either CFC400, or CFC960.

Tests:
- Checked Chassis x8106, and x8112
- Checked with CFC400 and CFC960
-- Checked behaviour with/without CFC in bay 1.5

* device: Update awplus to use snmp_get_multi_oid

* update awplus device support

* device: Fix awplus snmptranslate logic error

* device: awplus chassis support improvements

* device: update awplus test data

* device: fix awplus serial number info

* device: fix awplus test data
2018-03-15 09:52:29 +00:00
Tony Murray
2bcc76625c Module tests update: per module output, only store modules data that are run (#8355)
* Test data: don't save data for modules that were not run

* Sometimes mibs are prefixed with +

* Save output for each module and only output the errored module.
Also makes it easier to identify modules that were ran.

* Clean up json files.
Message when no module data exists.

* verbose output when phpunit --debug is used
order by for ports
avoid graphite output in tests
only load module_tables.yaml once

* use explode and strpos instead of regex since it is failing...

* Fix some warnings

* Fix whitespace
2018-03-14 22:28:01 +00: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
jackson-tim
f55d98ab03 device: Added Lenovo CNOS support (#8332)
* Lenovo CNOS Discovery+Logo Update

* Lenovo MIBs

* Update lenovo-cnos.yaml

Left example CPU Usage there.

* Update lenovo-cnos.yaml

* Update lenovo-cnos.yaml

* Update and rename lenovo-cnos.yaml to cnos.yaml

* Rename lenovo-cnos.yaml to cnos.yaml

* Rename Lenovo-Env-MIB.mib to LENOVO-ENV-MIB

* Rename Lenovo-Products-MIB.mib to  LENOVO-PRODUCTS-MIB

* Rename Lenovo-SMI-MIB.mib to LENOVO-SMI-MIB

* Update lenovo.svg

* Create cnos.json

* Create cnos.snmprec

* Update cnos.json

* Update cnos.yaml
2018-03-13 11:59:35 +00:00
James Andrewartha
6c3473a7f8 ewc: more WirelessSensors and processor/mempools support (#8294)
* Add Errors, NoiseFloor, RSSI, SNR and Utilization Wireless Sensors for ewc

* Enable processor/mempool support for ewc using existing enterasys implementation

* Add test data
2018-03-05 09:46:59 -06:00
boudreau
68d42b065e device: Updated OIDs for Cisco FTD model 9300
* adding new device Firepower9300

* Update ftd.snmprec

* Add Connections graphs to FTD Firewall

* bad cut and paste, good catch
2018-02-28 13:15:31 +00:00
Neil Lathwood
9dac4cfa6e
device: Added temp, power and state sensors to procurve os (#8281)
* device: Added temp, power and state sensors to procurve os

* changed sensor value

* updated sensors value

* updated test data
2018-02-27 20:48:16 +00:00
axemann
897081b2d3 device: Added support for APC AP9320 and fix humidity sensors (#8284)
* AOS-EMU2 add support for APC AP9320, fix humidity sensors

* Added snmprec and json

* AOS-EMU2 add support for APC AP9320, fix humidity sensors

Added snmprec and json

* Fix aos-emu2_ap9320.json
2018-02-27 20:38:50 +00:00
Michael Renner
b5273969a0 feature: Fetch ifAlias data for devices on the bad_ifXEntry list (#8275)
* fetch ifAlias data for devices on the bad_ifXEntry list

* add test data for SG350-10
2018-02-27 16:57:24 +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
Tony Murray
a6f6e4d399 device: Added support for ScreenOS arp tables (#8273)
Has a buggy implementation of ipNetToMediaPhysAddress
2018-02-22 08:28:41 +00:00
Tony Murray
6887d771aa device: Added CeraOS wireless sensors (#8167)
* CeraOS wireless sensors

* Add CeraOS test data, fix MSE

* fix whitespace
2018-02-18 21:31:18 +00:00
mattie47
4a0acad79a device: Implement Allied Telesis Environmental Monitoring (#8140)
* device: Implement Allied Telesis Environmental Monitoring

Initial patch to monitor:
- fans
- temperature

State:
- fans
- temperature

* device: Implement Allied Telesis Environmental Monitoring

Patches cover:

- Fan Speed and State
- Voltage Speed and State
- Temperature and State
- Power Supply State

* updated awplus test data

* Update awplus sensors and snmprec test data

* Add awplus processor snmprec stats
2018-02-14 17:11:53 -06:00
Alan Gregory
977796382d StoneOs improvements (#8155)
* Added snmp mibs from vendor (https://www.hillstonenet.com)

* Added memoery discovery and pool

* Added serial and os version discovery.

* Added cpu discovery.

* Added temperature and power sensors

* Added test data.

* Fix yaml format.

* Pass mib name as parameter.

* Pass mib name as parameter.

* Use numeric OID

* User snmp_get_multi_oid

* Use snmp_get_multi_oid

* Remove default extension from vendor.

* Update test data.

* Renamed some mibs + changed oid in disco proc

* Updated json test data

* Update processor discovery to yaml
2018-02-07 23:28:46 -06:00
Tony Murray
f6ad067af4
airos processor and sensor fixes (#8227) 2018-02-07 23:24:20 -06:00
axemann
f6cc671bb0 Add OPNsense support (#8199)
* Add OPNsense support

* Add OPNsense support (#8196)

* Revert unix.inc.php, move polling to opnsense.inc.php

* Revert unix.inc.php

* Update opnsense.inc.php
2018-02-07 23:17:35 -06:00
Tony Murray
6bbe5038e8
fix linkify to work with with ip addresses (#8226)
* fix linkify to work with with ip addresses

* update tests
2018-02-07 20:48:18 -06:00
Tony Murray
8abe508cfd
Cisco Processor update (#8216)
Fix issues with newer devices by updating CISCO-PROCESS-MIB
Detect individual cores on supported processors
2018-02-07 20:47:56 -06:00
Misha Komarovskiy
26ce852c95 device: Add XOS X480 and X650 desc and tests (#8206)
* device: Add XOS X480 and X650 desc and tests

Signed-off-by: Misha Komarovskiy <zombah@gmail.com>

* device: add XOS x480 and x650 test data

Signed-off-by: Misha Komarovskiy <zombah@gmail.com>

* Add missing hardware string in test data
2018-02-06 23:47:56 -06:00
Tony Murray
e97c3bcb0c
Fix awplus typo (#8215) 2018-02-06 22:42:07 -06:00
Tony Murray
913d6dc641 refactor: Update awplus to new processor discovery (#8204)
* Update awplus to new processor discovery
Have no test data, so this needs testing.

* Updated YamlTest to include data as optional param for processors
2018-02-06 22:28:14 +00:00
Tony Murray
5141fc4872 refactor: Share code between all mysql based authorizers (#8174)
* Share code between all mysql based authorizers
I plan to update the mysql password encryption and this will allow the code to be changed in a single location.
It also reduces a lot of duplication.

* Fix tests, I suspect reauthenticate will work for these...
Do not allow password updates for several authorizers
2018-02-06 21:20:34 +00:00
Tony Murray
f706d0ab41 fix: Fixed cbgp peers data on some devices (#8208)
* IOSXR snmprec data (unsorted)

* iosxr sorted

* Fix cbgp peers data on some devices

* fix formatting
2018-02-06 21:06:44 +00:00
Tony Murray
e940f0b39c
Add some wireless test data (#8210)
saf lumina, saf phoenix, airos, airos-af, unifi uap
2018-02-06 14:05:46 -06: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
41f0689d58 fix: Fixes FusionSwitch portname in description for sensors (#8188)
* fix FusionSwitch portname

* Add tests
2018-02-02 16:00:35 +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
d63fbd0902 newdevice: Added detection for Vivotek Cameras (#8165)
Fixes: #8159
2018-01-29 20:51:08 +00:00
tukezor
0a6f113f5a device: Improved FortiManager support (#8102)
Modified with suggested changes

Test data for FortiOS
2018-01-24 09:37:27 +00:00
Søren Rosiak
14b2419248 refactor: Move more state sensors to yaml (#8016)
* refactor: Move more state sensors to yaml

* Fix errors..

* Update comware.yaml

* Update ddnos.yaml

* Update dell-ups.yaml

* Update mimosa.yaml

* Update waas.yaml

* added some test data for comware and dell-ups

* added mimosa test data

* re-saved comware test data

* set arp-table sort order.
remove unneeded modules from mimosa

* remove arp-table it doesn't work yet

* remove deleted sensors and mempools (which have no snmp data)
2018-01-21 15:43:19 -06:00
Tony Murray
6a29762690
arp-table test module order (#8119) 2018-01-21 09:50:05 -06:00
Søren Rosiak
dc0c4ac276 feature: Add Checkpoint Gaia Sensor (#8088)
* feature: Add Checkpoint Gaia Sensor
fixes #7956

* added test data for gaia

* re-saved the gaia test data

* saved test data for just os and sensors

* Fix state sensor index order
2018-01-21 08:55:07 -06:00
Tony Murray
f7941797b6
Fix testing state sensor index dumping order. (#8117)
Add netonix state sensor test data
2018-01-21 07:43:10 -06:00
Nick Peelman
9ee96bda76 Add Synology Hardware/Version/Serial detection (#8087)
* Add Synology Hardware/Version/Serial detection

Fixes #7957

* Add DSM test data for hardware/version/serial

* updated to use snmp_get_multi_oid and save more test data

* added json data

* re-saved json data for dsm

* Update dsm.json

* Update dsm_ds916.json

* Update dsm_ds214.json
2018-01-21 01:13:33 -06:00
Misha Komarovskiy
36fe6c83dc fix: Bgp-peers junos empty afi-safi names (#8083)
* fix: Bgp-peers junos empty afi-safi names

* fix discovery of all names
* fix polling rrd names assignment

Signed-off-by: Misha Komarovskiy <zombah@gmail.com>

* Update tests data for junos bgp-peers safi update

Signed-off-by: Misha Komarovskiy <zombah@gmail.com>
2018-01-20 21:21:39 -06:00
Tony Murray
e53b6f2ef2
Fix tests. (#8116) 2018-01-20 21:06:21 -06:00
mattie47
71b44407b9 Improve legacy Allied Telesis hardware support (#8071)
* devices: Improved Legacy Allied Telesis hardware support #8071

This  patch covers:

Improved SNMPrec test coverage for Allied telesis devices

allied.yaml
	- Increased device exception OID list.
		-  This list of devices are running RADLAN OS, and should not be triggered by allied.yaml
	- Minor bug fixes

allied.inc.php
	- Added updated support for Alliedware devices
		-  Version
		-  Features
		-  Hardware
		-  Serial
	- Added support for Allied Telesis Websmart switches
		-  Version
		-  Hardware
	- Added support for Alliedware Plus version 2 OS devices
		-  Hardware
		-  Version
		-  Serial
	- Simplified polling to use snmp_get_multi_oid
	- Minor bug fixes

radlan.yaml
	- Updated device support for 8000S and 8000GS.
		-  Specified device object IDs
			-  Added an exclusion also for OIDs in allied.yaml
		-  Changed icon and group to alliedtelesis

radlan.inc.php
	- Updated support for devices identifying as radlan OS.

awplus.yaml
	- Added comment to remove the sysObjectID_except list.
	- Minor bug fixes

* added json test data to be used for unit test

* re-saved allied websmart test data
2018-01-20 20:30:53 -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
Tony Murray
88b4e31912 refactor: Refactored bgp-peers (#7972)
* bgp-peers update
Use IP parsing library more effectively.
Fix update issue
Include comware bgp-peers test data
deeper refactoring
Allow JunOS fallback to BGP4-MIB, some models only use that.
Add junos bgp4 data
Actually update all bpg data in the poller

* fix arista data. refactor some to prevent missing data from mucking things up

* refactor to use $oid_map for BGP4-MIB too

* A few comments to break up teh file a bit

* Junos bgp data an a quick revert for now.

* small cleanup

* fix ios bgp polling, add test data

* check the correct variable
2018-01-18 20:54:38 +00:00
FTBZ
c80f9726c8 feature: Added new EER and Water Flow Rate sensors (#8104)
* Add new EER sensor

* remove bad RRD option

* add waterflow sensor

* add test data result

* added test json data
2018-01-18 20:50:19 +00:00
Neil Lathwood
1f03110b20
refactor: Moved routeros sensors to yaml + fixed divisors (#7946)
* move routeros fanspeed to yaml

* moved more routeros sensors to yaml

* reverted signal migration to yaml

* added routeros test data

* re-saved test data for routeros
2018-01-17 20:25:09 +00: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
44c1ee5f43
Fix tests... (#8080)
Don't exit when we can't add a device, fail :)
2018-01-12 15:24:12 -06:00
Neil Lathwood
8ec6f138bc Added arbos json data for tests (#8077) 2018-01-12 08:20:28 -06:00
Adam Bishop
77e192208a device: Added support for ArbOS (#8055) 2018-01-12 09:02:24 +00:00
Martin Zatloukal
9a0b06e4de device: Added processor and mempools for EdgeCore switch (#7850)
* Added cpu and mempolls EdgeCore switch

* Added cpu and mempolls EdgeCore switch

* Added cpu and mempolls EdgeCore switch

* Added cpu and mempolls EdgeCore switch

* Added cpu and mempolls EdgeCore switch

* Added cpu and mempolls EdgeCore switch

* Update edgecos.inc.php

* Add files via upload

* Create test.txt

* Add files via upload

* Delete test.txt

* Add files via upload
2018-01-11 22:26:04 +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
Alan Gregory
a7aaf11213 device: Added Hillstone StoneOs detection (#7982)
* Added support for stoneOs

* added Hillstone logo

* added snmp tests

* Updated logo and image

* Removed unnecessary sysdescr match.

* Fix format.

* Removed svg atributes

* Svg files reduced.

* Added test data.

* fixed sysObjectId -> sysObjectID

* Updated test json
2018-01-08 21:48:29 +00: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
ricardcc
fc610195f7 device: Added CheckPoint SecurePlatform support (#8000)
* Added CheckPoint SecurePlatform support

* Changed some issues

* Changed some issues

* Update splat.yaml

* Changed os name to secureplatform intead of splat

* Changed os name to secureplatform

* Changed some issues
2018-01-05 22:06:07 +00:00
Søren Rosiak
495333ea71 newdevice: Improve Cisco ACS Detection (#8013)
fix #8006
2018-01-04 21:25:13 -06:00
Slashdoom
0c12fb6c94 refactoring: freeradius app metrics (#8002)
Add metrics to Free Radius app
2018-01-04 20:33:04 -06:00
FTBZ
dd8849d265 device: Added Rittal IT Chiller / Carel pCOweb card (#7826)
* device: Rittal IT Chiller / Carel pCOweb

* doc: more documentation about the pcoweb card

* Update Carel-pCOweb-Devices.md

* change the limit for sensors and small changes

* fixed db_schema

* doc updates and sql fix

* doc update

* remove the eer graph to create a sensor
2017-12-30 12:08:04 +00:00
Neil Lathwood
7d0ad5c4ef
tests: Added testing for Arista EOS BGP (#7984)
* tests: Added testing fro Arista EOS BGP

* fixing tests

* small updates

* last one

* more updates

* Account for no space after = in snmp data
always load_os() when a new device is freshly loaded by device_by_id_cache()

* don't be fatal in load_os()

* Update json to correct data
2017-12-30 10:31:06 +00:00
Tony Murray
a2bce2690d
bgp-peers: fix incorrect variable name (#7979) 2017-12-29 09:17:23 -06:00
dBsooner
0a21ee75ef device: Added cyberpower RMCARD 202 Support (#7964)
* cyberpower-rmcard-202-support

* Create yberpower_rmcard202.snmprec

* Rename yberpower_rmcard202.snmprec to cyberpower_rmcard202.snmprec
2017-12-29 13:01:30 +00:00
Tony Murray
c91ec3842a Fix bugs in bgp-peers poller (#7976)
* Test Data

* fix bugs in bgp-peers poller
peer data in wrong format
array_diff doesn't work right, change to array_diff_assoc
astext is too short for some
2017-12-29 11:52:49 +00: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
Neil Lathwood
a391e62703 device: Added additional detection for CyberPower devices (#7931) 2017-12-26 23:36:09 -06:00
Neil Lathwood
a3e3c015a6 device: Added further detection for Sophos UTM devices (#7953) 2017-12-26 23:34:39 -06:00
Paul Heinrichs
d9169c6842 device: Cambium cnPilot Support (#7898)
* Cambium cnPilot Support

* Requested changes

* Update MIB dir and snmp_get method

* Fixed assigned var

* Add SysObjectId in tests
2017-12-26 10:03:23 +00:00
Neil Lathwood
3208d879f2 newdevice: Added more sensor support for RouterOS (Mikrotik) + Test data (#7930) 2017-12-21 20:51:29 -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
Neil Lathwood
02f0280f71
device: Added detection for Cisco FTD devices (#7887)
* device: Added detection for Cisco FTD devices

* Update ftd.yaml
2017-12-15 20:05:28 +00:00
Neil Lathwood
9601324142
device: Added temp and humidity sesors + serial for websensor (renamed from cometsystem-p85xx) (#7854) 2017-12-11 20:34:04 +00:00
Martin Zatloukal
2370072a14 Add support EdgeCore ECS4120-28T (#7880)
* Add support EdgeCore ECS4120-28T

* Add support EdgeCore ECS4120-28T
2017-12-08 14:34:29 -06:00
Tony Murray
b620692426 refactor: Update all applications to store metrics (#7853)
* Update all applications to store metrics

* fix db schema

* Add glue test
2017-12-06 22:13:10 +00:00
Paul Heinrichs
0dd3ec25d3 device: Update Cambium devices to the new wireless sensors (#7703)
* Inital cambium refactor

* Refactored tests

* Remove CMM from pmp group

* Add sensors / Give CMM individual OS

* Fix linting

* More Sensors / states and Revised Headers

* Added old graphs / more sensors

* Add modulation rate to sensor

* Fix Hardware detection bug

* Further hardware detection refinments

* Modify pmp hardware detection

* New Wireless Metric - SSR

* SSR Sensor Graph

* Migrate SSR to metric

* Added last metric file

* Add master check to isAp method

* Fix variables in epmp

* CMM Discovery and state addition

* Add another test for cmm
2017-12-06 21:36:01 +00:00
Tony Murray
5405498ed6 alerts: Adde generic alerts for state sensors (#7812)
* feature: Generic alerts for state sensors
A bit of a hack, but gets the job done. Perhaps someone can refactor the ResolveGlues() function sometime to make it better.

* Fix mistakes

* Add docs and collection rules, critical enabled by default

* moved schema file to 221.sql
2017-12-02 23:03:36 +00:00
Adam Bishop
1c6b7a967f Single Sign-On Authentication Mechanism (#7601)
* Allow the URL a user is sent to after logging out to be customised
This is required for any authentication system that has a magic URL for logging out (e.g. /Shibboleth.sso/Logout).

* Allow auth plugins to return a username

This is a bit cleaner than the current auth flow, which special cases e.g. http authentication

* Add some tests, defaults and documentation

* Add single sign-on authentication mechanism

* Make HTTPAuth use the authExternal/getExternalUsername methods

* Add to acknowledgements

* Add reset method to Auth
2017-11-28 20:40:17 -06:00
mattie47
3206447326 device: Improve Allied Telesis support within LibreNMS (#7670)
* Add support for Allied Telesis AlliedWare Plus products

- Uses mibs from 5.4.7-2.1 for AlliedWare Plus products
- Updates Legacy AlliedWare mibs
- Added Allied Telesis svg

* Remove unnecessary "trim" from snmpget

* Add new line to end of file

* Minor fixes for commit
2017-11-28 20:18:39 -06:00
Neil Lathwood
8d98fa5a5e device: Added support for NetPing UniPing devices (#7807)
* device: Added support for NetPing UniPing devices

* Fix svg viewbox and remove useless style cdata
2017-11-28 08:15:22 -06:00
Neil Lathwood
ae062f901b
device: Added additional sensors for Geist Watchdog devices (#7795)
* device: Added additional sensors for Geist Watchdog devices

* added missing divisor

* added os unit test
2017-11-26 21:53:14 +00:00
Tony Murray
2e73b75297 fix: Use memcached to lock daily processes on Distributed Pollers (#7735)
* fix: use memcached to lock daily processes on Distributed Pollers

* All the locks!
2017-11-24 09:37:52 +00:00