Commit Graph

8305 Commits

Author SHA1 Message Date
Tony Murray
568ee86eb5 Fix double escaping sysname in device dependencies (#16458)
I double checked that we aren't missing any escapes elsewhere on sysname and it looks good.
2024-09-29 16:34:12 -05:00
Tony Murray
e08571c38c Transceiver Support (#16165)
* Add transceivers module

Move os specific code to OS

Fix errors and updated connector names

Add RouterOS, a lot less data there.

Add Comware

Add Exa, required a transformer function (mw to dBm)

Add Junos, revision was too short

Just starting on ui

Graphs, and more ui
some polling fixes

collapse header for small screens

refactor a bit

Missed graphs

Transceivers icon inline

Use @once on popup javascript

update db_schema.yaml

Don't show transceivers in basic view
basic view could use a review

Apply fixes from StyleCI

API functions

Comware don't fail if port is missing

Apply fixes from StyleCI

Add alert rules to collection

Device Overview

Attempt to fix bad alert rule, probably needs more

Fix up Comware and remove old sensors

Mark transceiver metrics without thresholds as Unknown

Routeros cleanup

Exa cleanup

Handle missing port

Graph allow filter by channel

More translations

Add transceiver graphs to port graphs

Add Cisco support, use entPhyscial module data if available

Fix OcNos divisors

Labels on transceiver page

Show encoding if available

Hacky OcNos port mapping

Fix up Junos optics and remove old sensors

FS switch support
Metric casts to prevent thrashing
Extra transform_function support

Add link to transceivers page from overview

Change default sort to group by type, then channel
move some code out of overview blade template
Fix bad type ocnos

Apply fixes from StyleCI

Add scales to graphs

Add some test data

Default sort order for metrcis in SQL applied by default

Transceiver metrics threshold manual settings via WebUI and API

Fixes to channels verbiage

Fix severity calculations

Add cable field for SM/MM/Copper

Apply fixes from StyleCI

update test data

Show DDM

Update DB schema file

Extend serial field to 32, even though devices shouldn't be able to have one longer than 16

Missing import

Add status field to database, that way we can support snmp implementations that only return an enum

Add missing files

Fix db_schema

Fix style

Fixes

Style fix

Work around phpstan issue

Update transceivers.blade.php

Missed getStatus() call

Prevent extra dots when channels are not changed

Update module to match upstream

Save ocnos metrics as sensors

Move to regular sensors

add entity physical index

Update UI to sensors WIP

Apply fixes from StyleCI

Forgot one change

Update ui to use sensors

Remove transceiver metrics

Remove metric os discover code
fs-switch pending

Remove transceiver metrics for fs-centec

Exa link up

Revert all test data

Fix up transceiver module interface

Remove unused Convert class

comware cache and transceiver type

Fix some transceiver metrics filtering and formatting issues

Consolidate display formatting

Coalesce commare hh3cTransceiverTable walks to prevent double walk

Use group to identify transceiver sensors

Fixup routeros

Fix up cisco

update db_schema

Small addition to docs

Improve overview layout and add graph popup

Update Junos

update css files

ddm should be nullable

Increase the field length for type and model

Cisco Improve detection when there is an intermediary container

Add transceiver test data

Apply fixes from StyleCI

Fix incorrect test data

Improve display formatting

Fix test data

Apply fixes from StyleCI

Fix up more data

Fix up more data

Fix incorrect return type in routeros

Update ocnos data

* Remove some remaining references to transceiver_metrics table
2024-09-29 11:05:44 -05:00
dasdromedar
8d2bf6ceb0 Format Oxidized update time (#16455)
* Format Oxidized update time 
Format Oxidized update time to local timezone (instead of UTC)

* extra space removal
* and one more
---------

Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
2024-09-29 16:00:08 +02:00
Tony Murray
36b38a50cc Fix device dependencies xss (#16447)
https://github.com/librenms/librenms/security/advisories/GHSA-rwwc-2v8q-gc9v

Create html programmatically to prevent printing user input out.
2024-09-29 14:06:52 +01:00
Tony Murray
f259edc19b Fix alert template creation xss (#16446)
https://github.com/librenms/librenms/security/advisories/GHSA-gcgp-q2jq-fw52
2024-09-29 14:02:25 +01:00
Tony Murray
6af12dbc45 Fix potential xss in edit alert transport (#16445)
Would need to be in php code, so not user editable
2024-09-29 14:00:36 +01:00
Tony Murray
ee1afba003 Fix Alert transport details xss (#16444)
* Fix stored XSS in alert transport details

https://github.com/librenms/librenms/security/advisories/GHSA-7f84-28qh-9486

* Fix password double encode
2024-09-29 13:45:16 +01:00
Tony Murray
7620d220e4 Fix alert rule name stored XSS (#16443)
https://github.com/librenms/librenms/security/advisories/GHSA-7f84-28qh-9486
2024-09-29 13:42:21 +01:00
Tony Murray
d3b51560a8 Fix device group stored XSS (#16442)
https://github.com/librenms/librenms/security/advisories/GHSA-fc38-2254-48g7
2024-09-28 19:37:46 +01:00
PipoCanaja
ce89f5b410 APC - runtime discovery, apply divisor (#16441)
* fix for discovery

* snmpsim for sensors after #16435

* and tests

* fix RuntimeBattery
2024-09-28 11:05:44 -05:00
Neil Lathwood
43df7f3810 Updated APC sensors to include upsAdvTestDiagnosticsResults state (#16435) 2024-09-28 00:18:30 +02:00
Luis Wolfarth
a6c195ee90 LLDP Discovery - LldpRemPortId convert to string when in HEX (#16438)
* Update discovery-protocols.inc.php

When using the LLDP-V2-MIB, the device may reply with lldpV2RemPortId as hexadecimal. To convert it to a string, this update checks if the lldpV2RemPortIdSubtype is '5' = "interfaceName(5)"; if so, the code removes the character ":" from the value of lldpV2RemPortId and tests if it is hexadecimal. If the test is positive, it translates it into a string.

* Update discovery-protocols.inc.php
Added lines 342 to 345 to convert the lldpRemPortId when is hex and lldpRemPortIdSutype is 5.

* Update discovery-protocols.inc.php
Importing lib StringHelpers.

* tabs + tests PANOS

---------

Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
2024-09-26 20:39:25 +02:00
zippanto
2ffe314dc7 Fix custom sensors logic not being loaded in some cases (#16433)
https://community.librenms.org/t/arista-eos-dbm-power-values-are-not-calculated/23848
2024-09-25 16:07:04 +01:00
O Palivan
df84362804 Fix AdvaOSA OS naming (#16425)
* fix OS naming, FSP150CM exists but is not at all the same

* fix tests

* fix os underscore
2024-09-25 14:53:22 +02:00
Neil Lathwood
b7bc6dec10 Stop showing bills that do not exist (#16423)
* Stop showing bills that do not exist

* Updated to a more efficient query

* Moved to use 404 page
2024-09-25 14:45:57 +02:00
Neil Lathwood
9cddd7fd21 Fixed the issues with JetStream lldp discovery (#16414)
* Fixed the issues with JetStream lldp discovery

* Added is_array() check
2024-09-25 14:43:24 +02:00
O Palivan
52c96a6e79 Adva 150CC - Exclude nemihubshelf (150CM) (#16426)
The SysObject ADVA list is messy. "nemihubshelf" device is a 150CM, and crashes when discovered and polled as a 150CC. This PR excludes them from being discovered wrongly.
2024-09-25 12:47:09 +02:00
Steve Calvário
d23ecf551d Fixed normal users UI widget AlertLog Stats (#16363)
* Fix normal users UI widget AlertLog Stats

* Add phpstan-ignore
2024-09-24 22:18:55 +01:00
mcook55
db65bb818a Added support for Siteboss360 appliances (#16422) 2024-09-23 23:53:41 +02:00
Tony Murray
0a5c174f4f Fix test regressions introduced while tests were broken (#16399)
* AuthSSOTest: clear roles cache

* PollingJob: When a poller module doesn't exist, return null instead of false.  Skip all other checks and disable polling in that case.

* Sensors: Guess high and low limits separately as needed

* Sensors: drac test psu current data was wrong, referencing the snmprec, 8 / 10 and 0 / 10 should be the values
NOTE: drac is messed up and runs a billion snmp queriess for no reason

* please phpstan

* Sensors: limits reference old code
move to "creating"

* Fix gw-eydfa accidental assignment

* Fix ies5000 test data now that the bad state is removed

* Fix ies5000 test data part 2

* Move sensor discovery reset into discover_device()

* infinera remove duplicate sensor (also a lot of trailing whitespace apparently)

* Fix innovaphone bad yaml discovery

* module tests should be using null when test data doesn't exist, not an empty array

* When discovery or polling is not supported, dump null instead of an array.
Account for nulls in testing

* update ISE serial

* Janitza was seemingly wrong before

* Remove some private data

* bgp-peers requires ipv4-addresses and ipv6-addresses for bgpPeerIface

* fix polycomLens broken state sensor discovery

* Raritan pdu and pdu2 test data was combined in one test file, split it out

* scs-ks duplicate temperature sensor indexes

* sentry3 someone tried to avoid breaking stuff but just broke things more

* smartos-dcp-m fix incorrect numeric oids

* ssu2000 apparently test data was wrong, must have fixed a bug in the code.

* timos remove duplicate dbm sensor definitions

* bgpPeerIface is working in tests now

* Fix moxa-etherdevice when mibs are a bit different

* xw_to_dbm negative values should return null

* Update cisco test data due previous fixes/changes

* One more bgpPeerIface

* Add orderBy to ospf module db dumps

* Remove links test data for now

* Improve handling of bad data in ipv6-addresses module
2024-09-23 10:11:05 -05:00
mcook55
0e8c4c4947 Added support for Argus Rectifier appliances (#16418) 2024-09-23 12:02:01 +01:00
Tony Murray
37542e1a2d FS centec: disable bulk for vlans (#16417) 2024-09-20 20:13:58 -05:00
Dag Bakke
7034fd7a40 fix for wrong graph being referenced (#16400)
Co-authored-by: Dag B <Dag B>
2024-09-17 10:26:32 -05:00
Tony Murray
7d450345df Fix sensor state translations (#16393)
* Fix sensor state translations

* Fix up lint/style

* Set state_index_id

* Apply fixes from StyleCI

* Wrong call

* just use a loop

* Wrong id column

* Missing fillable

* Handle sensors missing state translations

* Before making a state index

* Can't map to a state index if it doesn't exist

* Apply fixes from StyleCI

* ies5000 overflowing tinyint

* Accept state translations directly add that in the translation

* handle duplicate state names, but with different case (skip no way to work there)

* Apply fixes from StyleCI

* Fix type stuffs

---------

Co-authored-by: Tony Murray <murrant@users.noreply.github.com>
2024-09-15 02:13:11 +02:00
Tony Murray
a0587154c4 Sensors move can skip and output into singleton (#16392)
* Sensors move can skip and output into singleton

* style

* rrd_type

---------

Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
2024-09-13 10:23:17 -05:00
Shane Mc Cormack
5e9e1e9c95 Fix detecting stacks in unstacked switches. (#16384)
Fix #16374
2024-09-10 21:54:52 +02:00
Martin22
64241dbdf3 Extension of support for IMCO LS/PS backup power sources. (#16377)
* Modification of the MIB name and extension to support all LS and PS backup power sources, including the addition of hardware, firmware, and serial number.

* Fix os name
2024-09-09 13:12:42 +02:00
Tony Murray
071076149a Improved module controls (#16372)
* Improved module controls
Ability to clear device module overrides from webui
Ability to clear all database data for a module (helpful for module you have disabled that still have data)

Database reset only works for modern modules.

* Update functions.php
2024-09-09 09:09:19 +02:00
jayceeemperador
ebce44543c Add Support for Cisco ISE SNS-3595-K9 (#16376)
* Added snmprec file from ISE SNS-3595K9

For Cisco ISE SNS-3595K9 Support

* Create ise_3595.json

For support for Cisco ISE SNS 3595-K9

* ISE: added Support for SNS-3595-K9

Added sysObjectID from SNS-3595-K9
2024-09-09 09:08:49 +02:00
Justin Lentz
30b174508c Fix SmartOptics Skip Values (#16284)
* Update smartos-dcp-m.yaml

* Update smartos-dcp-m.yaml

* Update smartos-dcp-m.yaml

* derp

* Update test data

* Update smartos-dcp-m_dcp-m40-pam4-zr.json

* Update smartos-dcp-m_dcp-m40-pam4-zr.json
2024-09-09 00:00:42 +02:00
Tony Murray
f54e38f4fe More cisco state fixes (#16369)
* More cisco state fixes
Turns out it was fetching values as strings.  Swap to SnmpQuery and fetch the data numeric as expected

* Apply fixes from StyleCI

* update MIB too

---------

Co-authored-by: Tony Murray <murrant@users.noreply.github.com>
2024-09-06 18:49:55 -05:00
Ervin S.
81d6eb57e6 device - infortrend - add temperature sensor (#16316)
* Adding support to Infortrend DS3016

* Adding snmprec for Infortrend DS3016

* Delete tests/snmpsim/DS_3016.snmprec

* change of the infortrend logo

* change of the infortrend logo

* add the infortrend logo

* Delete tests/snmpsim/infortrend_test.snmprec

* again another logo replacment

* again another logo replacment

* again another logo replacment

* update yaml file to display sensor state

* Delete includes/definitions/discovery/infortrend_orig

* typo missed the . at start of oid

* change logo based on req. from PipoCanaja

* on req of PipoCanaja to fix the structure of the folder

* replacing the logo as req. from PipoCanaja

* adding temperature sensor and serial number

* improving sensors

* removed wrongly added chars

* removed MIB from wrong place

* Murrant's request for snmprec file

* adding Voltage sensor monitoring

* Skipped the value that are irrelevant. Yay!

* Update .gitignore

* Fix infortrend.yaml

* Create infortrend_ds3016.json

* fix infortrend.yaml

* Update infortrend_ds3016.json

* Update infortrend.yaml

* Update infortrend_ds3016.json

---------

Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
2024-09-06 14:22:31 -05:00
Andy Norwood
0ae58d1883 Fix ignore check for F5 component polling and Web UI (#16329)
* Update f5-ltm.inc.php

Remove filter for ignore = 0

* Update f5-ltm-currconns.inc.php

Remove filter for ignore = 0

* Update f5-gtm.inc.php

Remove filter for ignore = 0

* Update ltm_vs.inc.php

Change component filter from 'ignore' to 'disabled'

* Update ltm_pool.inc.php

Change component filter from 'ignore' to 'disabled'

* Update ltm_bwc.inc.php

Change component filter from 'ignore' to 'disabled'

* Update gtm_wide.inc.php

Change component filter from 'ignore' to 'disabled'

* Update f5-cert.inc.php

Change component filter from 'ignore' to 'disabled'

* Update gtm_pool.inc.php

Change component filter from 'ignore' to 'disabled'
2024-09-06 10:50:13 -05:00
Tony Murray
0b9312a77a Fix some issues with cisco entity sensors (#16365) 2024-09-06 10:46:52 -05:00
Tony Murray
f15f8fa63a Sensors remove reliance on global variable (#16344)
* Sensors remove reliance on global variable

* Apply fixes from StyleCI

* Clear the instance instead of reset.
Remove $valid['sensors'] from docs

---------

Co-authored-by: Tony Murray <murrant@users.noreply.github.com>
2024-09-03 21:04:34 -05:00
makriska
4efad1ae69 Fix handling of zero value for entSensorThresholdValue for dbm cisco sensor (#16336)
* add handling of zero value for entSensorThresholdValue for dbm sensor type

this addresses https://github.com/librenms/librenms/issues/16335
* Update cisco-entity-sensor.inc.php
* safe check for $key['entSensorThresholdValue']
* style
---------

Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
2024-09-03 21:39:05 +02:00
Tony Murray
cc22a74503 Remove global $var access functions (#16345)
* Proxmox remove global access functions

* Apply fixes from StyleCI

---------

Co-authored-by: Tony Murray <murrant@users.noreply.github.com>
2024-09-03 19:41:13 +02:00
Tony Murray
c6cac9d90b Fix bad health sensor labels in the ui (#16350) 2024-09-03 11:49:47 -05:00
Tony Murray
03d3660dfa Fix Cisco entity-sensor (#16351)
* Fix Cisco entity-sensor
make mw_to_dbm and uw_to_dbm handle negative numbers

* fixes and update test data
2024-09-03 09:02:02 -05:00
Tony Murray
d8097b0c21 awplus sensor fixes (#16348)
* awplus sensor fixes

* Update test data
2024-09-02 22:26:02 -05:00
Tony Murray
64c0d6ff7f Ignore entity-sensor invalid values (#16347) 2024-09-02 21:44:29 -05:00
Justin Lentz
cdc360dcdb Use Device Displayname for AlertRules (#16322)
* Use Displayname for AlertRules

---------

Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
2024-08-28 21:35:20 +02:00
Tony Murray
9e4b2fa3a3 Reject API device_add that are missing snmp info (#16314) 2024-08-27 07:08:19 -05:00
Tony Murray
35967dc98d Remove CIMC custom inventory code (#16305)
No test data and it is too complex and strange to update without data.
If someone wants to update and re-submit it, they are welcome to.
2024-08-21 12:24:30 +02:00
Tony Murray
3c67de2311 Fix misc Cisco polling errors (#16307)
* Fix misc Cisco polling errors

* Apply fixes from StyleCI

---------

Co-authored-by: Tony Murray <murrant@users.noreply.github.com>
2024-08-21 12:22:37 +02:00
Simon Wüllhorst
d2df5ac9d7 Updated nvidia poller app: handle slightly changed nvidia-smi output formatting properly (#16158) 2024-08-21 01:28:18 -05:00
Zane C. Bowers-Hadley
7b98721e32 Poudriere support (#16229)
* add the poller

* save text status stuff

* add initial app page stuff

* add history table and start work on graphs

* checkpoint

* re-work the poudriere graph bits a bit more

* fix the poller and start work on the graphs

* polling fix

* more work on the poudriere stuff

* poke stuff with php-cs-fix

* add some more graphs

* more style fixes

* another style fix

* add more graphs

* add Poudriere docs

* add tests data

* some minor tests fixes

* a test tweak

* more test tweaks

* some more test tweaks

* tweak .data.build_info data .data.build_info to make the app data test saner

* derp... missed a item

* add app data
2024-08-21 01:27:26 -05:00
Tony Murray
9d35fbc6a7 Entity Physical discovery: Rewrite to modern style (#16289)
* Initial entity-physical code

* Split out Entity-MIB trait

* Cisco Cellular inventory

* Fix bad test data

* alfo80hd - we now include all entPhysical entries

* Correct aos7 test data

* Add entPhysicalClass as last resort for label in ui

* aos add previously filtered data

* Fixup arista-eos data

* Update ariast_eos data

* Arris, clean garbage in Rev fields

* Aruba Instant custom inventory ported

* ArubaOS CX add vendor type mib

* aviat-wtm test data refresh

* axos add shelf fix data fields a bit

* ciena-rls

* ciena-sds

* Skip cimc for now... no test data

* Cisco updates

* Comware data update

* Update dnos

* Clean Edgeos garbage, make code from Arris shareable

* Relaxed ifIndex match, some devices cheat and send back static strings instead of formatted OIDs

* Regex refinement and updated edgeos with new clean data

* Update edgeswitch data

* Update eltex-mes21xx data

* eltex-mes23xx

* Guess at eltex-mes24xx since there is no test data

* Update eurostor, fix firmware version

* Apply fixes from StyleCI

* fixes

* Update fortigate data

* Update fortiweb, ftd, and fusion

* Update linux LSI

* Fix hexToAscii null removal with different seperator handling

* icotera add final snmprec data to avoid snmpsim bug

* Update IOS data

* Update mrv-od

* Add junos translation

* Generic data updates n-r

* ruijie workaround snmpsim bug

* Port saf-cfm

* Recode Schleifenbauer, and fix entPhysicalIndex values

* SmartAX fixes

* sm-os and tait-infra93

* timos inventory was not right, fix it up

* ubiquoss-pon

* VRP, has custom data collection on top of normal
adapt port ifIndex lookup to handle it

* VRP exceeded the string length specified in ENTITY-MIB...

* data updates

* Final data update and code cleanup

* Apply fixes from StyleCI

* Lint fixes

* Add missing SnmpResponse->pluck() code

* Update db_schema.yaml

* Fix bad test data

* Another instant-on update

* oops

* Remove some unused code

# Conflicts:
#	includes/html/pages/device/overview.inc.php

---------

Co-authored-by: Tony Murray <murrant@users.noreply.github.com>
2024-08-21 01:12:09 -05:00
Tony Murray
343a979f5c Remove c3kxbar (#16304)
it is very old and there is no test data for it
Could be easily added back if someone still uses it
2024-08-20 09:01:07 -05:00
Tony Murray
70c2c543f3 Plugin Update (#16291)
* Plugin Update
Extract interfaces for use in plugin packages

# Conflicts:
#	composer.lock

* Fix some issues
settings_view -> content_view
2024-08-15 15:26:47 -05:00