Commit Graph

6517 Commits

Author SHA1 Message Date
Hans Erasmus
aa68be59a2 Fixed a small typo (#11487) 2020-04-26 12:52:43 +02:00
Johan "Zwixxel" Zaxmy
7bfc2f9f57 Fixes evaluation order so unathenticated access works (#11485) 2020-04-26 12:45:31 +02:00
Mathieu Poussin
fc391090e1 BGP Polling: Add error code management (#11424)
* BGP Polling: Add error code polling

* Rework describe_bgp_error_code and fix bgp error fields migration

* Add real test data for IOS-XR and Arista EOS
2020-04-24 22:47:20 -05:00
Adam Bishop
b7b298806f OS detection and sensors for Dell Compellent (#11467)
* OS detection and sensors for Dell Compellent

... or Dell storage as it is now known. Under the hood it's
referred to as Compellent, so I've named it as that to avoid
confusion.

It is not part of the Dell group or using the Dell MIB folder -
Dell have doubled up on some OID definitions, which means the MIB
here and a couple of the existing ones conflict.

The change adds OS detection and a frankly ludicrous amount of
sensors. I have access to a relatively low end device, so at the
moment everything under *ctlr* is my best guess based on the other
table layouts.

* Set sensor state_name to avoid collisions

* Regenerate test data
2020-04-23 22:58:22 -05:00
arrmo
e3c1a3bbef Add OS version to asuswrt-merlin (#11438)
* Add OS version to asuswrt-merlin

* Add test data, for latest asuswrt-merlin updates

* Updated / corrected test files, snmprec and json
2020-04-23 22:50:30 -05:00
robwilkes
daebf8c765 Cisco sensor discovery fixes (#11077)
* Sev and Rel terminology varies between devices

* Most temp sensors don't have low limits, so adding

* update test data

Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-04-23 22:30:27 -05:00
priiduonu
3263839780 rename $state to $state_name (#11473)
rename $state to $state_name to keep better consistency with other modules
2020-04-23 13:44:02 -05:00
priiduonu
4df3310d4d Fix: Raspberry Pi frequency sensors discovery (#11460)
* Fix: Raspberry Pi frequency sensors discovery

* updated test data

* update test data again

* fixed Raspberry Pi codec states
2020-04-22 21:53:27 -05:00
Wheel
59222847b9 Ubiquiti Airfiber LTU many more sensors (#11382)
* Update AFLTU mib

* Airfiber LTU details

* More detailed graphs for Ubiquiti AF-LTU

* Travis fix

* Cleanup and Modulation change

* Ethernet port status

* SNMPrec

* SNMP data json
2020-04-22 01:30:35 -05:00
mathieu-oui
5c52403dd1 Fix PanOS Sessions count and add Vsys and other sensors (#11341)
* fix panos sessions and sslproxy

* add test file

* update mibs

* add tests

* test correction

* delete useless line

* correction

* correction mib

* Add additional sensors

* test data

Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-04-22 01:27:54 -05:00
Adam Bishop
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
Johannes Lundeteg
c917de6fe1 Added Cisco Firepower 1010 (#11449) 2020-04-21 12:43:15 -05:00
Tony Murray
52e1187314 Fix two more jpgraph (#11448)
* missed one jpgraph string

* missed one jpgraph string
2020-04-20 15:32:11 -05:00
Tony Murray
22dd4333d0 missed one jpgraph string (#11447) 2020-04-20 15:25:36 -05:00
Tony Murray
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
Lars Elgtvedt Susaas
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 <murraytony@gmail.com>
2020-04-19 17:36:01 -05:00
SourceDoctor
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 <murraytony@gmail.com>
2020-04-19 12:57:49 -05:00
Jozef Rebjak
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 <murraytony@gmail.com>
2020-04-19 10:28:21 -05:00
SourceDoctor
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
Tony Murray
1c08c11a77 Remove Laravel helpers (#11428)
* Remove Laravel helpers

* Replace qualifier with import
2020-04-18 00:37:56 +02:00
RobJE
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 Murray
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 Murray
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
PipoCanaja
d67b34b934 Added device Netvision with rfc1628 support (#11426) 2020-04-16 09:12:24 +02:00
Arjit Chaudhary
7dfc2263e5 Prevent breaking of interface name into 2 words/parts (#11420) 2020-04-14 21:46:20 +02:00
Mikkel Mondrup Kristensen
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 <38363551+PipoCanaja@users.noreply.github.com>
2020-04-14 11:05:22 +02:00
Martin22
c4ee93c954 Fixed skip value for temperature (#11414) 2020-04-14 00:12:55 +02:00
James French
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 <38363551+PipoCanaja@users.noreply.github.com>
2020-04-12 11:16:19 -05:00
Noah Roufus
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 <Jellyfrog@users.noreply.github.com>

* 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 <Jellyfrog@users.noreply.github.com>
2020-04-12 10:42:57 +02:00
Tony Murray
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
Tom van Leeuwen
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 <gh+n@laf.io>
Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-04-11 19:10:45 -05:00
Mathieu Poussin
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
That Guy --^
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
PipoCanaja
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
Hayden
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
PipoCanaja
ae5da84d57 Typo in F5 serial detection 2020-04-10 20:10:34 +02:00
PipoCanaja
3fb46710a6 Added support for RIEDO data concentrator (#11237)
* Riedo E3Meter DataConcentrator

* Riedo E3Meter DataConcentrator Image

* logos

* name

* Freq + Power

* Power

* Tests + standalone riedo mib

* tests
2020-04-10 13:24:49 +02:00
PipoCanaja
ad1c7d0e19 IPv6 support for BGP peers in VRP devices (#11243)
* ipv6 support for BGP routes in VRP devices

* reverse bgpPeers array to allow VRF aware BGP

* codeclimate

* codeclimate

* codeclimate, finally

* Split VRP out of bgp-peers for readabilty

* Split VRP out of bgp-peers for readabilty

* tests

* CodeClimate

* improve function description

* improve function description

* v6data

* rebase

* space

* ipv6 support for BGP routes in VRP devices

* reverse bgpPeers array to allow VRF aware BGP

* codeclimate

* codeclimate

* codeclimate, finally

* Split VRP out of bgp-peers for readabilty

* Split VRP out of bgp-peers for readabilty

* tests

* CodeClimate

* improve function description

* improve function description

* v6data

* rebase

* space

* fixed corner case
2020-04-10 13:22:26 +02:00
PipoCanaja
07d4da21ca Add support for Ascom IPBS (#11308)
* ascom support

* tests

* typo

* Correct missing 'mpls' in misc/os_schema.json

* remove mpls for now

* tests

* Update ascom.svg

* Don't disable already disabled modules

As I usually state, not much gain in disabling these here.   Would be better to optimize the modules if you think they take too long on devices that don't have support.

* refactor polling code

Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-04-10 13:21:25 +02:00
Tony Murray
76e58b6cb2 Clarify that you can use IP or hostname to add device (#11393)
Remove overwrite IP when adding devices, it is very rare this should be used and the setting is misleading.
2020-04-09 23:39:37 +02:00
SourceDoctor
fc921a143c Cleanup unused code (#11391)
* Global Settings - Alert Default Settings

* Revert "Global Settings - Alert Default Settings"

This reverts commit a1af62b146.

* remove not more used code

* Travis restart
2020-04-08 15:56:44 -05:00
Alexandre L
a4cf77b26b Fix device creation using overwrited ip (#11388)
* Fix device creation using overwrited ip

`deviceArray` was creating a device missing the `overwrite_ip` field, so it was not used by `isSNMPable`

* Fix device creation using overwrited ip

Part 2: Fix using not yet set variable

* Fix device creation using overwrited ip

Part 3: remove double space

* Useless commit to trigger Travis
2020-04-08 11:47:40 +02:00
Martin22
820a98bdcb Added skip values for older devices without temperature sensor support. (#11387) 2020-04-08 09:29:37 +02:00
Mathieu Poussin
29748fe306 BGP API: Allow to filter by local and remote peer address. (#11340) 2020-04-05 17:16:16 +02:00
Martin22
c379fee161 Add support Ray3 (#11374)
* Add support Ray3

* Create ray3.json

* Fixed copyrights, comments and move MIB file.

Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-04-05 17:13:22 +02:00
Tony Murray
7688426c85 Fix adsl graphs (#11379)
disable name checking
2020-04-04 07:41:22 -05:00
TFujiwara
49afd24ed6 Patch unix agent (#11312)
* Fixed unix packages and polling

* Update packages.inc.php

* Update unix.inc.php

* Update packages.inc.php

* Update packages.inc.php

code guidelines

Co-authored-by: SourceDoctor <sourcehhdoctor@gmail.com>
2020-04-03 10:37:08 -05:00
Tony Murray
217969e140 Update php-codesniffer (#11368)
* PHPCS 3.5+

* Fix newly detected style issues
2020-04-03 08:41:24 -05:00
Tony Murray
1445263290 Fix rrd format issues for asterisk and cipsec-tunnels (#11375) 2020-04-03 07:57:37 -05:00
SourceDoctor
83d980515c Rrdcached Socket Check fix (#11372)
* Global Settings - Alert Default Settings

* Revert "Global Settings - Alert Default Settings"

This reverts commit a1af62b146.

* RRDCached Socket Check fix
2020-04-02 20:50:39 -05:00