Commit Graph

16796 Commits

Author SHA1 Message Date
SpaceDump
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
SourceDoctor
692247ddf3 only show uptime seperator '-' if uptime present (#11069) 2020-01-26 08:04:52 -06:00
Joseph Tingiris
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
LEV82
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
SourceDoctor
5f3ad6465e Renice Device Module Naming like in global Settings (#11061) 2020-01-24 08:58:34 -06:00
Heath Barnhart
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
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
Hayden
46028521d2 add aggregate totals to multiport_bits graph, similar to port_bits (#11065) 2020-01-24 05:48:35 -06:00
ccperilla
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
JohnSPeach
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
Joseph Tingiris
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
louis-oui
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
louis-oui
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
louis-oui
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
louis-oui
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
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
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
SourceDoctor
6ffde9ce2d PureFTPd Application (#11048)
* PureFTPd Application

* graphing connected Users
2020-01-21 18:50:11 -06: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
TheGreatDoc
f99c45b4c1 Update Installation-CentOS-7-Apache.md (#11056)
Fixed typo
2020-01-21 08:53:14 +00:00
O Palivan
05d6e696f0 Create CISCO-RESILIENT-ETHERNET-PROTOCOL-MIB (#11052) 2020-01-20 21:52:50 +01:00
arrmo
0439a6202c Minor updates for dd-wrt, clarify snmp source better (#11051) 2020-01-20 12:36:51 +01:00
SourceDoctor
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
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
PipoCanaja
cd85976ed8 add Zyxel MGS-3712 Sensors (#11050)
* intermediate commit

* test data
2020-01-19 22:01:36 +01:00
Vitali Kari
f4a9787178 Added Zyxel MGS-3712 Sensors (#11050)
* intermediate commit
* test data
2020-01-19 22:01:17 +01:00
Vitali Kari
f0187034e8 test data 2020-01-19 21:37:19 +01:00
louis-oui
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
Misha Komarovskiy
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
Heath Barnhart
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
craig-nokia
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
Kevin Krumm
10b42137e9 Revert "Add alert rule option to invert devices and groups "map to" list (#10954)" (#11036)
This reverts commit 7a8d0b9e09.
2020-01-16 08:42:53 +01:00
louis-oui
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
louis-oui
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
louis-oui
6dfa5ed75a Fix alerts not displayed (#11034) 2020-01-15 16:59:24 +01:00
PipoCanaja
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
SourceDoctor
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
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
Anael Mobilia
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
Christopher McAvaney
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
Vitali Kari
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
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
Martijn Schmidt
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
SourceDoctor
a3867e3376 remove uneeded table header (#11029) 2020-01-12 14:18:32 +01:00
Arjit Chaudhary
d4317a6514 Create TRIPPLITE-PRODUCTS (#11028)
* Create TRIPPLITE-PRODUCTS-MIB
* Rename TRIPPLITE-PRODUCTS-MIB to TRIPPLITE-PRODUCTS
Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
2020-01-12 14:17:47 +01:00
louis-oui
891d6966d8 Optimize DB update of ports and ports_statistics tables when polling (#10792)
* Don't update ports stats in database when their ifOperStatus is down and their ifLastChange did change

* Don't update ports stats in database when their ifOperStatus is down and their ifLastChange did change

* Don't update ports stats in database when their ifOperStatus is down and their ifLastChange did change

* Update the poll_time, poll_prev and poll_period of all ports in an unique request per device

* Update the poll_time, poll_prev and poll_period of all ports in an unique request per device

* echo debug

* max array_column

* remove print_r for debug

* optimize update of poll_time, poll_prev and poll_period

* optimize update of poll_time, poll_prev and poll_period

* better code readibility
2020-01-10 10:03:32 -06: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
Vitali Kari
2aa0b069b6 intermediate commit 2020-01-10 08:07:15 +01:00
louis-oui
0e3c472018 "Disable alerting" on device disables alert rules check (not just alert transport) (#11015)
* Fix disable notify

* Fix disable notify

* Disable all alerting

* fix db migration

* fix db migration

* fix db migration

* Add autoclearing active alerts if disable alerting set

* Add autoclearing active alerts if disable alerting set

* fix check

* Device in gray if disable_notify is set - not ignore tag
2020-01-09 18:46:52 -06:00
SourceDoctor
f40f4e1864 highlight isolated Devices (Devices with no Dependencies) (#11018)
* highlight isolated Devices (no Dependencies)

* travis fix

* retrigger node analysis
2020-01-09 18:44:40 -06:00