Commit Graph
17098 Commits
Author SHA1 Message Date
Adam BishopandGitHub 4c14efb375 Fix routing engine discovery on standalone JunOS devices (#11381)
* Fix routing engine discovery on standalone JunOS devices

In #9426, the sensor discover code was replaced with YAML.
Unfortunately it treats the FRU table as standalone OIDs, and did not
implement the filtering that was present in the original code.

This change causes LibreNMS to fully walk the FRU table, which allows us
to silence alerting on devices with an 'unknown' status. Without this
change, standalone devices have a spurious routing engine with state 1,
which triggers false harware failure alerts.

As we're changing the name of the sensors, this causes a loss of sensor
history.

This has been brought up on community a couple of times:
  https://community.librenms.org/t/juniper-qfx-routing-engine-state-alert/6152
  https://community.librenms.org/t/spurious-failed-routing-engine-from-some-junos-devices/6208

* Update test data

* Update test data

* Update test data

* Update test data

* This syntax works, but fails linting
2020-04-22 01:23:51 -05:00
Heath BarnhartandGitHub 10660261df pagerduty transport uses template message (#11459) 2020-04-21 23:48:23 +02:00
Johannes LundetegandGitHub c917de6fe1 Added Cisco Firepower 1010 (#11449) 2020-04-21 12:43:15 -05:00
Tony MurrayandGitHub 47b125b247 Fix sensor link (#11454)
used bitwise operator instead of a logical one.
2020-04-21 10:19:41 -05:00
Tony MurrayandGitHub 4833edb7d6 Don't access the database too soon in Device model boot (#11453)
* Don't access the DB in Device model boot

* check if db is migrated

* use self

* revert sensor link change
2020-04-21 10:19:25 -05:00
Tony MurrayandGitHub cc60a76c7b Show full path to ini file for timezone errors. (#11444) 2020-04-21 07:30:19 -05:00
JellyfrogandGitHub 36e54ab9f1 Use model::class instead of string for binding (#11450)
* Use model::class instead of string for binding

Originally from laravel shift

Shift bindings

PHP 5.5.9+ adds the new static `class` property which provides the fully qualified class name. This is preferred over using class name strings as these references are checked by the parser.

* Shift cleanup
2020-04-21 07:28:48 -05:00
JellyfrogandGitHub a04c8c0b84 Replace deprecated @expectedException (#11451)
Deprecated in phpunit 8
2020-04-21 07:27:13 -05:00
Tony MurrayandGitHub 52e1187314 Fix two more jpgraph (#11448)
* missed one jpgraph string

* missed one jpgraph string
2020-04-20 15:32:11 -05:00
Tony MurrayandGitHub 22dd4333d0 missed one jpgraph string (#11447) 2020-04-20 15:25:36 -05:00
Tony MurrayandGitHub 64817209eb fix class names (#11441) 2020-04-20 21:17:14 +02:00
Tony MurrayandGitHub c0763e8fb1 Fix devices filter os (#11443)
It would log a device type change whenever someone filtered by os
2020-04-20 17:51:51 +02:00
SourceDoctorandGitHub fa1254e114 Updating Pull Request initial text (#11440) 2020-04-20 15:01:14 +02:00
Tony MurrayandGitHub ad7b692654 Config CLI improvements (#11430)
* lnms config:set improvements
--ignore-checks option

* Config option completion
Could use some more refinement, but needs device commands converted to Laravel

* fix whitespace
2020-04-19 21:44:26 -05:00
b3d1b97a3b Addhost tests (#11385)
* Create addhostCliTest.php

Added test for addhost.php cli tool

* Added test for addhost function

Added tests and fixed code in order for the function to be able to run with default parameter

* Create addhostTest.php

added tests for addhost function

* Update addhostCliTest.php

Changed from testing addhost.php to Artisan command 'device:add'

* remove delhost exec

* remove delhost

* Remove isn't needed, transactions are used.

* Remove unneeded, transactions are used.

Co-authored-by: Tony Murray <[email protected]>
2020-04-19 17:36:01 -05:00
cc2894c0df Widget Eventlog Sensors Link and Mouseover functionality (#11380)
* Global Settings - Alert Default Settings

* Revert "Global Settings - Alert Default Settings"

This reverts commit a1af62b146.

* Widget Eventlog - Sensors link and overlib Image

* travis fix

* handling via AppServiceProvider

* collect function

* Travis ...

* static list of Sensor Types

* adding all sensor graph_types

* remove collect

* correct getTypes - remove change to lower case

* class sensor_descr switch

* class sensor_descr switch - revert

* Use standard sensor type names

* move types to attribute list

* going back to changes from 9eee7fad58

Co-authored-by: Tony Murray <[email protected]>
2020-04-19 12:57:49 -05:00
bb9ebb4e45 Added support for Peplink Pepwave & FusionHub (#11432)
* Added support for Peplink Pepwave & FusionHub

* Travis fixes

* Another Travis fixes

* Travis fixed

* Travis fixes

* Update peplink.svg

* Resolved reviews

Co-authored-by: Tony Murray <[email protected]>
2020-04-19 10:28:21 -05:00
ChristopheandGitHub ac7ebc065f Change stats file location (Bind9) (#11439)
The stats file should not be placed in /var/run/named but in /var/cache/bind.
In run there will be permissions problems.
2020-04-19 12:32:23 +02:00
SourceDoctorandGitHub d1bdbe2125 Alert rule in, not_in remove (#11437)
* Global Settings - Alert Default Settings

* Revert "Global Settings - Alert Default Settings"

This reverts commit a1af62b146.

* remove in, not_in cause of non functional
2020-04-19 12:23:44 +02:00
SourceDoctorandGitHub 3474b4493d Global search MAC Address (#11434)
* Global Settings - Alert Default Settings

* Revert "Global Settings - Alert Default Settings"

This reverts commit a1af62b146.

* global search - mac address

* remove unnecessary command
2020-04-19 00:33:17 -05:00
Hans ErasmusandGitHub a82f0660f0 Updated selected-port-polling explanation (#11435) 2020-04-19 00:30:42 -05:00
Tony MurrayandGitHub 6576a6c807 fix validate using non-builtin functions too early (#11436)
* fix validate using non-builtin functions too early
2020-04-18 17:55:48 +02:00
Tony MurrayandGitHub 1c08c11a77 Remove Laravel helpers (#11428)
* Remove Laravel helpers

* Replace qualifier with import
2020-04-18 00:37:56 +02:00
Tony MurrayandGitHub 729eeccaa4 Update BGP test data (#11433)
* Update BGP test data
Leave astext for now

* .....
2020-04-17 14:40:45 -05:00
RobJEandGitHub 3afdbb71c8 APC polling copy-n-paste error (#11429)
* fix a copy-n-paste error

* correct test data
2020-04-17 14:24:10 +02:00
Tony MurrayandGitHub e4b49f59f6 Delete ports via eloquent event (#11354)
* Delete ports via eloquent event
Chunk delete during purge all operations so we don't use too much memory.

* protect against missing device

* fix whitespace

* fetch less from the database when deleting a device's ports
fix output
2020-04-16 09:19:58 -05:00
Tony MurrayandGitHub e2eea17ee8 Work around jpgraph bug (#11425)
apparently GD now returns false when getting the bounding box of empty strings, this causes jpgraph to throw an incorrect error.  Work around that by setting all possible text to a single space character.
2020-04-16 09:18:44 -05:00
PipoCanajaandGitHub d67b34b934 Added device Netvision with rfc1628 support (#11426) 2020-04-16 09:12:24 +02:00
PipoCanajaandGitHub dd46e15e09 Update FAQ.md (#11423)
Replace issues by community forum in FAQ20
2020-04-15 18:06:21 +02:00
JellyfrogandGitHub 14ad6a9322 Fix travis-ci url (#11419) 2020-04-14 23:26:46 +02:00
Arjit ChaudharyandGitHub 7dfc2263e5 Prevent breaking of interface name into 2 words/parts (#11420) 2020-04-14 21:46:20 +02:00
212c9aad95 Add support for Advantech switches (#11415)
* Add Advantech logo.

Taken from https://commons.wikimedia.org/wiki/File:Advantech_logo.svg
with minor edits (removed width and height).

* Add Advantech MIB files.

* Add Advantech definitions.

* Add suppor for version and hardware polling.

* Add advantech snmp recording.

* Add sensors for SFP ports

Each SFP will have temperature, voltage, tx bias, Tx/Rx power.
Also update snmp recording to include new data.

* Rename ADVANTECH-EKI-PRONEER-MIB_1_01.mib to ADVANTECH-EKI-PRONEER-MIB

* Rename advantech-common-mib.mib to ADVANTECH-COMMON-MIB

* Update advantech.yaml

* Update advantech.svg

* Create advantech.json

Co-authored-by: PipoCanaja <[email protected]>
2020-04-14 11:05:22 +02:00
TheGreatDocandGitHub f535008680 Doc : Credentials for VM (#11418)
Added info about first access after importing VM into VirtualBox.
2020-04-14 11:04:19 +02:00
Martin22andGitHub c4ee93c954 Fixed skip value for temperature (#11414) 2020-04-14 00:12:55 +02:00
SourceDoctorandGitHub 67c0f3abea Global setting better naming (#11412)
* Global Settings - Alert Default Settings

* Revert "Global Settings - Alert Default Settings"

This reverts commit a1af62b146.

* Better setting description
2020-04-12 23:54:27 -05:00
bc16d35d65 Added hardware detection for FreeBSD (#11313)
* Added hardware detection for FreeBSD

* Clean-up unnecessary str_replace

* Cleanup str_replace() in existing code

* Added OS module tests for FreeBSD Hardware Detect

* Create freebsd.json

Co-authored-by: PipoCanaja <[email protected]>
2020-04-12 11:16:19 -05:00
e111fe690e Disable xdebug on travis-ci (#11409)
* Disable xdebug on travis-ci

* Update pre-commit.php

Co-authored-by: Tony Murray <[email protected]>
2020-04-12 09:11:00 -05:00
Tony MurrayandGitHub faac90d2b3 Revert "Use which instead of whereis (#11407)" (#11413)
This reverts commit 3925e78d84.
2020-04-12 09:09:18 -05:00
e37417e6c2 Added support for ICT Modular Power System and ICT Sine Wave Inverter (#11182)
* Added support for ICT Modular Power System and ICT Sine Wave Inverter

* Added SNMP test data for ICT Modular Power System and ICT Sine Wave Inverter

* Fixed styling errors and refactored state sensor for ICT Sine Wave Inverter

* Fixed newly created styling issues from refactoring ICT Sine Wave Inverter files.

* Fixed further styling errors from previous changed to appease Travis CI

* Removed unnecessary math from ICT Sine Wave Inverter voltage sensor

* Cleaned up unnecessary lines in ict-mps/ict-swi sensors. Moved from snmp_get to snmp_get_multi in ict-mps/ict-swi os pollers.

* Added test data for ICT MPS and SWI

* Fixed issue with load sensor not discovering

* Update snmpget to snmp_get

Co-Authored-By: Jellyfrog <[email protected]>

* Updated test data post-fixing sensor detection issue on ICT Sine Wave Inverters

* Moved ict-swi and ict-mps from legacy to yaml sensors

* Removed legacy code for ict-mps and ict-swi sensors

* Last commit mistakenly removed OS polling from ict-mps and ict-swi

* Fixed formatting for OS polling and updated test data for ict-mps and ict-swi

Co-authored-by: Jellyfrog <[email protected]>
2020-04-12 10:42:57 +02:00
dneto82andGitHub 9859e165d3 Updated MIB from Palo Alto (#11402)
Official Documentation:
https://docs.paloaltonetworks.com/resources/snmp-mib-files.html
2020-04-12 10:33:12 +02:00
Tony MurrayandGitHub 790ef61b0d Small test speedup (#11411)
Use Log::event() inside log_event()
Mock Log::event() in module tests to prevent writing to the database.
2020-04-11 19:53:25 -05:00
4a6a0af489 honoring config option force_ip_to_sysname in bill creation and editing (#10382)
* honoring config option `force_ip_to_sysname` in bill creation and editing

* refactored variable name to match it in edit.inc.php

* forgot one variable

* and one more :S

* Update new_bill.inc.php

* Update edit.inc.php

* Update new_bill.inc.php

* Update edit.inc.php

* Update edit.inc.php

* Update edit.inc.php

Co-authored-by: Neil Lathwood <[email protected]>
Co-authored-by: Tony Murray <[email protected]>
2020-04-11 19:10:45 -05:00
Mathieu PoussinandGitHub 909035b180 BGP API: fix search by ipv6 when using compressed addresses (#11394)
* BGP API: fix search by ipv6
* BGP API: Add error when giving a wrong IP as parameter
2020-04-12 01:11:57 +02:00
ce4ad2a09f Fix for Nokia 7705 SAR (#11021)
* Fix for Nokia 7705 SAR

* fix copy and paste typo

* Update 2020_01_10_075852_alter_mpls_lsp_paths_table.php

just trigger tests

* Update 2020_01_10_075852_alter_mpls_lsp_paths_table.php

* Update 2020_01_10_075852_alter_mpls_lsp_paths_table.php

Co-authored-by: Neil Lathwood <[email protected]>
2020-04-12 01:08:15 +02:00
Adam BishopandGitHub 492ab32b6d Add support for sending events to Sensu (#11383)
* Add support for sending events to Sensu

Sensu is an alerting and monitoring service (and much more) that has a
nagios compatible check API.

This transport translates LibreNMS alerts into Sensu events, and sends
them to the agent API running on the same host as the poller.

The transport has a few options, but none of them are required - if the
Sensu agent is correctly configured, alerts will be sent as soon as the
transport is enabled.

There's a fair amount of code, as I've tried to translate as much data as
possible between LibreNMS and Sensu.

* Update Transports.md

* If alerted is 0, send an "ok" alert dated rrd.step / 2 seconds ago

This makes Sensu aware of the last time the check ran successfully (ish).
If we don't send the initial "ok", Sensu will either display 'unknown',
or an incorrectly high duration for the incident.

Alerted gets set to 1 after the first alert is sent.

We choose rrd.step / 2 as:
 * rrd.step is the maximum time ago the check could have succeeded
 * we halve it, so that if a check is flapping, it is not masked

Basically, we guess that the check fails around halfway through the time
since the poller last ran.

* Add additional metadata

* Improve codeclimate slightly

* Consider names that are 2 or 3 components long
2020-04-11 14:29:13 -05:00
That Guy --^andGitHub 0e5a6f90ef update definition for devices running VyOS so they're discovered as Unix devices and can have sensors discovered (#11390) 2020-04-11 13:57:00 -05:00
PipoCanajaandGitHub e4fdac18e7 Split BGP-Peer for Timos in its own file (#11410)
* timos in its dedicated file

* timos in its dedicated file
2020-04-11 13:56:15 -05:00
HaydenandGitHub 8993817674 Fix memcached always reporting "ERROR" for app_state (#10739)
* perform json_encode() on memcached app $response data to match update_application() string parameter

* return raw snmp_get result for memcached response data during update_application()
2020-04-11 13:53:28 -05:00
JellyfrogandGitHub 3925e78d84 Use which instead of whereis (#11407)
which searches in PATH
whereis -b doesn't exist on some OSes
2020-04-11 13:03:39 +02:00
PipoCanajaandGitHub ae5da84d57 Typo in F5 serial detection 2020-04-10 20:10:34 +02:00