16802 Commits

Author SHA1 Message Date
3f53eed245 alert.inc.php: Fix missing ACK & Notes modals (#11076)
* BUG: From a device page, click Alerts and attempt to ACK or add a Note.  Nothing happens because the modals are not on the page.
* This patch corrects pages/device/alert.inc.php to include both modal/alert_notes.inc.php and modal/alert_ack.inc.php
2020-01-27 20:02:28 -06:00
761d105847 Added OS definition and discovery for SIAE Alfo80HD (#11063)
* Added definition and sensors for SIAE Alfoplus80HD

* updated the units for the wireless rate sensor

* Added test data

* regenerated test data as requested by PipoCanaja
2020-01-27 19:39:52 +01:00
e33518ada1 Change Poller Group on Device Settings (#11071)
* change Poller Group on Device

* code climate fix
2020-01-27 06:19:14 -06:00
27be237791 Order Poller Group by Name (#11072)
* order poller group by name

* sql query nicement
2020-01-27 06:18:31 -06:00
2bd19c655b enhance poller group management (#11073) 2020-01-27 06:17:52 -06:00
198e29c831 Oxidized GUI tweaks (#11066)
* Don't overwrite real port ids with zeros in the FDB

* Remove space to make codeclimate happy

* Provide links to device config view for oxidized config search results

* Use a bootgrid for Oxidized nodes so we can sort, search etc.

* Add a space for codeclimate
2020-01-27 05:31:43 -06:00
25920be1db Added fix for escaping underscore while using Markdown (#11070)
* Added fix for escaping underscore while using Markdown

* Corrected indentation
2020-01-26 08:05:49 -06:00
692247ddf3 only show uptime seperator '-' if uptime present (#11069) 2020-01-26 08:04:52 -06:00
817cf42896 Fixed device SNMP edit form (and better feedback) (#11068)
* Fixed device SNMP edit form (and better feedback)

* snmp.inc.php: Fix SNMP Edit form (better feedback)
* The feedback for Max Repeaters and Max OIDs is much better.  The constant false errors on save have been corrected.  The are no longer applicable and muted when SNMP is turned off. Their feedback now clearly shows the user what has been done.
* Rename & relabel $no_checks as $force_save (Force Save) because that's simpler and more clearly defines what the code is doing when you turn it on.
* Reorder the Force Save checkbox to be right above the Save button so it's even more clear what it does.  Force Save and Save are the only elements on the form that do *not* have a database setting.  They're ephemeral and now grouped as such.
* Embedded comments about the use of === false as tests for setAttrib() and forgetAttrib()

* snmp.inc.php: code climate updates, round 1

* remove blank lines
* refactor duplicate code blocks
* remove join on string
* move print_messages to the bottom of the form

* snmp.inc.php: code climate, round 2

* avoid deeply nested control flow statements (8)

* snmp.inc.php: when to $force_save and $device_isssnmable

* move $force_save outside of if ($snmp_enabled) so it works properly
when snmp is disabled.
* only check isSNMPable() if snmp is enabled

* snmp.inc.php: move $device_snmp_details

* $device_snmp_details are only needed for isSNMPable(), so only call
them within the same contingency

* snmp.inc.php: cleanup & hardening

* add SNMP Settings header (to better mimic Device Settings, etc)
* use Toastr for feedback, rather than print_message & print_error
* after editing, always unset($_POST) and the other variables used for editing
* unless the save is forced, if !$device_issnpable then don't save *anything* in the database and revert *all* previous form settings (some already were being reverted & some weren't)
* more variables were ordered alphabetically, unused variables were and removed
* for snmpver, don't use .toggle(); use .hide() & .show() so the form reverts properly when it fails

* snmp.inc.php: clarify placeholder for max repeaters

* snmp.inc.php: code climate, round 3

* correct blank line found at the end of control structure (2)
* correct space before opening parenthesis of a function call prohibited (3)
2020-01-26 08:04:00 -06:00
71ccb6a15c Updated test data for arubaos, fs-switch, ifotec, lcos, siklu and trendnet, to pass Travis tests (#11067)
* 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

* Updated test data for arubaos, fs-switch, ifotec, lcos, siklu and trendnet, to pass Travis tests

* Updated test data for arubaos, fs-switch, ifotec, lcos, siklu and trendnet, to pass Travis tests
2020-01-25 07:39:45 -06:00
5f3ad6465e Renice Device Module Naming like in global Settings (#11061) 2020-01-24 08:58:34 -06:00
59f4491afc SNMP Traps for Juniper Power Supplies (#10965)
* Juniper Power Supply Trap Handlers

* Added unit test

* fixed tests
2020-01-24 05:59:59 -06:00
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
46028521d2 add aggregate totals to multiport_bits graph, similar to port_bits (#11065) 2020-01-24 05:48:35 -06:00
21a8ebc31e SNMP counters validation (#11037)
* SNMP counters validation

Validation step added before counters are updated in table 'bill_port_counters'.

Avoid wrong data to be added to the table in case the SNMP polling function return an invalid value.

check --> https://community.librenms.org/t/wrong-billing-record-in-delta/8540

* SNMP counters validation #11037

--> Fixed lin identation.

*Updated message to be printed out in logs.

* SNMP counters validation #11037

Fixed blank spaces.

* SNMP counters validation #11037

Removing white spaces

* SNMP counters validation #11037

Sorry, more white spaces...
2020-01-24 05:44:55 -06:00
2960fc10f5 Add sensors to Infoblox discovery (nios.yaml) (#11043)
* Update nios.yaml

I tried to pull them all in using {{ index }}, but it didn't actually work.....
This adds the DHCP, DNS and NTP service statuses.

* Dynamic service discovery

* typo

* Create nios_status.snmprec

* Create nios_status.json

* Array

* Typo, more

Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
2020-01-24 00:33:41 +01:00
68419b1130 Fix FatalThrowableError in forgetAttrib() (#11064)
* From a device's SNMP edit form, when attempting to remove previously set Max Repeaters or Max OIDs values, a fatal error

was being thrown.
* Fix Call to a member function delete() on null {"userId":2,"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Call to a member function delete() on null at /opt/librenms/app/Models/Device.php:406)

* This patch corrects the ability to use the device's SNMP edit form to remove device attributes that had been previously set.  The values of Max Repeaters or MaxOIDs can now be deleted from the database.
2020-01-23 15:48:14 -06:00
6931df8990 Alertlog stats dashboard widget (#10967)
* Dashboard for alertlog stats

* Dashboard for alertlog stats

* Dashboard for alertlog stats

* Dashboard for alertlog stats

* Dashboard for alertlog stats

* Cleanup

* Cleanup

* Cleanup

* date selection

* date selection

* fix js rule details

* cleanup js

* dummy commit to reload CI/CD

* dummy commit to reload CI/CD
2020-01-23 08:16:30 -06:00
4395b002ab Add 'alert history' widget for dashboard (#10901)
* add alert history dashboard

* add sql-schema

* only alert

* add settings

* add settings

* fix display alert details

* fix db-schema

* add filtering by severity

* fix code climate

* Update common.php
2020-01-23 05:27:57 -06:00
945be18ea6 Always update widget seeds when db update (#10917)
* Always update seeds when db update WIP

* Only update widget seed
2020-01-22 15:03:12 -06:00
a384fc2830 Do not update alert timestamp when updating a triggered alert (#10907)
* Do not update alert timestamp when updating a triggered alert

* Only update alerts timestamp if alert is triggered or recovered

* db schema

* db schema

* cleanup timestamp update
2020-01-22 15:01:25 -06:00
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
a2c227ba4c Url.php: Allow findOsImage() to also use the first two words of $feature (#11049)
* Url.php: Allow findOsImage() to also use the first two words of $feature

* LibreNMS is not always using the bunded redhat.svg.
* Modern RHEL has /etc/os-release and distro ends up using it.
* The lsb release is correct, i.e. 'Red Hat Enterprise Linux Server 7.6'
* Previously, findOsImage() only considered the first word of $feature as a possibility for the icon.
* This patch allows using the first two words (with the space removed)
* i.e. 'Red Hat' becomes 'redhat' and findOsImage uses the bundled redhat.svg

* Url.php: use null as an argument rather than ''

* Url.php: only replaceFirst if there is a space in $feature
2020-01-21 19:37:10 -06:00
6ffde9ce2d PureFTPd Application (#11048)
* PureFTPd Application

* graphing connected Users
2020-01-21 18:50:11 -06:00
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
f99c45b4c1 Update Installation-CentOS-7-Apache.md (#11056)
Fixed typo
2020-01-21 08:53:14 +00:00
05d6e696f0 Create CISCO-RESILIENT-ETHERNET-PROTOCOL-MIB (#11052) 2020-01-20 21:52:50 +01:00
0439a6202c Minor updates for dd-wrt, clarify snmp source better (#11051) 2020-01-20 12:36:51 +01:00
0b18ae7d89 Centralize Application Display Naming (#11047)
* centralize Application Display Naming
* remove space character
* function call corrections
* Travis fix
2020-01-19 22:31:40 +01:00
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
cd85976ed8 add Zyxel MGS-3712 Sensors (#11050)
* intermediate commit

* test data
2020-01-19 22:01:36 +01:00
f4a9787178 Added Zyxel MGS-3712 Sensors (#11050)
* intermediate commit
* test data
2020-01-19 22:01:17 +01:00
f0187034e8 test data 2020-01-19 21:37:19 +01:00
e235c59d2f Add alert rule option to invert devices and groups "map to" list (#11038)
* Add alert rule option to invert map to
* Update 2019_12_17_151314_add_invert_map_to_alert_rules.php
* fix invert map to does not work if several groups are set in map to
* Clarify labels
* fix invert map to at rule creation
* clarify invert label
* Fix device in map to - not group
* dummy commit
2020-01-19 14:55:51 +01:00
25677e5edc Updated IOS-XR with NCS-5500 support for HW and version (#11044)
* Add version match for newer IOS-XR NCS hardware

* Tested with NCS-5504 and NCS5508

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

* Add test data for Cisco NCS-5504 and NCS-5508

Signed-off-by: Misha Komarovskiy <zombah@gmail.com>
2020-01-17 20:04:27 +01:00
a342a45b74 VMWare Guest State Traps and UI (#11035)
* Initial push

* power trap tests

* vmware heartbeat trap tests

* heartbeat trap test

* created utilclass for common functions

* Changed util class name to better reflect its use

* make vm power state changes to db

* Traps will modify DB

* Removed unecesarry relationship

* Added vminfo modelfactory, tests, and fixed format

* Added suspended state to ui
2020-01-17 18:16:14 +01:00
f25e3efa53 Update timos.inc.php (#11040)
Corrected th Nokia Service Routers (SAR) tmnxChassisType.1 to index to tmnxChassisTypeName.
2020-01-17 10:52:40 +01:00
10b42137e9 Revert "Add alert rule option to invert devices and groups "map to" list (#10954)" (#11036)
This reverts commit 7a8d0b9e093cc8e1d7ea1b3de4ab7dd2e8a5fb98.
2020-01-16 08:42:53 +01:00
7a8d0b9e09 Add alert rule option to invert devices and groups "map to" list (#10954)
* Add alert rule option to invert map to

* Add alert rule option to invert map to

* Update 2019_12_17_151314_add_invert_map_to_alert_rules.php

* fix invert map to does not work if several groups are set in map to

* fix invert map to does not work if several groups are set in map to

* fix invert map to does not work if several groups are set in map to

* Clarify labels

* Clarify labels

* Clarify labels

* Clarify labels

* fix invert map to at rule creation

* clarify invert label
2020-01-15 11:40:01 -06:00
e3156cbef6 Support of "disable alerting" in availability map and device summary widget (#11022)
* Hide disabled alerting device from avaibility map

* Hide disabled alerting device from avaibility map

* Hide disabled alerting device from avaibility map

* Hide disabled alerting device from avaibility map

* Hide disabled alerting device from avaibility map

* Hide disabled alerting device from avaibility map

* Hide disabled alerting device from avaibility map

* Hide disabled alerting device from avaibility map

* Hide disabled alerting device from avaibility map

* merge for last release

* Hide disabled alerting device from avaibility map

* Hide disabled alerting device from avaibility map

* Hide disabled alerting device from avaibility map

* Hide disabled alerting device from avaibility map

* Widget device summary

* Widget device summary

* Widget device summary

* Widget device summary

* Widget device summary

* Widget device summary

* fix color in widget device summary

* fix color in widget device summary

* Commit to restart travis CI

* Commit to restart travis CI
2020-01-15 11:32:29 -06:00
6dfa5ed75a Fix alerts not displayed (#11034) 2020-01-15 16:59:24 +01:00
ee8297df19 Extend FS switches support, handle lowerLayerDown ifOperStatus (#10904)
* extend FS switches support

* MIB compilation

* HW and Ver

* sensors and CPU

* tests

* correct version

* try to handle properly "down" as not up, for OperStat like lowerLayerDown

* try to handle properly "down" as not up, for OperStat like lowerLayerDown

* try to handle properly "down" as not up, for OperStat like lowerLayerDown

* try to replace "down" with "not up" :)

* fix other ifOperStatus checks
2020-01-15 08:28:36 -06:00
252ee125b5 highlight Device Dependency Path to Dependency Root Device(s) (#11025)
* highlight Device Dependencies down to Dependency Root Device(s)

* rename function

* better var name

* codeclimate fixes
2020-01-15 08:10:58 -06:00
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
b44875fba6 Add ifotec definition file (#11005)
* Add ifotec definition file
* Add snmprec file for ifotec
* Ifotec - generate test data
* Ifotec - Add svg logo
* Ifotec - Add svg os
* Delete ifotec.svg
* Delete ifotec.svg
* Use png files
* Add png logo
* Add png os file for ifotec
2020-01-13 23:23:39 +01:00
944f38b7f7 Fixing PHP imcompatibility issue with PHP 7.4 (#11030)
The PHP implode function has deprecated the glue after pieces method of calling the function as from PHP 7.4
Fixing this to ensure librenms works in PHP 7.4
2020-01-13 10:39:59 +01:00
dc3fe103ad Add Lancom OAP-321 Wireless AP (#10982)
* update lancom mib

* add Lancom OAP-321

* refactoring

* switch to available function
2020-01-12 20:03:26 +01:00
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
f25c91cbd1 Bugfix snmpsim collector: use the correct mibdir (#11003)
captureFromDevice() only returned data for named oids when the MIB
lived in the root mibdir, and could not retrieve data from any
vendor-specific MIB because the mibdir parameter was omitted from
the snmp function call. This meant that snmp commands for the
snmpsim data collector didn't return usable data. As a result
the test data wasn't complete for many discovery components.
2020-01-12 14:22:11 +01:00
a3867e3376 remove uneeded table header (#11029) 2020-01-12 14:18:32 +01:00