Commit Graph

7536 Commits

Author SHA1 Message Date
Fehler12
8d863fbc83
Cisco SB/CBS environment sensors (#14154)
* Update ciscosb.yaml

Added detection for environment sensors (FAN and PSU) for cisco small business devices

* Added test data

* Update ciscosb_sg550x-8f8t.json

Korrektur Übertragungsfehler

* Update ciscosb_cbs250-24p-4x.json

* Update ciscosb_cbs250-24p-4x.json

* Update ciscosb_cbs250-24p-4x.json

* Update ciscosb_cbs250-24p-4x.json

* Update ciscosb_cbs250-24p-4x.json

Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-08-07 20:12:07 -05:00
Mar974
8179cd90b6
ns-bsd updated for SNS LTSB 3.7.19 (#14060)
* Update ns-bsd.yaml since SNS updated LTSB 3.7.19

Since the LTSB version of the stromshield OS in 3.7.19 (and also in last version in 3.7.20) the stormshield firewall are seen as a generic device.

The objectID in the MIB as change from ".1.3.6.1.4.1.8072.3.2.8" to ".1.3.6.1.4.1.11256.2.0" 

see https://github.com/librenms/librenms/issues/12915

Tested on SNS 3.11.10

* Update ns-bsd.yaml for new and old sysObjectID

The sysDescr contain the serial number, exemple NS-BSD SN510XXXXXXXX amd64 so we need to keep the regex

* Update ns-bsd.yaml

* changed the array to multiligne

* Create ns-bsd.snmprec

* Update ns-bsd.snmprec

Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-08-07 20:02:13 -05:00
Peca Nesovanovic
1be8de0b24
[apps] Docker only show current containers (#14152)
* [apps] enable RRD filename filtering

* count/exists

* Switch to Applications table

* rework similar to zfs

* Update docker.inc.php

Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-08-07 14:50:46 -05:00
electrocret
478d800384
View Ports in Portgroups (#14141)
* Add group case

Add group case for portgroup URL query

* Add PortGroups to MenuComposer

* Add PortGroups to Menu blade

Adds to menu blade, using a similar behavior as Locations.

* Make PortCount into link

Make port count into like similar to DeviceGroups device count.

* Update MenuComposer.php

Make StyleCI happy

* Update MenuComposer.php

Make StyleCI happy

* Update ports.inc.php

Make StyleCI happy

* Update menu.blade.php

Menu fix.

* Update Menu so Manage Groups always displays.

* Adding Group function

* Add group to filterFields

* Trying suggested change

* Subquery

Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-08-07 14:49:57 -05:00
Janno Schouwenburg
ebe16a79d1
Fix for number in sensor string (#14185)
* Fix for extracting sensor value from string in poller

* Remove duplicate code

* Update microsemitime.json

Co-authored-by: Maikel de Boer <mdb@tampnet.com>
Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-08-07 14:49:38 -05:00
Ambroise
c807e409d9
add the possibility to monitor redis application through the unix-agent (#14182) 2022-08-07 12:05:28 -05:00
Albert Siersema
1d53679a64
fixes #14104 polling BGP peers in non-default VRF (#14105) 2022-08-07 09:22:39 -05:00
Ambroise
c25629343f
Fix error between application module and unix-agent (#14177)
* It seems that after the PR #14087, the variable $agent_data is not
accessible anymore in applications script.

Just add the line `global $agent_data` at script start solve this issue.

* It seems that after the PR #14087, the variable $agent_data is not
accessible anymore in applications script.

Just add `$agent_data` to the use in the applications polling script start solve this issue.

Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-08-04 19:17:18 -05:00
Zane C. Bowers-Hadley
b827e2bbbd
add support for Sagan (#14070)
* add sagan instance fetch function

* add sagan discovery

* add sagan poller

* add sagan graphs

* add graph sources

* add sagan to apps page

* remove alert

* more app graph work

* polling fix

* re-order keys and add alert key

* correct field key usage

* add alert and fix a missing unit

* more unit fixes

* add alert status

* add alert rules for sagan

* fix a missing : after S while I am here in the json stat tool helper... also add tests

* now add the tests

* add docs

* point php-cs-fixer at two files

* remove-unneeded sagan instance fetch function

* convert to use app_data

* style fix

* apply bennet-esyoil's suggestions here as well

* update for the new app model

* convert poller to the new method

* convert the sagan device app page

* convert sagan

* doc cleanup
2022-08-04 18:12:34 -05:00
electrocret
1d1b2b1c8b
Ports by device group (#14175)
* Add devicegroup filterFields

* add Devicegroup to post function

* StyleCI

* Add GUI Element

* Less wordy

Dropped "View" from the link. Made it too wordy for such a small GUI insertion.

* Moved DeviceGroup Ports link to a separate column

I realized how it could be confusing to have links to two different items in the same column, so I separated the Ports out.
2022-08-04 18:09:21 -05:00
O Palivan
06e699d5e8
Fix unnecessary Updates of DB when values are equal (#14179)
* Fix unnecessary Updates of DB when values are equal

* Fix unnecessary Updates of DB when values are equal (style)
2022-08-04 18:01:51 -05:00
Ambroise
0f37f68bfd
Add possibility to monitor the php-fpm service with the unix agent and (#14173)
not only with SNMP agent

Co-authored-by: Ambroise Rosset <ambroise.rosset@unil.ch>
2022-08-03 08:31:06 -05:00
Martin22
b124008614
Change state_name for Racoms modulation (#14174) 2022-08-02 16:17:53 -05:00
Peca Nesovanovic
403202efa4
empty Outages tables (#14167) 2022-08-02 16:15:42 -05:00
Jellyfrog
670f964e98
Validate: use "database version" instead of "mysql version" (#14158)
* Validate: use "database version" instead of "mysql version"

* wip

* wip
2022-07-29 11:36:18 -05:00
Tony Murray
8508710e62
Stats: Collect OS distro and LibreNMS version (#14138)
* Stats: Collect OS distro and LibreNMS version

Add os distro/version and LibreNMS version to stats collection.

To view stats: https://stats.librenms.org

* style/lint fixes

* Put debug where it will work

* One call sends int, which is ok
2022-07-29 08:53:41 -05:00
rhinoau
d248e6561f
Standardize device and device group maintenance API (#14153)
* Standardise device and devicegroup maintenance API

* styleci fixes
2022-07-28 11:38:46 -05:00
Quentin Schoemaker
f1ff2ee983
Added support for CheckPoint 1100, 1450 & 1490 models. (#14074)
* Added support for CheckPoint 1450 & 1490 models.

* Added test data for CheckPoint 1100, 1450 & 1490 models.

* Make change

* Moved sysObjectID to the right place.

* Update gaia.yaml

Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-07-27 11:19:13 -05:00
Nash Kaminski
e485244d2b
Add additional sysObjectIDs for all known variants of Arista 7130 (#14144) 2022-07-27 14:03:40 +02:00
Tony Murray
a06eaa4767
Fix eventlog filtering (#14136)
Was sending device_id = 0 for all devices when it should have been device_id = null
2022-07-25 09:01:22 -05:00
Tony Murray
7071db98a5
Merge netmanplus and riello and improve device support (#14125)
* merge netmanplus and riello

* Fix icon and hardware
2022-07-24 20:11:01 +02:00
Tony Murray
5c958937b3
Solid Optics EDFAMUX support (#14129)
Workaround a bad SNMP implementation
2022-07-24 20:10:15 +02:00
Konstantin
e497ee77b8
Eltex MES 2324p Add (#14135) 2022-07-24 20:04:56 +02:00
Zane C. Bowers-Hadley
0bbcde1227
add the ability for storing app data to prevent spamming of the event log via via component usage (#14087)
* initial work on add the ability to save/fetch app data

* update to use get_app_data for ZFS

* update the poller for the new app_data stuff

* ZFS now logs changes to pools

* add schema update for app_data stuff

* small formatting fix

* add a missing \

* now adds a column

* sql-schema is no longer used, so remove the file that was added here

* misc cleanups

* rename the method in database/migrations/2022_07_03_1947_add_app_data.php

* hopefully fix the migration bit

* add the column to misc/db_schema.yaml

* more misc small DB fixes

* update the test as the json column uses collat of utf8mb4_bin

* revert the last change and try manually setting it to what is expected

* remove a extra ;

* update suricata as well

* correct the instance -> instances in one location to prevent the old instance list from being stomped

* remove a extra ;

* update fail2ban to use it as well

* remove two unused functions as suricata and fail2ban no longer use components

* style cleanup

* postgres poller updated to use it

* update html side of the postgres bits

* chronyd now uses app data bits now as well

* portactivity now uses it as well

* style fix

* sort the returned arrays from app_data

* correct log message for port activity

* collocation change

* try re-ordering it

* add in the new data column to the tests

* remove a extra ,

* hmm... ->collate('utf8mb4_unicode_ci') is not usable as apparently collate does not exist

* change the column type from json to longtext

* mv chronyd stuff while I sort out the rest of the tests... damn thing is always buggy

* hmm... fix a missing line then likely move stuff back

* style fix

* add fillable

* add the expexcted data for fail2ban json

* escape a " I missed

* add data for portactivity

* add suricata app data

* add app data to zfs legacy test

* put the moved tests back into place and update zfs-v1 test

* add app data for chronyd test

* add app data for fail2ban legacy test

* update zfs v1 app data

* add some notes on application dev work

* add Developing/Application-Notes.md to mkdocs.yml

* add data column to it

* added various suggestions from bennet-esyoil

* convert from isset to sizeof

* type fix

* fully remove the old save app data function and move it into a helper function... the other still needs cleaned up prior to removal

* update docs

* get_app_data is fully removed now as well

* a few style fixes

* add $casts

* update chronyd test

* attempt to fix the data

* more doc cleanup and try changing the cast

* style fix

* revert the changes to the chronyd test

* apply a few of murrant's suggestions

* document working with ->data as json and non-josn

* remove two no-longer used in this PR exceptions

* ->data now operates transparently

* style fix

* update data tests

* fix json

* test fix

* update the app notes to reflect how app data now works

* app test fix

* app data fix for linux_lsi

* json fix

* minor doc cleanup

* remove duplicate querty and use json_decode instead

* style fix

* modelize the app poller

* use a anon func instead of foreach

* test update

* style cleanup

* style cleanup

* another test cleanup

* more test cleanup

* reverse the test changes and add in some more glue code

* revert one of the test changes

* another small test fix

* Make things use models
Left some array access, but those will still work just fine.

* missed chronyd and portactivity

* rename poll to avoid make it any confusion

* Remove extra save and fix timestamp

* save any changes made to app->data

* nope, that was not it

* What are magic methods and how do they work?

* fix two typos

* update linux_lsi test

* change quote type

Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-07-22 16:01:55 -05:00
Konstantin
6e98139cd1
ZTE ZXA10 Update (Added dBm graphs) (#14049)
* First commit ZXA10 Update

* ZTE ZXA10 Update 2

* ZTE ZXA10 Update 3

* ZTE ZXA10 Update 4

* ZTE ZXA10 Update 5

* ZTE ZXA10 Update 6

* ZTE ZXA10 Update 7

* Update, disable snmpbulk

* Update test data

* Remove unneeded php files and update yaml add OLT Tx power too

* Update test data

* Update zxa10.yaml

Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-07-22 15:55:51 -05:00
Tony Murray
52f0dab2f8
Sensors, convert hex to strings (#14121)
* Sensors, convert hex to strings

* Fix clickshare, it actually was returning hex

* update hpe-mapdu

* skip ict-mps sensors without valid values
2022-07-22 07:59:41 -05:00
PedroChaps
07f052738d
Added aos6 vlan discovery file (#14107) 2022-07-21 10:56:56 -05:00
Tony Murray
30cb0a5fb3
Fix maintenance APIs not associating device or group (#14127) 2022-07-21 07:07:44 -05:00
Feras Al-Kassar
e5c91a0f83
Security fixes XSS in oxidized-cfg-check.inc.php and print-customoid.php (#14126)
Signed-off-by: AL-KASSAR <feras.al-kassar@sap.com>
2022-07-20 12:45:42 -05:00
00gh
f66ee182e3
ping_perf.inc.php: changed AVERAGE to MIN to reflect legend. (#14117)
The generated graphs shows wrong legend value for "Min".
It is displaying the calculated AVERAGE value instead of the
calculated MIN.

Changed AVARAGE into MIN.

Co-authored-by: 00gh <00gh>
2022-07-18 18:58:56 -05:00
Alban Browaeys
a6bc7490e2
Fix app docker (#14080)
* docker app: polling - RRD dataset and fields value mismatch

RRD dataset definitions and fields array keys passed to data_update
have to be in the same order. There is no match based on key before
building the rrdtool update command.

Fixes mem_perc ending as NaN because it ended with a value above 100
as it was given mem_limit bytes value.

* docker app - remove misleading divider

The mem_perc and cpu_usage are already in percent, no need to divide
them by a hundred. The values were then made into milli percent or micro
percent.
2022-07-15 09:12:20 -05:00
Bennet Gallein
a9d5c378f7
feat: minor visual changes to the apps-overview page (#14090)
* feat: minor visual changes to the apps-overview page

* fixup! feat: minor visual changes to the apps-overview page
2022-07-12 08:30:00 -05:00
David Girón
94d435eff1
Search device by MAC via URL (#14072)
* Search MAC by GET

* Add address from parsed vars

* Trim tabs and spaces when searching MAC
2022-07-09 04:51:07 -05:00
PipoCanaja
1a211fb636
Revert "Add APC battery operation time polling, including display in WebUI (#14058)" (#14068)
This reverts commit 654f97c302.
2022-06-24 16:58:54 +03:00
Marek Wobst
654f97c302
Add APC battery operation time polling, including display in WebUI (#14058)
* Fetch and store upsBasicBatteryLastReplaceDate

For APC USV, sensor class is 'runtime'

* Change type string for battery's life time

* Change limits to meaningful values, remove debug output

Limits are 4 (warn) and 5 (critical) years, using our own experience.

* Add time calculation for battery life time during polling

This means that the received date is subtracted from current
time, the difference is stored as minutes, just like with discovery.

* Improve sensor description/label (again)

* Correct label for battery's life time to “operating time”

* Add test data for APC UPS to test new used OID

OID for the last battery exchange date, which is used
for calculation the operation time.

* Changes for styleCI

* Fix more files for styleCI

* Remove a duplicated empty line (styleCI)

* Update test data
2022-06-24 02:43:46 +03:00
mostdaysarebaddays
3b12f35b31
Update bgp-peers.inc.php (#14061) 2022-06-22 20:06:07 +02:00
Jellyfrog
ec349f5369
More MIB fixing (#14018)
* Split extreme mibs

* Split HP mibs

* Split juniper mibs

* Split junos mibs

* Split junose mibs

* Update Cisco mibs

* update comware mibs

* update transition mibs

* update extreme mibs

* Remove duplicate cambium mibs

* EXTREME-BASE-MIB > EXTREME-SYSTEM-MIB
2022-06-22 16:46:12 +02:00
Marek Wobst
dc3ddbaff0
Fix the parsing of the temperature unit value (#14056)
CMCIII will yield as temperate unit '°C' (or °F), which is not
'degree C'. The ° isn’t even encoded properly, so an additional
encoding is included for good measure. Both rar and encoded
values are used for the look up.

Previously these values were stored as 'state' sensor entries,
making them sadly utterly useless.
2022-06-21 17:45:27 +02:00
Tony Murray
1056f28de7
Aviat WTM reduce snmp load (#13918)
* Reduce default modules on Aviat WTM to reduce overload
SNMP daemon on these devices can fail easily.  Try to reduce snmp load as much as possible even if it is minor.
It seems they fixed the overload bug (at least some) in 2.11

* update schema
2022-06-15 23:29:57 -05:00
dennypage
8980614031
Fix use of incorrect variable to retrieve current sensor value (#14037) 2022-06-13 13:40:31 -05:00
Tony Murray
89971d71ec
Support Huawei SMU11b (#14029)
fixes #13661
Without creating a new os
2022-06-10 20:49:57 -05:00
David Girón
46899d1643
Custom OID processing of numeric strings with filters (#13968)
* Custom OID processing of numeric strings with filters

* Fix syntax

* Refactor ajax customoid code
2022-06-10 16:24:50 -05:00
Bennet Gallein
8fdd1be3a0
feat(apps/mysql): add error-state to non-responsive mysql-servers (#13993)
* feat(apps/mysql): add error-state to non-responsive mysql-servers

* feat(alerting): add alert-rule for offline mysql-servers

* fixup! feat(alerting): add alert-rule for offline mysql-servers

* chore(style): replaced ticks

* fixup! chore(style): replaced ticks

* feat: added migration to make app_status field bigger

* feat: moved error-detection to the application_update function

* fixup! feat: moved error-detection to the application_update function

* chore: updated schema

* chore: fix styling

* Cleaner way to handle the error states

* regex should not include OK

Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-06-10 16:22:41 -05:00
hjcday
30da27256b
Update Teltonika Sensors for FW R_00.07.02 (#14012)
* Updated MIB

* Add I/O state monitoring, bytes transferred couter

* Update snmprec data

* Update rutos-rutx_rutx11.json

Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-06-07 22:34:39 -05:00
Tony Murray
b8f2002150
Procurve hardware description cleanup (#14007)
* Procurve hardware description cleanup
Include part number and other details where available
Covers 100% of known sysDescr
Adds Aruba Instant On parsing
adds string replacements for OS fields

Could use hardware: ENTITY-MIB::entPhysicalDescr.1, but strings contain a lot of fluff and some are just "HP", I leave that for another PR

* restore .gitignore.........

* less specific

* Change regex cosmetically
2022-06-07 09:27:32 +02:00
Kevin Wallace
1b1859051f
Add additional OpenBSD PF graphs (#13963)
* Add additional OpenBSD PF graphs

Some of these were already present for PFSense (matches, badoffset,
fragmented, short, normalized, memdropped) and reuse existing graph
types; the others are are added as new types.

* collect-snmp-data.php: support IPv6 hosts

* Add SNMP data for new OpenBSD OIDs

* Stack all OpenBSD PF drops into a single graph/rrdfile

* Pull additional drops in to pf_drops

The MIB descriptions don't say "drop", but reading the OpenBSD source:

c471a73b65/sys/net/pfvar.h (L1196)

it's clear that badoff, frag, short, and norm are all drop reasons.
Pull them in into the stacked drop graph, too.

* ./scripts/save-test-data.php -o openbsd -v pf

* Include device_graphs in saved os module test data

* Revert "Include device_graphs in saved os module test data"

This reverts commit a85c902fe9.

* Update to use SnmpQuery

Co-authored-by: Kevin Wallace <kevinwallace@users.noreply.github.com>
Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-06-06 23:49:42 -05:00
Tony Murray
52f70d6bcf
Fix printer count sensors when extra garbage. (#14014)
Remove double include
2022-06-06 23:14:10 -05:00
Nash Kaminski
acfd09287a
Add support for Cisco Nexus 3550 series (formerly Exalink Fusion) devices (#13992)
* Add support for Cisco Nexus 3550-F (formerly Exalink Fusion) devices

* Refactor to refer to the Exalink Fusion as the Cisco Nexus 3550 (post m&a of Exablaze by Cisco) as well as use YAML based OS discovery

* Rename Cisco N3550 ports include

* styleci fixes to n3550 ports include

* Correct N3550/Exalink OS discovery and improve tests

* Improve N3550 OS discovery and poller support

* styleci

* Rename Cisco Nexus 3550 OS from ciscon3550 -> exalink-fusion

* Update file header
2022-06-04 15:39:21 -05:00
Tony Murray
2f4c7ce401
Remove DefaultWidgetSeeder (#14006)
* Remove DefaultWidgetSeeder

* Fix style
2022-06-04 13:11:44 -05:00
Sebastian Heiden
faaca7e6f4
Fix OS Detection for USW-Flex-XG (#13999)
* Fix OS Detection for USW-Flex-XG

* Only include OS module
2022-06-01 00:41:04 -05:00