Commit Graph

2554 Commits

Author SHA1 Message Date
PipoCanaja
5628b60f2c
Extra VLAN mapping in bridge FDB module to fix HP ProCurve (#11230)
* Extra mapping for dot1qVlanFdbId to allow FDB VLANs to work on ProCurve
* Test data from joseUPV for ProCurve FDB VLANs
2020-03-05 17:52:01 +01:00
PipoCanaja
6d56b9699b
Fix autodiscovery vs discovery on LLDP/xDP links (#11189)
* Fix xdp autodiscovery consistency (discovery vs autodiscovery)

* Update documentation related to xDP autodiscovery
2020-03-05 13:27:20 +01:00
Kevin Zink
7254f13b26
Aruba cluster userfriendly read (#11217)
* Aruba-Instant: Include hostnames as a better identifier for mesh members sensors

* Refresh testdata
2020-02-27 15:35:28 -06:00
Neil Lathwood
e8f252de95
Added support for VLANs and FDB in AOS (#11145)
* Draft of Aos Script

* Changing to independant script

* Adding Aos6 vlan_dict and port_dict

* Adding Aos7 vlans module

* Adding Aos7 vlans module script

* Added Test data
2020-02-27 10:31:11 +00:00
Heath Barnhart
e83583f6f4
Adva FSP150cc Health Sensors (#11168)
* initial commit adding sensors

* changed dbm logic for port exclusions

* update mib, added xg116 support, update disc logic

* sfp health appears on ports page

* added sfp temps

* updated mib file names

* updated mib file names

* removed .mib extension

* replace ADVA-MIB

* Add test data

Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-02-26 12:00:48 -06:00
JosÃe UPV
209a37b57e Adding Aos7 vlans module script 2020-02-14 13:02:02 +01:00
JosÃe UPV
a429bbf2c3 Adding Aos7 vlans module 2020-02-14 13:00:19 +01:00
JosÃe UPV
7a608083b6 Adding Aos6 vlan_dict and port_dict 2020-02-14 10:46:59 +01:00
PipoCanaja
1da33c61a0
Correct RFC1213 route discovery (#11144) 2020-02-13 20:52:09 +01:00
JosÃe UPV
09feaf1fd4 Changing to independant script 2020-02-13 18:53:39 +01:00
JosÃe UPV
d7f6fc205f Draft of Aos Script 2020-02-13 18:04:20 +01:00
PipoCanaja
95820bf5d4
Improve Huawei VRP bgp discovery (#11054)
* vrp bgp rewrite

VRP BGP code isolated and VRF aware

Ipv6 peer and afi typo

* mib-update

* avoid malformed OIDs in discovery

* Restore BGP4 MIB calls for some Campus devices

* CodeClimate
2020-02-11 20:54:12 +01:00
Kevin Zink
06b9ace0fb
device: Correct ups-nut sensors (#11113)
* Change ups-nut sensors
* Revert the dd-wrt files
2020-02-09 20:47:03 +01:00
PipoCanaja
ac84eea243
MPLS Route discovery - Wrong variable assignation order (#11103)
Interfaces are not discovered for MPLS routes because of wrong order in the commands (read before variable being initilized)
2020-02-05 18:26:42 +01:00
Martijn Schmidt
07f3c91e6c
Revert ironware BGP-peers changes from PR #10941 (#11096)
* Revert ironware BGP-peers changes from PR #10941.

* Regenerate test data without BGP4V2-MIB support.

* Initialise $local_ip

Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
2020-02-03 14:32:45 +01:00
Martijn Schmidt
a64bd45dbc
Update IronWare sensors & bgp-peers discovery, allow skip_values to target a specific index appended to the OID (#10941)
* Migrate ironware sensor discovery from php to yaml.

* More sensors, add grouping.

* dynamic_discovery_get_value() becomes getValueFromData()

* Target a specific index with skip_values.

* Improve Brocade BGP session discovery/polling

This commit allows for the correct discovery of BGP sessions
with 32-bit ASNs, IPv6 neighbors using the BGP4V2-MIB which is
based on draft-ietf-idr-bgp4-mibv2-11 and also polls for IPv4
unicast received routes through the FOUNDRY-SN-BGP4-GROUP-MIB.

Copied most of the code from PR#8877 by @Mikeburke14, cleaned
up the code a little bit to match the normal LibreNMS style,
and fixed bgpPeers_cbgp discovery as well as polling for the
ipv4.unicast neighbors.

Note that older Brocade IronWare firmware versions are known
to have multiple defects relating to the BGP4V2-MIB which
might result in certain missing non-established neighbors.

Related vendor defect numbers:

- DEFECT000633962
-- Symptom: The OID bgp4V2PeerAdminStatus does not return the
            correct value
-- Reported: NI 05.7.00
-- Resolved: NI 05.8.00g

- DEFECT000583319
-- Symptom: SNMP polling on bgp4V2PeerTable (OID brcdIp.3.5.1.1.2)
            does not display all the BGP entries
-- Reported: NI 05.6.00
-- Resolved: NI 05.8.00e

- DEFECT000550309
-- Symptom: SNMP polling on bgp4V2PeerTable (OID brcdIp.3.5.1.1.2)
            does not display the full information
-- Reported: NI 05.7.00
-- Resolved: NI 05.8.00c

* Add ironware CER & ICX platform test data.

* Re-add ironware.json compatible with current master branch.
2020-02-01 23:28:03 +01:00
LEV82
9ce7c83caa Add bad_ifoperstatus for filtering interfaces having a status for example 'notPresent' (#10977)
* Add bad_ifoperstatus for filtering interfaces having a status for example notPresent

* Add bad_ifoperstatus for filtering interfaces having a status for example notPresent

* Add bad_ifoperstatus for filtering interfaces having a status for example notPresent
2020-01-24 05:58:01 -06:00
Josh Baird
1c043069b1 Fixed Siklu Voltage Sensor (#10997)
* Fix Siklu Voltage

* Update tests

* Another test fix attempt

* Decimals..

* Ok, enough.

* Restore currently used index value and correctly push num_oid

* Update siklu.json

Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
2020-01-22 09:32:39 +00:00
Joseph Tingiris
3629db9464 fdb-table.inc.php: Fix SQL constrain violation, 'port_id' cannot be null (#11055)
* fix SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'port_id' cannot be null
* If $entry['port_id'] truly is null (on insert) then Illuminate throws a fatal error and all subsequent processing stops.
* Cisco ISO (and others) may have null ids. We still want them inserted as new
* strings work with DB::table->insert().
2020-01-21 10:46:34 +01:00
cjwbath
0c16f21a2e Don't overwrite real port ids with zeros in the FDB (#11041)
Avoid writing "0" as port id when the data came back incomplete from the snmp poll, and when the existing data in the DB already contains a port. Keep the existing port id instead.
2020-01-19 22:30:13 +01:00
nistor
8d28e40c53 Fixed issue with SNMP contexts using vlan 1002-1005 on IOS devices (#11031)
* Fixed issue with SNMP contexts using vlan 1002-1005 on IOS devices

* FIX: Component modified from NULL value
2020-01-15 12:10:02 +01:00
klui2k1
25b5c64bff FDB for ArubaOS (#10940)
* Add FDB support for ArubaOS; modify some SNMP calls to allow community string indexing
* Apply coding styles, changed arubaos.inc.php comment headers
* Coding style
* Modify per items discussed at pull 10940
* ArubaOS test data
* ArubaOS header doc

Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
2020-01-12 17:23:33 +01:00
Josh Baird
664ca1fee3 Added state sensor for Packetflux Sitemonitor Switch Input (#10994)
* Initial stab at switch input state sensor

* Fix indentions

* Fix indentions

* Index updates

* More useless changes.

* And it finally works.

* Open should be a WARNING state.

* Update email

* Add line

* One empty line, not three.

* This is getting ridic.

* Add test data
2020-01-10 15:52:26 +00:00
hartred
5189a0787b Support new os GWD (#10978)
* gwd logo

* gwd definitions

* definitions discovery

* discovery mempools

* polling mempools

* polling os

* gwd mibs

* gwd tests data

* gwd tests snmpsim

* CR at end of file

* Update gwd.inc.php

* Update gwd.inc.php

* Update gwd.inc.php

* Update gwd.inc.php

* Update gwd.inc.php

* Update gwd.snmprec

* Update gwd.json
2019-12-28 12:40:54 +01:00
hartred
2953358992 Support new os C-DATA (#10975)
* cdata-logo

* cdata definitions

* cdata definitions discovery

* cdata discovery mempools

* cdata polling mempools

* cdata polling os

* cdata mibs

* cdata tests json

* cdata tests snmpsim

* cdata polling os

* cdata mempools fix

* cdata mempools fix2

* delete IANAifType-MIB

* Delete IF-MIB

* Delete SNMPv2-MIB

* Delete SNMPv2-SMI

* Delete BRIDGE-MIB
2019-12-25 17:22:25 +01:00
hartred
cde3e1d8a0 Added support for os SNR (#10704)
* Support new os SNR
mib file

* snr logo
* snr includes_definitions
* includes_definitions_discovery
* snr includes_discovery_mempools
* includes_polling_mempools
* includes_polling_os
* update snr.yaml
* snr.snmprec
* Create snr.json
* Update snr.snmprec
* Update snr.json
* Update snr.yaml
2019-12-18 22:59:42 +01:00
PipoCanaja
c9ae2891dd
Rewrite Microsemi Midspan Power Sensors with mib (#10959)
* rewrite with mib
* tests
2019-12-18 09:59:34 +01:00
PipoCanaja
acfc2e7c81
Added Huawei UPS2000 support (#10831)
* UPS2000
* tests
* over
* filter on sysDescr
2019-12-17 09:08:12 +01:00
Tony Murray
f544c32567 Improved ports-fdb discovery sql queries (#10883)
* Improve ports-fdb discovery sql queries
* fix indentation
2019-12-02 22:45:18 +01:00
PipoCanaja
fd932b4066 Missing 'use LibreNMS\Config' in route discovery (#10844)
* missing 'use LibreNMS\Config'

* Update route.inc.php

force test re-run
2019-11-19 20:38:21 +00:00
Martin Zatloukal
dd26e702be Added support EdgeCore ECS2100-10T (#10843)
* Added support EdgeCore ECS2100-10T
2019-11-19 15:40:53 +01:00
PipoCanaja
bf181b9dc2
Added support for routing table collection in discovery (#10182)
* Clean broken VRF lite code
* Change DB table for route discovery
* Add VRF simple support
* add port_id to db and discovery
* static-fy the translation arrays
* sort and search cleaning
* Sorting refactor and validation
* formatItem shortened
* Handle ifIndex==0 meaning no next hop defined (MPLS)
* Sync all create/updates
* purge in daily
* remove old route table
* get rid of inetCidrRouteNextHop_device_id
* fix wonky column orders
* add route snmprec
* fix sorting by interface
* Move to new config
* rename to route the new table
* Properly display ipv6 compressed addresses
* Translation before merge ./lnms translation:generate
* Update manifest
2019-11-17 16:30:43 +01:00
Vitali Kari
7c1e6cb8cf Add support for ZyXEL IES-5005 and IES-5106 DSLAMs (#10804)
* Add support for ZyXEL IES-5005 and IES-5106 DSLAMs

* remove cpu high_limit

* fix broken mib VDSL2-LINE-TC-MIB
rework os polling
2019-11-16 18:17:25 +01:00
Tony Murray
dec9a498ee Updated device cache support (#10795)
* Device Cache
also some additional device related models

* attribs from cache

* replace common attribute functions

* remove legacy cache usage
tidy up some collection manipulation
remove some unused or single use functions

* cleanup some items

* always return a device, to prevent bugs

* clear device cache when testing after each test

* fix double assignment

* Clean up function to take advantage of null object
2019-11-14 21:56:06 +00:00
Erik
a5f53eee2a Brocade switches - Added names on fiberchannel ports (#10737)
* Added brocade ports

* Create brocade.inc.php

* Update functions.php

* Update functions.php

* Update brocade.inc.php

* Try to remove complexity

* Removed white space

Removed white space

* Added testdata

* removed temp variable

* Update functions.php

* Create brocade.inc.php

* Added fill ifAlias for fibrechannel ports

* Update functions.php

* Update brocade.inc.php

* Update fabos.json
2019-11-13 14:29:30 +00:00
dlesel
c95661b482 Added AIX file system, prefer over hrstorage for AIX (#10588)
* Added AIX file system, ignore hrstorage for AIX

* Add AIX Test Data

* Add AIX Test Data 2

* remove includes/polling/os/aix.inc.php

* Update AIX Test Data

* Corect spaces in code

* Update code to correctly disable hrStorage for AIX

* Update aix.json

* Update aix.svg

* Delete aix.svg

* Update aix.svg

* Delete aix.svg
2019-11-13 06:01:45 +00:00
Vitali Kari
a31aef6313 Add support for ZyXEL IES4206/5206/5212/6217 MSANs (#10789)
* - update yzyxel mibs
- update definitions für ies series
- slot state and alarm support via yaml

* more sensors

*  add new device Zyxel IES4206

* restore original ies files

* revert function stuff

* update to latest official mib

* rebase
2019-11-12 10:22:08 +01:00
PipoCanaja
d9c7772804 Avoid state collisions between 'dell' and 'drac' OSes (#10539)
* avoid state collisions between dell and drac OSes
2019-11-03 12:59:08 +01:00
dGs-
28e34c64f9 If dot1qVlanCurrentTable doesn't exist try dot1qVlanStaticTable (#10262)
* If dot1qVlanCurrentTable doesn't exist try dot1qVlanStaticTable

* Create comware_hpe5700.snmprec

* Create comware_hpe5700.json

* Update comware_hpe5700.json

* Updated comware hpe5700 json test file

* Update comware_hpe5700.json

* add HPE A5500 (Comware) capture

* Delete comware_hpe5700.json

* Delete comware_hpe5700.snmprec

* Create comware_a5500.json

* snmprec with dot1qVlanStaticTable and json without mempool and sensors

* change an interface description
2019-10-21 13:41:47 +00:00
Erik
610fde83ec Removed double Stack Temperature Discovery and Fixed typos in dbm discovery for Dell Switches (#10630)
* Fixed typos in dbm discovery for Dell Switches

Fixed typos in dbm discovery for Dell Switches

* Skip value 0 in temperature sensors

* Update dnos.yaml

* Remove temp M-serie from php, already in yaml

* Create dnos_s4048.snmpsim

* Rename dnos_s4048.snmpsim to dnos_s4048.snmprec

* Create dnos_s4048.json

* Create dell-net.inc.php

Added mempool for Dell Net switches

* Update dnos.yaml

Removed whitespaces in dnos.yaml

* Update dnos_s4048.json

* Delete dnos.json

* Create dnos.json
2019-10-21 01:41:32 +00:00
joseUPV
e0cff12f69 Better Support of Alcatel Switches (#10672)
* Added model, processor, fan and power supply for Alcatel Omnistack Switches

* Removed Index from description of Fan and power supply

* Merged PR #10655

* Added Temperature Sensor for AOS7+ Alcatel Enterprise Switches

* Added AOS7 mempools

* Added Tests

* Update aos.yaml

* Update alerts levels in state sensors

* Add test data
2019-10-20 22:26:21 +00:00
Tobias Heister
728bc5f790 Improved RARITAN PDU/PDU2 MIB (current, power) and external env. sensors (#10616)
* added support for PDU/PDU2 MIB data (current, power) and added external sensor fpr humidity and temperature on PDU MIB

* added test data of 1 PDU-MIB device and 1 PDU2-MIB device

* Create raritan-pdu.json

* forgot to do save-data on last commit
2019-10-20 21:26:40 +00:00
Vitali Kari
e40a336315 add mempool_perc_warn level (#10722)
* add mempool_perc_warn level

* add test data
2019-10-19 20:38:23 +00:00
pobradovic08
a2c69cd62f Added Cisco QFP module (#10637)
* QFP Discovery module
* QFP Polling module - Utilization
* Add Cisco QFP module in module list
* Web UI QFP discovery module
* Add average packet size graph
* Health overview QFP graph
* Polling and UI improvements, test data
* Reformatting and style checks
* Readd snmprec data
* Fix module performance stats collecting
2019-10-05 11:10:34 +02:00
Tony Murray
51e5521d9f Do not update mempool warning % every discovery (#10647) 2019-10-03 00:35:44 +02:00
Vitali Kari
2825a7f7ec add discovery of mempool percent warning limit (#10618)
* add ability to discover percent warning on mempools discovery

* remove wierd charachters from json

* remove database defaults, add defaults for Linux and Vmware

* update db schema

* update test data

* adapt hrstorage mempools

* rebase
2019-09-30 13:22:55 +00:00
soto2080
2139eed306 Add EdgeCore ECS4110-28T Support (#10525)
* Add ECS4110 cpu usage

* Add cpu usage oid for ECS4110
* TESTED

* Fix EdgeCore ifOperStatus does not follow the Cisco convention
* Since EdgeCore use "lowerLayerDown" in ifOperStatus when port is unplugged
* On the other way, Cisco use briefly "down".
* So change "lowerLayerDown" to "down" to workaround the bug that will make port always show as up/up

* Refactor Edgecos cpu usage oid
* Codeclimate is unhappy about it maybe the refactor will make it happy.

* Add EgdeCore ECS4110 MIB

Just got MIB from EdgeCore

* Refactor Egdecos Mempool

* a bit refactor of Mempool discover and polling
* add support for ECS4110 via MIB

* Modify ECS-4110 MIB

* MODULE-IDENTITY change from ECS4110-52P-MIB to ECS4110-MIB
* strip off syntax error part(time range)

* Add EdgeCore ECS-4110 OS polling

* polling OS and Hardware via MIBs

* Fix typo

* Sorry that I am dazzled

* Fix Syntax Check

* Codeclimate is a bit aggressive

* Update edgecos.inc.php

* Update edgecos.inc.php

* Revert "Fix EdgeCore ifOperStatus does not follow the Cisco convention"

This reverts commit 27971b34a8.

* Add snmprec file for unit testing.

* Create edgecos_ecs4110-28t.json
2019-09-28 03:18:24 +00:00
Vitali Kari
4990c871d6 do not discover dbm sensors on shutdown ports (#10610) 2019-09-18 12:39:52 +00:00
Vitali Kari
87d3fc7285 sensors sometime not clean up (#10611)
* do not discover dbm sensors on shutdown ports

* rename confusing name from $sensor_type to $sensor_class

* Revert "do not discover dbm sensors on shutdown ports"

This reverts commit 46963f746a.
2019-09-18 12:29:58 +00:00
Søren Rosiak
9768790440 CiscoSB: Skip notPresent ports from state sensors (#10545)
* CiscoSB: Skip notPresent ports from state sensors

* Update ciscosb.inc.php

* Create ciscosb_sg350x-48.json
2019-09-14 23:43:08 +02:00
nistor
3b5295ad45 Fixed junos vlan discovery when no vlan present (#10599)
* Fixed foreach loop throwing errors when no vlans present, community id post 9528
* Added extra else / debug statement for validation
The modified changes allow for clear information regarding the discovery of devices where no port<->L2 Access/Trunk association is seen.
2019-09-14 23:33:28 +02:00
Serazio
142a1abbfd Fixed Junos port/vlan relationships for els and non-els based software (#10321)
* Fixed Junos port/vlan relationships for els and non-els based software

* fixed tabs

* Add test data

* Updated test data

* Update module_tables.yaml

* Update junos_qfx5100.json

* Update junos_qfx5100.json

* Update junos_qfx5100.json
2019-08-28 07:14:26 -05:00
Martijn Schmidt
3a891ba727 Convert opengear to YAML-based discovery, add some new sensors, add test data (#10553)
* Update opengear MIBs to latest version.

* Replace PHP signal discovery with YAML.

* Update Opengear YAML with new sensors.

* Add test data for Opengear.

* Add the test data json for Opengear.

* Named to numbered index to avoid data loss.
2019-08-27 16:54:08 -05:00
garysteers
c089f3bae4 Populate ipv6_network_id in ipv6_addresses where empty (#10548)
* Populate ipv6_network_id in ipv6_addresses where empty

* Update functions.inc.php
2019-08-22 20:58:35 +01:00
Martin Zatloukal
f16805b71d Added support Ericsson MINI-LINK (#10546)
* Added support Ericsson MINI-LINK
* cleaning
2019-08-22 13:19:50 +02:00
garysteers
a1c8fe63ee Fixed ipv6_network_id query for null context_name (#10544)
* Fix ipv6_network_id query for `null` context_name
2019-08-21 20:07:15 +02:00
PipoCanaja
e7a86add93
Allow num_oid to use OCTET STRING indexes (#10410)
* make index available as OCTET STRING converted to OID
* codeclimate
2019-08-21 10:04:16 +02:00
soto2080
610afac9e7 Enabled FDB table support on Nexus devices (#10522)
* NXOS can build FDB table with the same commands used in IOS/IOSXE
2019-08-18 21:55:48 +02:00
PipoCanaja
67376e2e95
Reduce discovery snmp load of Cisco VTP vlans module (#10510)
* Only poll necessary OIDs for Cisco VTP vlan discovery, the current code overload some nexus devices
* codeclimate
2019-08-14 08:34:35 +02:00
PipoCanaja
9dfae2ff14 Allow filtering of Health sensor discovery (#10485)
* Filter sensor types or by regexp

* codeclimate

* codeclimate
2019-08-07 20:01:58 -05:00
ig0rb
3342210067 FS.net pdu (#10424)
* Added support for snmp monitored PDU from fs.com

* Added support for snmp monitored PDU from fs.com

* Fix sysObjectID 1.3.6.1.4.1.30966

* Create fs-net-pdu.json
2019-07-23 22:55:53 -05:00
CirnoT
cafcf417fa Fix NetAgent II battery voltage (#10427)
* Fix NetAgent II battery voltage

* Add new test data and new icon for NetAgent
2019-07-22 23:34:31 -05:00
bergroth
b085703b2d Added support for DGD and BER on newer infinera-groove FW (#10435)
* Added support for DGD and BER that are avalible on newer infinera-groove FW
* updated tests for new groove sensors
* Update infinera-groove.inc.php
* Update infinera-groove.inc.php
* Force test to run again
2019-07-15 12:47:41 +02:00
PipoCanaja
837765fabe Added VRP SFPs thresholds and map entPhysical to ifIndexes (#10363)
* gather SFPs thresholds and map entPhysical to ifIndexes

* Update entity-physical.inc.php

Comment and force TravisTests

* codeclimate

* Simplify ifIndex collection

* Always update ifIndex

* Missing pre-cache value for skip_value
2019-07-14 18:37:01 -05:00
CirnoT
d4c109232a Ensure that sysName is trimmed on discovery (#10434) 2019-07-10 17:54:24 +02:00
ospfbgp
fc2f0a4552 Updated RAPID-CITY mib for Extreme VSP (#10406)
* Add files via upload

* Update voss.inc.php

* Update voss.inc.php

* Update voss.yaml

* Update voss.inc.php

* Update voss.inc.php

* Update voss.inc.php

* Update voss_7432cq.json

* Update voss_7432cq.json

* Add files via upload

* Add files via upload

* Update voss_8404.json

* Update voss_8608.json

* Update voss_8608.json

* Update voss_8608.json

* Update voss_8608.json

* Update voss_9012.json
2019-07-09 23:54:21 +02:00
rsys-dev
cfaf913896 Added detection for ZTE zxdsl devices (#10344)
* add yaml files

* Added include/definition/zxdsl.yaml (ZTE ZXDSL Support)
Added include/polling/os/zxdsl.inc.php (Set Hardware)

* Changed includes/definitions/zxdsl.yaml type from "dslam" to "network"
Changed includes/polling/os/zxdsl.inc.php removed unnecessary code
Added Testfiles

* Fixed coding guideline errors (missing spaces)

* Removed unnecessary "use"

* Improved model number discovery
Removed unavailable top graphs
Added System temperature

* Changed Temperature limits according to ZTE datasheet

* Updated Tests
2019-07-05 13:06:27 +02:00
Tony Murray
f3ba8947f7
Use Config helper (#10339)
remove usage of global variable
2019-06-23 00:29:12 -05:00
Tony Murray
8b0a1d902a
Revert "WIP - Added VRP SFPs thresholds and map entPhysical to ifIndexes (#10355)" (#10362)
This reverts commit a3bb92074e.
2019-06-21 21:42:21 -05:00
PipoCanaja
a3bb92074e WIP - Added VRP SFPs thresholds and map entPhysical to ifIndexes (#10355)
* gather SFPs thresholds and map entPhysical to ifIndexes

* Update entity-physical.inc.php

Comment and force TravisTests

* codeclimate
2019-06-21 21:41:57 -05:00
Martijn Schmidt
048fd0f6ed Remove guessed limits for some health sensors, documentation for sensor classes (#10327)
* Default to null for group yaml discovery.

* Update test data for a154bda yaml group null fix.

* Changes to guessed limit functions for sensors.

Original behaviour
===================

The file `includes/discovery/functions.inc.php` contains
`sensor_limit_low()` and `sensor_limit()` which both attempt to
guess a sane value for sensors when no explicitly defined
low_limit or high_limit can be found during discovery.

Both switch control structures used in those two functions
have empty case statements which means that if one of those matches,
it's going to fall through and run the code for each subsequent
case until a `break` is reached.

For example, when we call `function sensor_low_limit(dbm, -13.036)`
it will return the value `-12.3842` instead of `null`. That is
because there will be a match at `case 'dbm':` which falls through
all the way to `case 'cooling':`, where it performs
`$limit = -13.036 * 0.95` before hitting a `break`.

Changed behaviour
===================

Removed `power_consumed` and `count` guessed low_limit and
high_limit, I personally added those sensor classes in PR #9471
when I didn't understand that a switch control structure has
fall-through behaviour so I can guarantee that guessing limits for
those is a mistake on my behalf. It should not be there, only
power_factor can have guessed limits. Apologies for the issue,
I'm still a beginning programmer!

Furthermore, I removed guessed high_limit values for `current`
and `power` because these are supposed to draw higher values as
more devices or components are installed on for example a PDU or
a chassis.

Finally, I removed guessed low_limit and high_limit for `dbm`
sensors, there is a much too large variance in power budget on
commercially available optical transceivers for there to be a
sensible window where you can guess these values.

* Documentation on adding sensor classes.

* Update test data - sensor limit changes @ 30212d2
2019-06-21 09:03:27 -05:00
TVCABO MZ
1f19eb2146 Fix mysql bug in cisco-sla module (#10357)
* Update cisco-sla.inc.php

Fix SQL error during discovery of cisco-sla.
This error points to /opt/librenms/includes/discovery/cisco-sla.inc.php(80).

LOG ERROR:
[2019-06-18 07:07:01] production.ERROR: SQLSTATE[HY093]: Invalid parameter number: mixed named and positional parameters (SQL: UPDATE slas set device_id=39,sla_nr=1,owner=,tag=xxx.xxx.xxx.xxx,rtt_type=echo,status=1,opstatus=0,deleted=0 WHERE sla_id = 5) (SQL: UPDATE slas set device_id=39,sla_nr=1,owner=,tag=xxx.xxx.xxx.xxx,rtt_type=echo,status=1,opstatus=0,deleted=0 WHERE sla_id = 5)#0 /opt/librenms/includes/discover
y/cisco-sla.inc.php(80): dbUpdate(Array, ‘slas’, ’sla_id = :sla…’, Array)
#1 /opt/librenms/includes/discovery/functions.inc.php(179): include(’/opt/librenms/i…’)
#2 /opt/librenms/discovery.php(120): discover_device(Array, false)
#3 {main}

I suggest to change this lines of code in cisco-sla.inc.php to avoid this error:

line 80: dbUpdate($data, ‘slas’, ’sla_id = :sla_id’, array(‘sla_id’ => $sla_id));
change to: dbUpdate($data, ‘slas’, ’sla_id = ?’, array($sla_id));

line 87: dbUpdate(array(‘deleted’ => 1), ‘slas’, ’sla_id = :sla_id’, array(‘sla_id’ => $existing_sla));
change to: dbUpdate(array(‘deleted’ => 1), ‘slas’, ’sla_id = ?’, array($existing_sla));

* Fix quotes

* Missed one
2019-06-21 07:16:19 -05:00
Kevin Krumm
da9e67b296 Aruba IAP: Fix Radio State Sensor (#10335)
* Aruba IAP: Fix Radio State Sensor 

Fix state sensor for radio status from warning when disabled to unknown state.

* Update aruba-instant.json

* Update aruba-instant_105.json
2019-06-15 10:10:37 -05:00
StackOverBuffer
fec165fb86 Add power sensor for eaton ups (#10306)
* Add power sensor for eaton ups

* removed whitespace at end of line

* add test data
2019-06-11 23:46:43 -05:00
Vitali Kari
00b148dbd3 Add MPLS Support (#10263)
* WIP - Add MPLS Support
This introduce the generic MPLS support
- New database tables for MPLS LSPs
- actually discovery and polling on NOKIA SR OS (Timetra) devices
- new routing->MPLS HTML pages

- ToDo MPLS LSP paths table and views
Suggestions and improvements are welcome

* add db schema

* some fixes

* add path table, discovery and polling

* add path views

* add test data

* Convert MPLS module to new style
Implement a SyncsModels trait to simplify code a lot

* abs() for negative value from snmp (bug?), test data

* fix db schema

* Fix up test data, remove uneeded data in json

* fix whitespace
2019-06-06 16:12:13 -05:00
Marlinc
93f3528bbf Add Ipoman power consumption support (#10244)
* Add Ipoman power consumption support

* Create ipoman.json
2019-05-31 07:43:54 -05:00
Martijn Schmidt
9455a83478 Convert OS mrv-od to yaml, discover more sensors, discover entity-physical (#10266)
* Dynamic entPhysicalIndex values for YamlDiscovery

* Use degree symbol when displaying temperature values

* Adjust SNMP options for new snmp_get_multi()

The OS polling module for mrv-od was using snmpget commands with
-Ovqs, rather than -OQUs, which meant that the equal sign was
stripped in the snmpget output. But that equal sign is now used
as the explode() delimiter so it broke the construction of the
returned array for the snmp_get_multi() function.

Additionally, I removed the NBS-CMMC-MIB:: prefix which is no
longer returned by snmp_get_multi() as part of the OID. Now,
the mrv-od.inc.php OS polling module is retrieving data from
positions in the array with actual content.

* Convert mrv-od to yaml, improve sensors discovery

Converted sensors discovery for mrv-od to yaml, retaining all
functionality for pre-cache, dbm, and temperature. Replaced specific
SFF-8472 Digital Diagnostics state sensors with generic ones, given that
we are now reading out detailed values through new dbm, current, voltage
sensors.

Reasoning: the generic Digital Diagnostics state sensors report state
diagsOk, or else the worst severity level measured among all of the
Digital Diagnostics values for that optical data point. You'd really
only want to set a generic "alarm" so the box can report that it
thinks something is wrong, whereafter a human can look at the graphs
and/or the CLI to draw their conclusions about the alarm. Otherwise,
things would quickly become too spammy as you are essentially duplicating
every sensor across both regular measurements and state measurements.

Further changes:
- Increase maximum number of detected PSUs from 4 to 8 per the MIB.
- State sensor to detect (in)sufficient power budget for all modules.
- Use skip_values to hide state sensors with the notSupported value.
- Use skip_values to hide sensors which are unsupported per the MIB,
  signified by the device returning special values -1 or -2147483648.
- Add dBm, temperature "over" graphs to the mrv-od device header bar.

* Add mrv-od entity-physical support

MRV does not use the ENTITY-MIB data format, so we had to reconstruct
the inventory from their proprietary format using the following tables
from their NBS-CMMC-MIB:

- nbsCmmcChassisTable
- nbsCmmcSlotTable
- nbsCmmcPortTable

Additionally, since sensors didn't have their own ifindex in the
NBS-CMMC-MIB, I went ahead and appended the last OID digit to
the "containing" ifindex create a unique number. The same was
done for the sensors in the yaml-discovery.

* Test data for mrv-od, fix 2* pre-commit.php issues

* Fix entPhysicalIndex returning 0 instead of null

Some unit test breakage was caused by 62167ebcb which changed
the code to return 0 instead of null when {{ $index }} was
set as the entPhysicalIndex in the YamlDiscovery. So now we
detect if it returns some value which may be interpreted as
false, and if so we set null rather than 0.
2019-05-29 13:30:33 -05:00
Michael Ducharme
902c056f62 Fix for RouterOS LLDP discovery (#10265)
* Fix for RouterOS LLDP discovery

Only the first nine neighbors were correct on RouterOS - missing hexdec() led to the remaining neighbors being linked to the wrong ports. Ex. port 10 in hex was incorrectly linked to port 10 decimal when it should be 16 in decimal

* Added test data for MikroTik RouterOS CRS317 switch
2019-05-28 08:32:51 +02:00
Daniele Viganò
e9b3e258e8 Fix power consumption detection on Dell servers (#10250) 2019-05-23 09:54:19 -05:00
Spencer Butler
83522c6fef Added support for East iStars UPS (os: istars) (#10041)
* istars - Added support for East iStars UPS (os: istars)

* typo

* remove duplicate image

* refactored to use rfc1628

* added json

* update is_array to isset for bad rfc1628 implementation

* Update istars.inc.php

* revert rfc1628 changes

* update test data + PR 10240 patch

* update OIDs
2019-05-21 11:03:28 -05:00
Jozef Pivarník
2dc05ee501 Fixed Cisco MAC accounting discovery, polling and HTML templates. (#10158)
* Fix Cisco MAC acounting discovery, polling and HTML templates.

* Remove empty code.

* Provide test data for cisco-mac-accounting module.

* Added module test dependency.
2019-05-20 20:56:19 -05:00
Timothy Willey
0d656590ec NEW OS Aruba Instant (#9954)
* New OS: Aruba Instant

* New OS: Aruba Instant

* recreate test data

* remove aruba_instant test data

* remove empty file includes/definitions/discovery/aruba-instant.yaml

* fix state sensor discovery

* remove minor changes to includes/polling/functions.inc.phpwq

* move mac helper functions to Rewrite class

* simplify snmpwalk_group usage, general code cleanup

* fixes

* fixes

* fixes

* fixes

* fixes

* fixes

* recreate test data for 105 variant

* Add Client sensors for 8.4.0.0+

* begin stream-lining discovery and polling. separating discovery functions

* update test data

* update test data

* update test data

* improve mempool discovery/polling, clean up os polling, improve state discovery, improve os definition, misc fixes to wireless sensors module

* attempt to implement custom AP and client discovery and polling

* code fixes

* re-add ap count top graph

* more fixes

* more fixes

* more fixes

* more fixes

* remove some debugging, update test data

* code cleanup

* code cleanup

* address some scrutinizer warnings
2019-05-13 10:06:12 -05:00
Marvin Kuurstra
966ce85c19 Fortigate sessions sensors (#10183)
* Adding sensor for sessions

* Adding test data

* Fix index mistake and update test data (#12)

* Update test data for existing fortigate
2019-05-09 23:58:03 -05:00
CirnoT
b4f03808db Ignore empty IPv4 addresses in discovery on buggy devices (#10198)
* Ignore empty IPv4 addresses in discovery on buggy devices

* Styling fixes for codeclimate

* Use try/catch block instead
2019-05-09 06:39:57 -05:00
Tony Murray
3e7970b814 Fixed Avtech discovery (#10163)
* Fix Avtech discovery
pre-cache stored the data incorrectly

* Fix RA-4E external sensors
sen1 had incorrect oids (duplicate of sen2)
Description oid from data doesn't match the mib, perhaps outdated MIB?

* add test data

* Updated 4E MIB
2019-05-02 21:37:00 +01:00
CirnoT
308145d2da Fixed Raspberry Pi sensors discovery (#10176)
* Fixed Raspberry Pi frequency, voltage and state sensors discovery
* Added tests
2019-05-02 08:10:20 +02:00
PipoCanaja
30537361db LLDP Discovery by IP (#10130)
* add ip polling on LLDP devices

* ipv6 support

* formatting

* codeclimate
2019-04-29 21:56:03 -05:00
Vitali Kari
df2e80544c Extended sensors for Timos devices (#10160)
* additional sensors for timos
change to yaml discovery for sensors
remove obsolete tmnxChassisPowerSupplyTable

* inconsistent data in snmpsim

* fix snmpsim data

* fix snmpsim data

* fix snmpsim data
2019-04-29 20:48:37 +02:00
CirnoT
33a51bc592 Store IPv4 networks as network address and fix address search page showing networks not addresses (#10144)
* Store IPv4 networks as network address, not device address

* Properly display addresses, not networks on address search page
2019-04-29 11:52:32 -05:00
PipoCanaja
a3263b802b Added packetlight support (#10131)
* MIBS

* logos
sensors
user_func
cleaning

* tests

* Switch to Packetlight class, and use is_callable instead of function_exists

* tests

* CodeClimate

* Rename functions
2019-04-29 09:46:53 -05:00
CirnoT
272fabd8fc Added memory pool for Netgear switches (#10146) 2019-04-27 23:11:04 +02:00
PipoCanaja
a08b8333cc Bug - Nasty user_func vs divisor-multiplier issue (#10122)
* Nasty user_func vs divisor-multiplier issue

* tests
2019-04-17 20:15:31 -05:00
Spencer Butler
c76115bf46 Added support dellNet devices (#10016)
* Added support DELL-NETWORKING-PRODUCTS-MIB (os: dell-net)

* dell-net - created mempool, removed flash (not enough data points)

* dell-net - updated yaml sysObjectIDs

* dell-net - added sensors, fixed sensors

* clean up

* dell-net added Tx/Rx indicators

* dell-net - regroup Lanes

* dell-net remove Lane quotes, removed random files

* dell-net - updated Model description per requester

* added rules to ignore 0 values

* restricted discovery match

* merge dellNet into os: dnos

* typo

* remove dell-net test files
2019-04-12 00:49:35 -05:00
PipoCanaja
780ee36b10 Updated support for adva_fsp150 devices (#10049)
DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [X] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
After you are done testing, you can remove the changes with `./scripts/github-remove`.  If there are schema changes, you can ask on discord how to revert.
2019-04-09 13:59:08 +01:00
PipoCanaja
e285a9268e Improve Huawei BGP polling + BGP webui & graphs patches (#10010)
* basic adress family for VRP

* Improve BGP prefixes display

* Improve BGP prefixes display

* Improve BGP prefixes display

* climate
2019-04-09 13:44:48 +01:00
Spencer Butler
47e0ee1d04 Added support for Liebert PDUs (#10062)
* Added support for Liebert PDUs
2019-04-07 21:19:08 +02:00
Tony Murray
a3ef7c3d4a
fix style issues (#10057) 2019-04-01 20:03:54 -05:00
priiduonu
5fc2f18af1 Added support for IONODES video encoders (#10031)
* Added support for IONODES video encoders

* fixed expected number instead of string value error when running tests

* removed extra colon

* added mibs_dir for ionodes

* removed IF-MIB from ionodes.yaml
2019-04-01 09:25:32 +02:00
Chi Hang Long
2eb5e30aa7 Modify to fix neighbours on EXOS switch problem (#10013)
https://community.librenms.org/t/modify-discovery-protocols-inc-php-to-fix-neighbours-problem-on-extreme-networks-exos-switch/7797

The bug is caused by SNMP polling switch-1 with ifIndex to DB (associate
ifIndex when adding switch), the port “1” is “1001”. Another switch-2
discover the switch-1 port “1” by LLDP is “1” (after LiberNMS get this
information). Two values are not equal (“1001” != “1”). If I change to
use ifName associate when adding device, because ifName is “1:1”, so it
can not equal to LLDP too (“1:1” != “1”).
2019-04-01 09:24:58 +02:00
Spencer Butler
7bfe0bc831 Added support for HikVision-DS Cameras (#9980)
* Added support for HikVision-DS Cameras

clean up

removed pointless file, cleaned up code

fixed failing unit tests, a bit of cleanup

WIP - will rebase

split hikvision into hikvision-nvr an hikvision-cam

* removed unneeded comment and rec file
2019-03-27 15:38:35 -05:00
TheGreatDoc
5535768d25 New Device: ATS - Automatic Transfer Switch (#9889)
* New Device: ATS - Automatic Transfer Switch

* Small fixes

* Fixed test data

* More fixes, again

* Moved temp to php to retrieve limits from device

* Fixed perms again...

* Final test file. Or I hope so...
2019-03-24 18:48:55 -05:00
KodApa85
8ec2476036 Added support for APC AP9810 zone contacts (#9967)
* device: Added support for APC AP9810 zone contacts

* fix: disconnected sensors been detected. And iemConfigProbesTable certainly does get used and it reference

* fix: load is VA, not to be confused with watts. This could be different per device though...
Apparent Power unit = VA
Real Power unit = Watts

And Keeping codeclimate happy

* feature: updated APC MIB

* feature: added test data for APC Smart UPS SMX750i and AP9810 with contact switches
2019-03-22 00:10:20 +01:00
Yann Gauteron
bafc195ae3 Fix cisco temperature limit (#9985)
* The SNMP value ciscoEnvMonTemperatureThreshold is now stored as high limit (and no more as high warning limit)

* Updating misc/notifications.rss to make the user aware of the behavioral change

* Addition of missing </description> in the misc/notifications.rss
2019-03-19 08:12:54 -05:00
PipoCanaja
70437ae42b Dantel Webmon Improvement (#9977)
* Generic polling for webmon

* Tests update

* clean

* tests and count sensor

* typo + tests

* update user friendly OS

* style
2019-03-17 21:42:47 -05:00
TheGreatDoc
0cc5de695d Custom storage warning percentage (#9975)
* Custom storage warning percentage

* Fixed permissions

* Restored line removed by accident

* Fixed permissions v2

* Set correctly the config var

* style
2019-03-16 23:53:05 +01:00
Yann Gauteron
d15fda3693 Optional automatic sensor limits (#9973)
* Automatic sensor limits are now optional. Set ['discovery']['sensors']['autolimit'] = false to disable.
* Changing new config variable name from discovery.sensors.autolimit to sensors.guess_limits
* Updated documentation: ['sensors']['guess_limits'] value added
2019-03-16 11:51:09 +01:00
PipoCanaja
5d512a83ed Cisco OTV cast issue building empty adj (#9968) 2019-03-15 07:28:01 -05:00
PipoCanaja
59f00dcc6b
Improved VRP stack state discovery with one member only to avoid unnecessary alarms (#9925)
* VRP stack state improvement

* tests

* cleaning
2019-03-13 09:03:18 +01:00
ospfbgp
eb82a153d9 Add support for power supply on Extreme BOSS switches (#9898)
* Update boss.inc.php

* Update boss.inc.php

* Update boss.inc.php

* Update boss.inc.php

* Update boss.inc.php

* Update boss.inc.php

* Update boss.inc.php

* Update boss.inc.php

* Update boss.inc.php

* Update boss.inc.php

* Update boss.inc.php

* Update boss.inc.php

* Update boss.inc.php

* Update boss.inc.php

* Update boss.inc.php

* Add files via upload

* Add files via upload

* Add files via upload

* Add files via upload
2019-03-09 14:24:37 -06:00
Tony Murray
7bbf30bbe9
Fix printer discovery level (#9917)
* Fix printer discovery level
When the printer knows there is "some" paper left.

* update test data
2019-03-07 19:51:39 -06:00
tarik
e3e3de1442 Printer paper tray status and error states (#9859)
* adding paper tray status and error states

* adding paper tray test data

* Create jetdirect_papertray.json

* Store printer supply type

* Update json data

* fix style
2019-03-06 18:58:14 -06:00
PipoCanaja
9deb00f20c Added Patton SmartNode OS discovery and polling (#9901)
* Patton SmartNode OS discovery and polling

* mempools

* graphs overs

* []
2019-03-05 21:35:58 -06:00
network-guy
65fba42306 Dantel WebMon Device Support (#9767)
* Dantel WebMon Support

Webmon tep discovery changes

Fix Code Climate Issues

* WebMon - Move MIB to folder and create json reference

* Minor changes to Webmon polling
2019-03-05 00:46:00 -06:00
priiduonu
489666ae74 Add support for Moxa EDS-G512E-8PoE (#9857)
* Add support for MOXA EDSG512E8-PoE

* Add support for MOXA EDS-G512E-8PoE

* Add support for MOXA EDS-G512E-8PoE

* Remove whitespace

* Create MOXA-EDSG512E8POE-MIB

* Delete MOXA-EDSG512E8POE-MIB

* Create MOXA-EDSG512E8POE-MIB

* Delete MOXA-EDSG512E8POE-MIB

* Create MOXA-EDSG512E8POE-MIB

* Update moxa-etherdevice.yaml

* Create moxa-etherdevice_edsg512epoe.snmprec

* Create moxa-etherdevice_edsg512epoe.json

* Add support for MOXA EDSG512E8-PoE

* Add support for MOXA EDS-G512E-8PoE

* Add support for MOXA EDS-G512E-8PoE

* Remove whitespace

* Create MOXA-EDSG512E8POE-MIB

* Delete MOXA-EDSG512E8POE-MIB

* Create MOXA-EDSG512E8POE-MIB

* Delete MOXA-EDSG512E8POE-MIB

* Create MOXA-EDSG512E8POE-MIB

* Update moxa-etherdevice.yaml

* Revert "Add Moxa EDS-G512E-8PoE test data"

* Add test data for Moxa EDS-G512E-8PoE

* Removed whitespace

* Update moxa-etherdevice_edsg512epoe.json

* Update moxa-etherdevice_edsp510a8poe.json
2019-03-05 00:19:16 -06:00
Florian Beer
80d0a23e8f Add data scrubbing state to Synology RAID status (#9661)
* Add data scrubbing state to Synology RAID status

Adds a new state translation to Synology DSM RAID status sensor, so it displays "DataScrubbing" while the operation is running. Previously it would just show "# 13".

* Update Synology RAID MIB

Downloaded from
https://global.download.synology.com/download/Document/MIBGuide/Synology_MIB_File.zip
2019-03-04 16:06:12 -06:00
KodApa85
7f104d4fd9 Advanced state sensors (#9881)
* refactor: advanced sensor states

mark create_state_index($state_name) as E_USER_DEPRECATED?

* fix: minor corrections

* fix: mib has partialSync(9) and incompatibleVersion(8)

* fix: corrected netagent2upsstate - Sleeping(5)

* fix: NetAgent2 upsThreePhaseUPSStatusInverterOperating correction

* refactor: array() be gone

* Refactoring includes/discovery/sensors/state/extendair.inc.php with arrays
And tidying up array formatting in other files

* fix: minor typo

* standardising array item names

removed redundant "if ($state_index_id !== null) {"

* workaround: procurve & serverscheck

a sensor is causing create_state_index($state) to return null.
The updated code doesn't allow for this and thus a hybrid is being used.

* standardised naming of state info. Caused a typo $state_name instead of $status_name
$state_name is the standard

* converted compas to square arrays

* Converted APC states using preg_match to new create_state_index() call

* Update boss.inc.php
2019-03-04 11:31:17 -06:00
Nick Hilliard
09caced7ef Add support for Infinera-Coriant Groove (#9843)
* Add support for Infinera Groove
2019-03-04 17:31:53 +01:00
KodApa85
3c0d0c9fba Added support for Alpha Comp@s (#9871)
* newdevice: Added support for Alpha Comp@s
http://www.alphainnovations.eu/compas

* fix: Updated state values
state values persist in database, even after deletion of devices.
Not a 100% how to purge them.
create_state_index($state_name, $states) doesn't update the database, if the states have changed

* refactor: comp@s OS state sensor now updated to latest format
2019-03-01 00:14:17 +01:00
ospfbgp
1ea3fdd70a Discovery rcChasPowerSupplyOperStatus for Extreme/Avaya (#9878)
* Update voss.inc.php

* Update voss.inc.php

* Update voss.inc.php

* Update voss.inc.php

* Update voss.yaml

* adding support for vsp9012 and vsp8608

* Add files via upload

* Add files via upload

* Add files via upload

* Delete voss_8608.json

* Delete voss_8608.snmprec

* Delete voss_9012.json

* Delete voss_9012.snmprec

* Add files via upload

* Add files via upload

* Delete voss_vsp-9012.json

* Add files via upload

* Add files via upload

* Add files via upload

* Delete voss_vsp-9012.snmprec

* Add files via upload

* Delete voss_8608.json

* Delete voss_8608.snmprec

* Add files via upload

* Add files via upload

* Add files via upload

* Add files via upload
2019-03-01 00:11:37 +01:00
PipoCanaja
e2f835ad9d
FDB table with history capabilities (#9804)
* Migration script and data feeding

* Adding the columns in the GUI

* build schema

* update FDB test data

* Use of timestamps()

* ignore created_at and updated_at in tests, and regenerate test impacted

* daily.sh does the cleaning

* space cleaning codeclimate

* Use carbon instead of str-val

* handle when $fdb_entry->updated_at and created at are null

* handle when $fdb_entry->updated_at and created at are null (force travis rerun)

* Doc update

* Doc update
2019-02-21 13:23:01 +01:00
djamp42
e572d2a144 Ruckus Wireless updates (ZD/SZ/Unleashed/Hotzone) (#9727)
* Fixes for SZ detection

* Ruckuswireless devices

* remove registered mibs

* Code Climate Fixes

* updated test data for zd1100 & zd1200

* Updated database test data

* trying to fix smartzone test data

* updating zd test data

* more code climate fixes

* Update ruckuswireless-unleashed.yaml

* hide total clients if 1 ssid

* fixing smartzone ap status

* smartzone ap count fixes

* fixes because of git

* fix zd ap counts

* Update ruckuswireless-sz.json

* Update ZD1200 test Data

* Update ruckuswireless-sz.snmprec

* Update Database test data

* Update zd1200 database data

* Update ruckuswireless_zd1100.snmprec

* Update ruckuswireless_zd1100.json

* Update ruckuswireless_zd1100.json

* Update ruckuswireless_zd1100.json

* Code Climate Fixes

* Code Climate Fixes

* Update Ruckuswireless.php

* Code Format Fixes
2019-02-15 21:32:44 -06:00
TheGreatDoc
6ea0e72d73 MAIPU MyPowerOS: CPU, Memory, expanded detection (#9825)
* New OS: MAIPU MyPowerOS

* fix file permissions
2019-02-15 08:02:06 -06:00
Vitali Kari
d60a0da7de Add support for Nokia ISAM (#9793)
* add mibs,first commit

* adds support for Nokia ISAM Plattform

* remove some comments

* change os polling to multi oid

* Restore file headers

* Fix discovery by sysObjectID

* first deactivate checks against IHUB (timos), It not necessary so long we can not provide more thatn one snmp community per device

* move snmp state and temperature from pre-cache

* Update os_schema.json
2019-02-12 20:23:02 -06:00
PipoCanaja
7e18a07088 FS.COM (Fiberstore) 'GBN' and 'SWITCH' devices support (#9734)
* Basic Support for Fiberstore devices

* Basic Support for Fiberstore devices

* mib files

* sysObjectID added

* mibs added

* MIB corrections + CPU discovery + version and SN

* CodeClimate + mempools

* CodeClimate + mempools

* mempools

* 5800

* testdata

* 5800

* tests

* mempools for 5800

* CodeClimate

* CodeClimate

* Cleaning and comments

* Tests for 5800

* CodeClimate

* Update Fs.php

* init processors[]

* optimized logo

* optimized logo

* optimized logo

* optimized logo

* split FS devices

* split FS devices

* split FS devices - tests

* split FS devices - class

* split FS devices - class

* split FS devices - tests

* removing un-necessry condition

* text and comments
2019-02-10 17:31:25 -06:00
Søren Rosiak
80f31b4831 Fix Arista interface bias current divisor (#9728)
* Remove exception

* Add test data

* Update arista_eos.json
2019-02-07 11:37:46 -06:00
Martijn Schmidt
49f206f58e Fix regression in VC hardware detection for JunOS (#9772)
PR #9546 has resulted in Platform being detected as
"Juniper Virtual Chassis Switch" when a set of devices
is stacked. Hence, no more possibility to see whether
it is for example an EX2300 or EX3400 virtual-chassis.

This commit falls back to using rewrite_junos_hardware()
if the "Juniper Virtual Chassis Switch" string is detected
in boxDescr, resulting in usable hardware data.

Caveat - it's possible to build a virtual-chassis of
multiple switch models, but only for higher end hardware:

https://www.juniper.net/documentation/en_US/junos/topics/concept/virtual-chassis-ex4200-overview.html#jd0e75

Example SNMP output:
mschmidt@nlrtm1-librenms1:~$ snmpwalk -v2c -cremoved -m JUNIPER-MIB -M /opt/librenms/mibs hostname jnxBoxDescr
JUNIPER-MIB::jnxBoxDescr.0 = STRING: Juniper Virtual Chassis Switch

Also reported previously via the community forums:
https://community.librenms.org/t/pr-9546-results-in-junos-platform-detection-quirks-in-combination-with-virtual-chassis/6537
2019-02-04 08:55:31 -06:00
Vitali Kari
65e766156f Add Raisecom Sensors (#9738)
* update some mibs

* extend snmpwalk_cache_twopart_oid function

* add raisecom dbm and temperature sensors

* add test data

* add some more sensors

* Update raisecom.inc.php

* Update raisecom.inc.php
2019-01-30 21:34:15 -06:00
tarik
5197074c4d adding temp/humidity sensors for raritan px2 (#9719)
* adding temp/humidity sensors for raritan px2

* fixing the divisor logic for threshold values of raritan temp sensor

* removing debug's statements and fixing a static check warning

* fixing the bool/str comparison with exact string comparison

* Create raritan-pdu_px2_temp.json
2019-01-27 08:33:28 -06:00
ACL
1fd967a7dd Improve index check for compatibility with different versions of the DDOS (#9698)
* Updated DataDomain MIB, Added DataDomain Storage poller and discovery

* Fixed issues pre-commit issues

* Removed extra blank lines

* Make polling less redudant

* Remove blank line

* Remove device os detection since it's not needed. Add test data for DataDomain

* For better compatibility, we will check if the $index is null prior to adding the storage

* Fix:  is undefined...

* Update datadomain.inc.php

* Update datadomain.inc.php
2019-01-22 17:33:36 -06:00
dharpster
fa8d7a008d Fix Sentry3 voltage sensor discovery (#9714)
* Fix Sentry3 voltage sensor discovery

Previous fix broke voltage sensor discovery with superfluous .1 in the SNMP OID.  I have fixed my install with this patch but other testing should probably be done.

* Update sentry3.json
2019-01-22 17:11:26 -06:00
Marvin Kuurstra
e2a8349440 Adding Sonicwall SMA 400 support (#9555)
* Adding Sonicwall SMA 400 support

* Added metric clients for use in SSL VPN client alerting
* Support for specifying multiple sensors for clients metric
* RAM info supported
* CPU info supported
* Added test data

* Dashes in graph aren't really useful

* Updated test data with script from upstream (#10)

* Fix style errors (#11)

* Now 8 spaces on line 56

* port clients sensor to count
Some sensor cleanups (move all icon definitions to one spot)

* update port data

* add sensor test data.  Make a guess at userLicense output since it is missing.

* cleanup missed items

* typo

* Updating test data

* Fixed missing CPU info

* Recreated test data

* Recreate test data after rebase

* Test data without ignore statements in config
2019-01-22 17:00:33 -06:00
Martijn Schmidt
e0da083f5c New OS: Schleifenbauer, entity-physical improvements, various html page fixes (#9471)
* Fix some comment and documentation typos.

* Fix various entphysical page display issues.

- Resolve flickering during loading (missing liClosed for nested items).
- Clicking a sensor actually takes you to the matching graph now.

* Add a few nicecase() calls to clean up html page display.

* Create discover_entity_physical() function

- Add discover_entity_physical() function into includes/discovery/functions.inc.php
- This allows for an easy implementation of OS-specific entity-physical discovery.
- Update includes/discovery/entity-physical/entity-physical.inc.php to use the new function.

* Add power_consumed and power_factor sensors.

* Two new icons, make more entPhysical data visible.

* Pre-commit fix: blank line found at end of control structure.

* Add Schleifenbauer OS support.

* Now really fix the comment typo.

* Fix parsing mistakes.

* Add a generic count sensor.

* Make the Schleifenbauer discovery use count instead of state sensors.

* Don't place count sensor at the top, add sane limits for Schleifenbauer

* Finetuning the rrd_options, changing Schleifenbauer sensor names.

* Update schleifenbauer.svg

* optimize logo too

* add test data

* fix sensor value display (spaces break it)

* update entPhysicalIndex
2019-01-20 12:24:11 -06:00
Erik
a6451860fc Fix if discover (#9643)
* fix_if_discover

* Update ports.inc.php

* Fixed overwriting IfDescr and IfAlias overwriting

* removed whitespace

* added ifname, ifalias and ifdescr copy if it is emtpy or null

* removed ifAlias from update to prevent overwrite

* removed ifName and ifDescr from update to prevent overwrite

* added is_port_valid before doing copy actions between ifDescr,ifAlias&ifName also added back ifDescr&ifName update

* Update ports.inc.php

* Update functions.php

* Update ports.inc.php

* Update exa_e7-2.json

* Update fortigate.json
2019-01-19 11:48:30 -06:00
Vitali Kari
b55938f031 Nokia vrf bgp (#9622)
* first commit

* clean code

* add snmpsim data for bgp

* renumber sql patch

* clear public ip

* update  misc/db_schema.yaml

* add test data and renumber sql-schema

* sql-schema

* sql-schema

* Update module_tables.yaml

* Update module_tables.yaml

* Update timos.json

* Update timos.snmprec

* Rename 281.sql to 282.sql

* update test data

* db migration

* Update 2019_01_16_195644_add_vrf_id_and_bgpLocalAs.php

* update db schema

* Update 2019_01_16_195644_add_vrf_id_and_bgpLocalAs.php

* Update 2019_01_16_195644_add_vrf_id_and_bgpLocalAs.php

* Update db_schema.yaml

* update schema
2019-01-19 11:44:32 -06:00
Tony Murray
5f752361f5
Merge ethernetprobe2 into akcp and improve akcp (#9465)
* Merge ethernetprobe2 into akcp and improve akcp
Use higher resolution temperature values if available
Properly hand F/C temperature scales (LibreNMS always uses C)
Add current, voltage, airflow (no test data)
Move humidity to yaml

* Update akcp.snmprec

* Update akcp-serverprobe8.json

* Add group

* Update test data
remove old MIB
2019-01-17 11:38:33 -06:00
PipoCanaja
8e80121c33 Add group to sensor 1st discovery + template syntax {{ $xxx }} (#9667)
* add group to sensor initial discovery and use dynamic_discovery_get_value template syntax on them

* spaces

* switching to YamlDiscovery::replaceValues

* testdata from ibmc

* testdata from nxos

* testdata from omnitron-iconverter

* testdata from vrp

* adapt discovery_schema to accept variables

* remove pattern

* Update discovery_schema.json
2019-01-15 20:56:30 -06:00
Tony Murray
63c85429ae Added support for grouping sensors (#9606)
Improves visual identification for sensors

 - [x] Docs

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
After you are done testing, you can remove the changes with `./scripts/github-remove`.  If there are schema changes, you can ask on discord how to revert.
2019-01-11 22:42:56 +00:00
Tony Murray
d8a751b021
Remove broken routeros signal sensor (#9650)
Discovers 2 of 6 found in the test data then updates it to not match.
Setting the wrong oid.
Tracking two specific macs on a single AP that don't match the label.
If they roam it won't change until next discovery.

If this is wanted, it should be written in the wireless section.
2019-01-11 11:51:23 -06:00
Tony Murray
1b29acc275
Fix sentry3 voltage sensors (#9649)
* Fix sentry3 voltage sensors

* don't need check, fix array to string conversion
2019-01-11 10:54:24 -06:00
Tony Murray
d277dee14d
Fix some issues with sensor limits (#9638)
* Fix Zynos temp warn limit
And others, but this seems to be the only one that uses
remove some odd limit restriction in the poller

* More consistent rounding for sensor limits

* round all numeric limits to 10 digits

* update test data

* Remove complex calculation as negative limit values are already swapped as needed.
2019-01-10 19:48:37 -06:00
KodApa85
02855fa9c8 ZyXEL Telemetry - XGS4600-32F (#9599)
* ZyXEL XGS4600-32F
- Added mib for diagnostics
    - CPU/Mem
    - Temp/Fan/Voltage
- Updated zyxel group mempools
- Updated test data
    - snmprec
    - json
- Altered ZyWall
    - To exclude XGS switches

* Defined ZYXEL-HW-MONITOR-MIB at the top of file

* Removed .MIB
2019-01-04 10:17:00 -06:00
Tony Murray
3dce7aa90c
AirFiber additional modulation rates, fix gpsSync (#9563)
* Add QAM1024 modulation for AirFiber
Move sensors to yaml

* Fix 0 index

* add additional data
make compatible with old sensors

* Fix whitespace
2018-12-28 20:11:24 -06:00
Tony Murray
de7ce7c757
Fix ifName and ifAlias being blanked by discovery (#9589)
* Fix ifName and ifAlias being blanked by discovery
on devices that have blank ifName or ifAlias

* Update test data

* work around net-snmp bug
2018-12-24 10:29:02 -06:00
Vitali Kari
272e511964 Nokia vrf (#9509)
* update some mibs

* add virtual router ports

* coding style

* refactor

* some refactoring

* some typos

* add snmprec

* Fix capturing VRF entries with no ports

* updated test data

* manually fix test data

Not going to try to fix the data capture for backslashes at this time.

* Revert "manually fix test data"

This reverts commit 2c98450706.

* timos data for net-snmp 5.7.3 ?????
2018-12-20 16:04:24 -06:00
Neil Lathwood
a5eddc0393 Updated dlink support with additional health,mempools and processors (#9464)
* Updated dlink support with additional health,mempools and processors

* Update dlink.inc.php

* Update dlink.inc.php

* Added test data

* add tests/data/dlink_dgs-1510-28.json

* actual data for the new items
2018-12-19 11:29:00 -06:00
Tony Murray
fad0bffc43 Escape SNMP & IPMI shell commands (#9537)
hopefully doesn't break anything
Mostly issues with snmp oids and options containing spaces.  Try to remove all of those.

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
After you are done testing, you can remove the changes with `./scripts/github-remove`.  If there are schema changes, you can ask on discord how to revert.
2018-12-16 13:42:50 +00:00
PipoCanaja
b67634bc5a Fixed ifType being removed when a port is down (#9493)
* Adding ifType to base_oids

* Improve discovery (update ifType) and polling (save ifType)

* Updated test data

* Updated json test data

* vlan isn't filtered by default :P

* With default ignored ports

* Update newer test data
2018-12-11 21:07:56 -06:00
markoh76
7bf769e19c Ceraos more sensors (#9392)
* Update to Added support for HeliOS 10Ghz failover to 5Ghz state sensor
Converted /includes/discovery/sensors/state/helios.inc.php to yaml
Test units included
CLA has been signed

* Added support for CeraOS TX Mute Status state sensor, NTP Client Lock Status state sensor.
Updated CeraOS temperature sensor, now called from includes/definitions/discovery/ceraos.yaml - removed includes/discovery/sensors/temperature/ceraos.inc.php
Corrected issue with CeraOS temperature reverting to zero after polling (added a trailing . to the num_oid)
Amended includes/definitions/discovery/helios.yaml with changes as advised by Neil Lathwood and Tony Murray

* Added unit test data and corrected ceraos.yaml validation error

* Added support for Ceraos Wireless Sensors (php)
Cross Polar Interference
Wireless Frequency

Added Ceraos state sensors (yaml)
NTP Client Lock Status
Tx Mute Status
Radio Operational Status
Remote Radio Operational Status
IDU Temperature
Power Amplifier Temperature

* Fix up tests, etc

* remove helios changes, fix style
2018-12-11 08:41:26 -06:00
PipoCanaja
0b3f1daed9 Dynamic_discovery_get_value in can_skip_sensor to use all oids in skip_values (#9495)
* Use of dynamic_discovery_get_value in can_skip_sensor in order to use all available oids in skip_values

* Use LibreNMS\Device\YamlDiscovery code instead of keeping duplicated function can_skip_sensor

* Fix Travis errors
2018-12-05 12:40:29 -06:00
Janno Schouwenburg
1ca1909074 SAF CFM wireless device support (#9450)
* Added support for SAF CFM L4 wireless device

* Added copyright statement according to LibreNMS documentation

* Added snmp test data and excluded some discover modules from os definition

* Style issue fixed

* More descriptive function

* MIB file rename

* Rename MIB file and change other files accordingly

* Added test data

* Removed debug statement

* Last checks

* Style changes

* Style changes

* Style changes

* Style changes

* Code restructure to make it more readable

* Fixed error in foreach

* Style issues

* Formatting of states within Yaml changed to make it more readable

* Omit default arguments

* Better code and modules only in CFM-M4P-MUX

* Chaged cfml4 to cfm

* Update Sensor.php

* Update Sensor.php

* Better handling of scientific numbers

* Better handling of scientific numbers

* New test data

* Correction on handling trailing zeros

* Different way of cleaning the numbers based on Tony's input
2018-12-05 07:50:34 -06:00