Commit Graph

491 Commits

Author SHA1 Message Date
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