Commit Graph

500 Commits

Author SHA1 Message Date
Justin Lentz
678213fa15
Remove api_demo config setting (#15563)
* Update settings.php

* Update config_definitions.json

* Update settings.php

* Update settings.php

* Update settings.php

* Update settings.php

* Update settings.php

* Update settings.php
2023-11-11 00:26:37 -06:00
Tony Murray
7c006e9625
Disable GET login by default (#15558)
* Disable GET login by default
GET login allows users to put username and password in the url, this is helpful for displays where you cannot login interactively.
Unfortunately, the plaintext password will be in the access logs.
GET login also allows brute force attacks against your install.

* Apply fixes from StyleCI

---------

Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-11-07 16:25:28 -06:00
Tony Murray
cefbe901e4
Wifi module does not exist anymore, delete (#15549) 2023-11-05 20:24:59 -03:00
William Edwards
df46a77cd9
Increase max package name length to 128 characters (#14895)
* Increase max package name length to 80 characters

One of my packages has a name of 65 characters. LibreNMS limits package names to 64 characters (`varchar(64) NOT NULL`). As the name of my package is truncated, polling fails with the following error:

```
Error polling unix-agent module for http-jglt01.gmdo.ha.cyberfusion.cloud. PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '458-python3-cyberfusion-cluster-configurations-redirect-fast-...' for key 'packages_device_id_name_manager_arch_version_build_unique' in /opt/librenms/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:117
```

There is no well-defined max package name length. An email on the `debian-devel` mailing list (https://lists.debian.org/debian-devel/2011/04/msg00981.html) states that the length of package names should not exceed 40 characters, and that the length of file names should not exceed 90 characters, but these limits are not enforced. Lintian does not check package name length, but does check that file name length does not exceed 80 characters (tag 'package-has-long-file-name').

Summarised: there are no well-defined and enforced limits, and those that Lintian advices differ from the aforementioned post on the `debian-devel` mailing list. Therefore, I have landed on the semi-random limit of 80 characters (which the original limit of 64 characters seems to be as well).

* Create 2023_11_04_125846_packages_increase_name_column_length.php

* Update db_schema.yaml

---------

Co-authored-by: Tony Murray <murraytony@gmail.com>
2023-11-04 14:37:53 -05:00
Wheel
f0bbab2419
Minor fix and tweak for graylog integration (#15455)
* Minor fix and tweak for graylog integration

* More flexible in other use cases

* fix again?
2023-11-01 22:35:44 -05:00
Peter Childs
828be4bb52
add auth_ldap_cacertfile and auth_ldap_ignorecert options (#15526)
* add auth_ldap_cacertfile and auth_ldap_ignorecert options

* style-ci
2023-11-01 20:48:44 -05:00
Tony Murray
9c2d2cd412
OSPF tables fix integer types (#15528)
All Counter32 and Gauge32 types should be unsigned integers to match the range that can be returned via snmp
2023-10-31 10:11:56 -05:00
Tony Murray
6bc8a504bb
Plugin update (breaking) (#15498)
* Plugin update (breaking)
A couple breaking changes regarding property types and method arguments.
Add a setting to allow plugin errors to be shown instead of automatically disabling the plugin.
All default hooks now use Dependency Injection to make it easy to get access to whatever you need (such as settings)
Add a ton of comments and examples in the PHP code.
Expand a bit on the documentation, it could still use more help
Fix a bug in the settings and page view where the included blade file was output before the page headers, etc

* Apply fixes from StyleCI

---------

Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-10-29 22:45:23 -05:00
Tony Murray
cdb0ff8ea8
Cisco ASA table add alert defaults (#15488)
Fixes issue when values weren't set
Can't set an upper limit since models are different
Also, no way to set this in the webui and the default alert rule doesn't use the values, so yeah, probably could have deleted the fields.
2023-10-20 08:43:16 -05:00
Tony Murray
43bc857a5c
Fix auth_ad_url validation (#15487)
Improve the validation, but try not to be too strict.
Allow IPv6 addresses too
2023-10-20 07:29:56 -05:00
Tony Murray
7a8e479b61
Unix Agent and Application fixes (#15460)
* Unix Agent and Application fixes

* Apply fixes from StyleCI

---------

Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-10-16 03:40:40 -05:00
Tony Murray
6ccb17e4ea
Restore _delta fields to signed (#15458) 2023-10-15 13:14:19 +02:00
bnerickson
78a4bfb9d9
Adding Socket Statistic Application Support (#15307) 2023-10-13 22:45:03 -05:00
SourceDoctor
0f0f49697f
muteabel acknowledged alert notifications (#15456) 2023-10-13 22:20:51 -05:00
Tony Murray
df88899873
Change port and BGP stats fields to unsigned (#15449)
Should match the value ranges we can receive from snmp now.
2023-10-12 22:42:36 -05:00
Tony Murray
0540c56d0f
Add application metrics model and relationships (#15417)
* Add application metrics model and relationships

* update schema check file

* Add missed index

* Update testing definition

* sqlite can't create the id later

* update schema dumps

* update testing_persistent schema

* update baseline
2023-10-12 02:24:27 -05:00
Tony Murray
ac23c133d9
Fix an agent bug if a process ran more than 999 days (#15411)
* Fix an agent bug if a process ran more than 999 days
Increase it to 274 years before that happens ;)
Fix a few other small bugs

* Update schema check file
2023-10-07 20:14:00 -05:00
Tony Murray
087d588102
Vmware vminfo modernize (#15008)
* Vmware vminfo
Remove legacy file and migrate to OS discovery

* tighter

* ios_stp-vlans working correctly now

* Make vmwVmGuestOS nullable

* Discover os info too

* VM Info module

* Apply fixes from StyleCI

* Fix log severity

* Fix log severity (more)

* VM Info module

* Poll with ESXi too because it is lightweight
add test data

* poller data now too

---------

Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-10-05 19:49:26 -05:00
Tony Murray
bec7a9f449
Throttle error reporting (#15391)
* Throttle error reporting
Sets how frequently errors can be reported (across all pollers)
Also has the side effect of at most 1 error reported per run
To disable, set reporting.throttle to 0 (for development and testing purposes)

* Don't crash if Cache provider is unavailable, refactor
2023-10-05 17:24:28 -05:00
Tony Murray
c1258320f8
Availability module fixes (#15369)
* Refactor poller to allow modules to run even if the device is down
Include core in config (but not webui) to avoid silly shenanigans
Inject datastore into polling

* Needed to split datastore interface

* Cleanup some data_udpate() references

* Apply fixes from StyleCI

* Fix legacy poller :D

* Output to the correct stream

* Fix lint issues

* Apply fixes from StyleCI

* Fix discovery not including core and submodule handling

* Use whereRaw

---------

Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-10-04 10:32:59 -05:00
Tony Murray
c6d815999f
Rearrange AD auth settings (#15363)
so it makes more sense, add missing settings
2023-10-04 02:08:56 -05:00
Tony Murray
b51ae39e71
Radius enforce roles (#15294)
Add new setting to specify if user roles will be set at login or not.
Without this setting enabled, roles are only set when the user is first created and never after that. If roles set via Filter-ID attribute or radius.default_roles change, they will never be reflected on existing users.
For that reason, the default is set to enabled.  Historically, radius did not enforce roles.
2023-09-07 11:28:35 -05:00
Zane C. Bowers-Hadley
2618a99be5
Application Soft Delete (#15270)
* add the softdeletes migrations for applications

* add working migration file

* add deleted_at to db schema.yaml for applications

* update includes/html/forms/application-update.inc.php to work with softdeletes

* update includes/html/pages/device/edit/apps.inc.php for softdelete

* update includes/discovery/applications.inc.php to work with softdelete

* minor updates to application-update.inc.php for disabling

* style cleanup

* set discovered when running discovery

* update application tests to include deleted_at

* add deleted_at to a missed test

* a few more tweaks for opensips

* add a missing deleted_at for linux_suricata_extract-v1

* fix fillable for Application model

* massive cleanup of the application update widget thingy

* improve the code for discovery and using Laravel

* add a missing line to app/Models/Application

* add a missing include to app/Models/Application.php

* record includes for Application model

* remove apps from the applications table when a device is deleted

* revert to using upcert and where for discovery to fix CI

* make discovered fillable and set it when running discovery... convert back to firstOrNew

* clean up application discovery a bit and use observer

* style fix

* spelling fix... disablaed -> disabled

* rever removal to just use where

* cleanup app removal on delete

* add restored to ModuleModelObserver

* delete -> forcedelete fix

* apply the suggested changes

* use murrants other suggestion

* style fix
2023-09-06 16:34:39 -05:00
Zane C. Bowers-Hadley
6dbfbe99bc
for the applications table set the defaults for app_instance and app_instance to '' (#15278)
* add migration file for new defaults for applications table

* update the db_schema yaml and tweak the migration so it does not change the varchar size for app_status
2023-09-01 15:01:12 -05:00
Tony Murray
2cd207028a
Implement RBAC (only built in roles) (#15212)
* Install bouncer

* Seeder and level migration

* Display and edit roles

* remove unused deluser page

* Update Radius and SSO to assign roles

* update AlertUtil direct level check to use roles instead

* rewrite ircbot auth handling

* Remove legacy auth getUserlist and getUserlevel methods, add getRoles
Set roles in LegacyUserProvider

* Small cleanups

* centralize role sync code
show roles on user preferences page

* VueSelect component WIP and a little docs

* WIP

* SelectControllers id and text fields.

* LibrenmsSelect component extracted from SettingSelectDynamic

* Handle multiple selections

* allow type coercion

* full width settings

* final style adjustments

* Final compiled assets update

* Style fixes

* Fix SSO tests

* Lint cleanups

* small style fix

* don't use json yet

* Update baseline for usptream package issues

* Change schema, not 100% sure it is correct
not sure why xor doesn't work
2023-08-28 00:13:40 -05:00
Tony Murray
3b7185d825
Fix manual port speed storage (#15238)
* Fix port speed setting
Due to a bug all manually configured port speeds were lost and will need to be reconfigured.
This allows them to work in a way that will prevent that issue in the future by storing the speed with the override.
Includes notification.

* Fix date

* Add URL

* Spelling fix
2023-08-21 10:48:13 -05:00
Justin Lentz
6ad3ff9b97
change leaflet.default_zoom to Float (#15207)
Leaflet accepts float for default zoom.
2023-08-08 11:36:23 +02:00
Tony Murray
12f8bb2040
MAC Vendor OUI use scheduler (#15187)
* MAC Vendor OUI use scheduler
Add command to update `lnms maintenance:fetch-ouis`
Show vendor column in tables if mac_oui.enabled is set to true
Improve scheduler validation handle non-standard install directories and systems without systemd
Add index to table to improve speed and improve mac->vendor lookup speed
Scheduled weekly with random wait to prevent stampeding herd issues for upstream
drop oui update from daily

* MAC Vendor OUI use scheduler
Add command to update `lnms maintenance:fetch-ouis`
Show vendor column in tables if mac_oui.enabled is set to true

* Lint fixes and better prefix detection

* update schema file
2023-08-03 19:29:30 -05:00
Jellyfrog
5a56e9081e
Use Laravel schema migration command directly (#14039)
* Add new schema migration command

* Apply fixes from StyleCI
2023-08-03 19:26:48 -05:00
Justin Lentz
f72656249f
Fix alert.macros.rule (#15172)
* Add alert.macros.rule config_definitions.json

* Update config_definitions.json

* add validation
2023-07-31 22:26:47 -05:00
Justin Lentz
90b16bab81
port_error_perc macro (#15016)
* port_error_perc

* Update macros.json

* Update macros.json

* Update querybuilder.json

* Revert

* Update macros.json

* Change macro names so they match usage_perc

* Try *100.0

* Attempt 2 - Encapsulate in parenthesis

* Undo Parenthesis

* Trying laf's suggestions

* Update QueryBuilderFilter.php
2023-07-31 22:26:21 -05:00
Tony Murray
a2f906c3f4
Allow dispatcher service master timeout to be set (#15161)
and increase default to 20s from 10s
20s should still be fast enough to prevent gaps, but larger installs can take longer than 10s (or even 20s) to do dispatch work.
2023-07-25 11:27:34 -05:00
Zane C. Bowers-Hadley
40cceee8b4
update SMART monitoring to the use JSON (#15132)
* rework into a json app and support the old style

* working now

* add health checking

* add some datapoints to make writing alerts easy

* add a few missing item for has checks

* rework the app page

* use the right var for id9

* print the self test log if we have it

* add a graph for the max temp

* display the max temp graph

* display the health pass in the disk list if we have the data

* fix legacy handling and set app as ok

* replace id190 and id194 with the more useful maxtemp graph on the apps page

* don't print the additional info area for legacy extends

* add id232

* add id252 graph support

* properly display id232 now

* do not display SSD graphs for non-SSD disks

* for legacy extends, make sure we don't have a bad line

* add missing label for Product value

* fix metrics

* rework the metrics stuff a bit more

* typo fix

* more smart metrics cleanup

* add exit info to metrics

* style cleanup and logic checking for when disks are all now fine

* fix checking for no more health errors

* update the docs for SMART for v1 and remove slightly pointless notes about useSN

* update the docs

* initial test stuff

* add missing tests for the legacy code

* save if it it is legacy or not

* style cleanup

* update the smart legacy test

* style cleanup

* more test tweaking

* some more style cleanup

* more test fixes

* correct the disk ID for the legacy test da0 -> Z304VCFY

* more tests update

* more test cleanup

* begin cleanup of the v1 tests

* more v1 test updates

* more tests for v1

* more test cleanup

* fix exit_nonzero and add unhealthy metric

* add smart alerts

* add the metric unhealthy to the stat test

* use app data for the smart-common.inc.php
2023-07-24 17:03:45 +02:00
Andy Norwood
64c4650801
Add FDB table vendor search drop down (#15072)
* Add vendor search and related functions

* Add OUIDB cache for vendor lookup

* Add vendor drop down

* appy style CI changes

* Apply style CI and lint changes

* more styleCI changes

* update type hinting

* Edit mac_oui cache lock name and function

* Update MAC OUI message during daily

* Use DB for vendor lookup

* New vendor_oui table migration

* New MAC OUI to database function

* Update readbleOUI to use DB rather than cache

* Make StyleCI changes

* styleCI tweak

* Remove lock release to allow refresh timer

* change migration name to match table

* add schema dump

* update schema

* styleCI tweak
2023-07-21 11:30:13 -05:00
fbourqui
a978476cda
Fortigate ipv6 ipsec (#15150)
* Squash Commit
Fortigate Mib updates and ipsc ipv6 tunnels stat
test data to go allong with it

* add optional -Ih flag

* lint fix

* revert changeed on test data 500d

* fix test data on 60f3g4g
2023-07-20 07:50:49 -05:00
Zane C. Bowers-Hadley
2ac9a634b4
Logsize monitoring for LibreNMS (#15137)
* add logsize poller

* add set size info

* add more stats

* add min size

* more logsize files

* add logsize

* fix creating log file links

* add two new graphs

* add some graphs

* add no_minus_d

* add no minus d to app page

* add count of log files

* save logsizes in app data

* rename title log sizes

* only show top 12

* add mean median and mode

* cleanup naming a bit

* the values for the files hash is now a int instead of another hash

* add new stats and correct median name

* now properly handle unseen

* fix logsize bits

* add combined

* update metrics and add some tests

* add logsize graphs to apps page

* add the logsize bit

* add logszie docs

* add some example alert rules

* style cleanup

* more style cleanup

* fix a few things for metrics and update the test

* fix a variable name in the test and update the data
2023-07-19 22:02:23 -05:00
Zane C. Bowers-Hadley
00cf300d1a
add Suricata Extract submission stats app (#15105)
* add suricata_extract

* convert from dervive to gauge and use delta

* add suricata_extract to includes/html/pages/apps.inc.php

* graph cleanup

* add sub_size

* add sub_size graph

* add docs for suricata extract

* add tests for suricata_extract

* add rules for suricata extract

* minor test tweaks
2023-06-25 20:48:26 +02:00
Zane C. Bowers-Hadley
5da8e70bf4
add Sneck support, making it very trivial to use Nagios style checks in a NRPE like manner (#13954)
* code stuff done for Sneck

* whoops, correct the abs value post adding it post rrd update

* return a array for getting the sneck data and nicely print the raw return value

* add test stuff and freeze time at 1650911765 for tests

* move the freezeTime

* add use Illuminate\Support\Carbon;

* more test changes

* rework freezeTime a bit more

* more test stuff

* another test

* rework it a bit again

* correct variable spelling for $time_diff

* remove freezeTime as we are using a old version of Laravel

* finalize graphs

* misc

* finalize sneck page

* mve the sneck tests as it needs a newer version of laravel than we are using

* add documents for sneck

* finalize the poller

* formatting cleanup

* correct comment type

* correct the spelling of description

* more documentation

* save the check returns as metrics

* add some more examples

* fix some of the sneck alerts and add a few more examples

* turn off time to polling by default

* suggest using ntp if enabled

* since we are zeroing time_to_polling by default, this now works

* backout some suggested changes for once we change to larval 9

* remove del_sneck_data as it is no longer used

* add more docs on the metrics

* php-cs-fixer to fix a few things

* update and fix sneck tests

* remote a metric from the test

* another minor tweak to the test

* one more minor change

* ahh! derp! think I found it finally... hopefully hanging this for the last time...

* now use app data

* now logs check changes

* add a missing )

* add a missing )

* some style fixes

* update the sneck page use to the app data stuff

* update the poller to use the new app data

* misc

* update sneck to log check status changes

* correct alert log messages

* correct a comment

* fix metrics

* derp, another fix

* test fix

* re-order to avoid warning

* poller update

* update sneck graphs

* update sneck graphs

* remove a unneeded line

* test update for discovery

* minor tweaks to the test and fix update the polling a bit

* style fix

* fix return data printing

* fix the test data to include app data

* attempted test fix

* add config def to apps.sneck.polling_time_diff

* cleanup docs a bit

* minor config tweaks

* minor doc cleanup
2023-06-15 09:06:28 -05:00
Zane C. Bowers-Hadley
3190bdb8b2
add ZFS L2 support (#15095)
* add alerts for ZFS

* add initial l2 bits to the poller for zfs

* more minor tweaks to the ZFS poller

* more zfs bits

* add new ZFS graphs

* begin adding L2 stuff

* add linux_zfs-v3 bits

* update zfs app page

* style fix

* update the data for the zfs legacy test

* test update for zfs v1

* fix some zfs tests

* more zfs v3 test cleanup

* another zfs v3 test data fix

* more zfs v3 test data cleanup

* more test tweaks
2023-06-11 16:32:28 +02:00
Jellyfrog
2b3575a5e9
Laravel 10.x Shift (#14995)
* Apply code style

* Remove explicit call to register policies

* Shift core files

* Shift config files

* Default config files

In an effort to make upgrading the constantly changing config files
easier, Shift defaulted them and merged your true customizations -
where ENV variables may not be used.

* Bump Laravel dependencies

* Add type hints for Laravel 10

* Shift cleanup

* wip

* wip

* sync translation

* Sync back config

* Public Path Binding

* QueryException

* monolog

* db::raw

* monolog

* db::raw

* fix larastan collections

* fix phpstan bug looping forever

* larastan errors

* larastan: fix column type

* styleci

* initialize array

* fixes

* fixes

---------

Co-authored-by: Shift <shift@laravelshift.com>
2023-05-24 22:21:54 +02:00
Tony Murray
04bb75f5f3
Alert transport cleanup, no_proxy support and other proxy cleanups (#14763)
* Add no_proxy and other proxy related settings
Set user agent on all http client requests
Unify http client usage

* Style fixes

* Remove useless use statements

* Correct variable, good job phpstan

* Add tests
fix https_proxy bug
add tcp:// to the config settings format

* style and lint fixes

* Remove guzzle from the direct dependencies

* Use built in Laravel testing functionality

* update baseline
2023-05-23 09:25:17 -05:00
Tony Murray
b19c783f04
Fix timetaken columns too small (#15042) 2023-05-16 07:04:09 -05:00
bnerickson
56e9fa3742
Adding linux_config_files application support (#14776) 2023-05-09 10:23:49 -05:00
Tony Murray
cafdec6285
Remove unused port fields (#14963)
* Remove unused port fields
(and set vlan to default to null)

* Update test data for deleted fields

* update vlan to null

* missed field removals

* More correct migration

* Update new data

* restore accidental deletions
2023-04-14 16:47:26 -05:00
Justin Lentz
df31be30c1
Cleanup enable bgp setting (#14931)
* remove logic in module

* remove enable_bgp logic

* remove enable_bgp logic

* remove enable_bgp logic

* remove enable_bgp logic

* remove enable_bgp definition

* remove enable_bgp logic

* Remove enable_bgp documentation

* StyleCI

* StyleCI

* StyleCI

* StyleCI

* StyleCI

* StyleCI

* StyleCI

* StyleCI

* StyleCI

* StyleCI
2023-04-06 21:01:21 -05:00
Dan Baker
a340672e86
Added graphing of DDoS-protection related OIDs for PAN-OS (#14847) 2023-04-06 19:11:16 -05:00
Tony Murray
d3f02e6bb7
SnmpQuery, respect snmp.max_oid (#14894)
Previously, the code would query all the oids it received. Now it will split it up into multiple queries if too many are sent.

Prevents some devices snmp service from crashing.
2023-03-13 10:17:34 -05:00
Zane C. Bowers-Hadley
cd82c72190
add graph_stat_percentile_disable config item to disable percentile lines/value printing (#14887)
* add the initial config items for graph_stat_percentile_disable

* update generic stats to use graph_stat_percentile_disable

* style fix
2023-03-09 17:24:32 +01:00
Zane C. Bowers-Hadley
19278bf19f
update fail2ban to have better stat graphs and and fix generic_stats graph.php (#14818)
* update fail2ban better stat graphs

* style fix

* add rainbow color pallete

* cleanup colors and make it more easily understandable via using the new rainbow colour pallete

* a bit more color tweaking

* green is easier on the eyes

* style fix

* fix hgandling for smaller graphs for some things

* for <= height graphs, use area

* rework the area bit and add a alpha

* style cleanup

* more style cleanup

* mm... colourA does work a lot nicer if the same as colour

* add two more palletes and make the purple the default

* only include 1d once as that as some versions of rrd break if it is twice

* move time_diff to the proper location
2023-03-02 18:51:16 +01:00
Tristan Rhodes
d3da5d3ae6
Update XDP string to exclude modern Cisco lightweight APs from discovery (#14803) 2023-01-31 22:57:20 +01:00
Skylark
437479382f
adding Fortigate switches to Oxidized model mapping config (#14782) 2023-01-12 09:13:08 +01:00
Tony Murray
8ea3f5cd06
Offer opt in to usage and error reporting during install (#13906)
and on the about page
2022-12-15 19:52:22 -06:00
bnerickson
f539c3f7f5
Adding sample alert for systemd application (#14711) 2022-12-09 00:56:02 +02:00
Tony Murray
4b65dc41d2
Graphing cleanup (#14492)
* WIP

* Fixes and cleanups

* Move parseAtTime to Time util class

* lint fixes, explicitly define variables

* Style fixes
2022-10-28 08:06:29 -05:00
electrocret
b450f5e543
Fix sensor limit linked port rules in collection(#14520)
Escape the sensor_limit properly
2022-10-25 23:00:36 +02:00
PipoCanaja
8e3fe223ef
Sensors - Allow changing RRD type in YAML and PHP sensor discovery (#14208)
* new row variant

* syntax

* syntax

* DB

* syntax

* schema

* test

* allAdvaTests

* Tests

* Tests

* Tests

* missingMigration

* missingMigration

* Tests

* Tests

* Tests

* Tests

* tests

* tests

* tests

* tests

* tests

* test

* fix_Aos7

* fix snmprec arista

* fix snmprec arista

* fix snmprec arista

* tests

* merge_fix

* aos7 backslash

* aos7

* more

* more

* defaultValue

* arista

* typehint

* tests

* tests

* voss

* aos7

* aos7

* aos7

* testWithoutarista-mos_metamux48-c-0-16.json

* tests

* ciscosb

* new tests with 2004 and only sensors module

* adding wireless module again

* adding wireless module again (cont)

* airos

* aos7

* arista

* arista

* bdcom

* fortigate

* fortigate

* fortigate

* ftos

* ftos

* tests on 1804

* tests once more

* tests once more, cont

* tests once more, cont

* tests once more, cont

* tests once more, cont

* tests once more, cont

* more

* bdcom

* comware

* edgeosolt

* enexus

* arista-mos

* removeAristaAgain

* ies500_manual_edit

* ies500_manual_edit

* mni

* volius

* zywal

* manually imported arista-mos

* manually imported arista-mos

* arista-mos test is triggering something ...

* restoreArista

* tests

* tests

* aristamos

* ies52xxM_4206.json

* revert linux_supermicro.json

* revert linux_supermicro.json

* benuos

* fortiadc

* rnx-updu
2022-10-25 08:31:02 -05:00
Tony Murray
ae3925b09a
Fix memcached unserialize vulnerability (#14459)
Allows code injection, so remove it entirely.
This requires a memcached application script to restore functionality.

https://github.com/librenms/librenms-agent/pull/428
2022-10-16 11:15:17 -05:00
Kayck Matias
1f54fc786a
Update ports_purge docs and definitions (#14402)
* Update ports_purge docs and definitions
* Translate
2022-09-30 18:48:39 +02:00
Skylark
7aeb238b7f
Oxidized "allow purpose and notes" (#14352)
error:
  "The value.group contains invalid keys: purpose,notes. Valid keys: hostname,sysName,sysDescr,sysObjectID,hardware,os,location,ip"

when running:
  lnms config:set oxidized.maps.group.purpose.+ '{"regex": "/^lon-sw/", "value": "london-network"}'
  lnms config:set oxidized.maps.group.notes.+ '{"regex": "/^lon-sw/", "value": "london-network"}'
2022-09-15 11:20:25 +03:00
Tony Murray
881d581448
Fix existing, oops (#14332) 2022-09-09 15:12:02 -05:00
Tony Murray
6b1ae1dbf0
Do not allow sysDescr to be fetched in os module yaml (#14331)
It has already been fetched, use sysDescr_regex
2022-09-09 15:05:37 -05:00
PipoCanaja
53bfb24ef9
Migrate xDSL code to module, and add support for VDSL2 MIB (#14207)
* use component to discover if xDSL polling is needed

use component to discover if xDSL polling is needed

* Components OK, Polling in correct files, no DB for VDSL

* GUI

GUI_suite

* per port as well

* rename

* interface listing

* draytek_snmpsim

* fix arraymerge

fix names and max value

* schema

schema

style

* remove one dbFetchRows

remove 2x dbFetchCell

style

style

remove Legacy dbFetchRow

tests

tests

eloquent

more eloquent

more eloquent

one more gone

* fix properties access

eloquent_insert_update

style

tests

tests

tests

tests

* tests

tests

tests

* adslLineCoding

* Models

* fix not nullable cols in DB from code

default values

typo

rename

typo

schema

fix

fix

vdsl fix now

typo

typo

fix size

fix size

* Power values for VDSL

Power values for VDSL

Power values for VDSL

DB

* cleanup

* Rrd::checkRrdExists

* always enable DSL discovery

style

* xdsl module

* cleanup and move to Module

cleanup and move to Module

cleanup and move to Module

cleanup and move to Module

* Fix display

* fix polling and tenth

* remove legacy poller

* Style and Cosmetics

Cosmetics

Cleanup

* Translations

Translations

* exists

exists

* add test support for xdsl

* remove last component call

unused

* translations

* remove non standard onclick event on xdsl line

* Update Discovery Support.md

Update Poller Support.md

toner_gone

* Notification for removal of lnms config:set enable_ports_adsl true

* enable on devices with potential DSL interfaces

* tests are working now

fix teldat tests

* os_schema

* teldat

* move to new module structure

* move to new module structure

* wrong dump function

* wrong dump function

* laravel_through_key hidden

* Update notifications.rss

* Update notifications.rss

Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-09-07 19:29:17 -05:00
electrocret
e458f95bd8
Billing module fix/cleanup (#14309)
* Delete autoadd definitions

Never actually used. Inherited from Observium.

* Allow Billing API to set dir_95th (for agg bills)

Currently we're unable to set dir_95th via API to configure Aggregate bills. This should fix that.
2022-09-06 11:49:15 -05:00
Tony Murray
302a989d4e
Email Transport: embed graphs by default (#14270)
* Email embed graphs

* Allow attachment for non-html
Add setting to webui
Correct $auth setting

* Cleanups, throw RrdGraphException instead of returning an error image.
Generate the error image later, giving more control.
Reduce code duplication a little

* Style and lint fixes
Change to flags

* Add baseline for lint errors I don't know how to resolve

* oopsie, changed the code after generating the baseline

* Tiny cleanups.  Make set DeviceCache primary, it is free.

* Docs.

* email_html note

* Allow control of graph embed at the email transport level to override the global config.

* Allow control of graph embed at the email transport level to override the global config.

* Add INLINE_BASE64 to make it easier to create inline image tags
2022-09-05 20:41:55 -05:00
Tony Murray
ad9868b8b3
Fix issue causing error reporting to be incorrectly enabled (#14292)
for some reason, the reporting.error.dump merged with reporting.error to store an array instead of a bool.
2022-09-04 23:05:36 -05:00
Tony Murray
152bf6e8de
Allow dumping of errors and warnings (#14275)
`lnms config:set reporting.error.dump true`
2022-09-03 20:57:26 -05:00
VTS
6400f88752
sort device types alphabetically (#14244)
* sort device types alphabetically

* fix spacing
2022-08-25 10:48:45 -05:00
Jellyfrog
1dbab5ac7e
Error reporting (#14190)
* Error reporting

* Move code to ErrorReportingProvider
Enable reporting of error (and warning) messages.
report module exceptions

* Restore flare key
Not needed to set late anymore.  We set up filtering before it is initialized.

* Remove unnecessary and maybe double Flare report

* lint

* Cannot use typed properties yet, use phpdoc

* fix handleError return type

* Filter both exceptions and reports (so we don't miss any)
Consolidate the check if reporting should be enabled

* Cache reportingEnabled check for the runtime

* Split out middleware to improve readability
Logging of why reporting is disabled
Fix reportingEnabled cache

* Style

* Return some user data

* Change to class based middleware, it looks nicer

* Fix error page error id report, add url.

* also rewrite intended url

* remove link

* Move ignition to production and update flare-client

Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-08-24 00:33:28 +02:00
Zane C. Bowers-Hadley
55c62b234e
add Opensearch\Elasticsearch monitoring (#14053)
* add new poller

* add a missing ;

* formatting cleanup

* graph stuff and metrics move

* add rrd name

* clean up metrics/rrd def

* more metric/rrd def cleanup

* cleanup

* add basic opensearch graphs

* add opensearch to apps.inc.php

* begin work on opensearch app page

* formatting cleanup

* add translog graphs

* add a missing graph

* fix pending tasks

* add the ability to fetch the saved cluster name

* add fetching the cluster name

* correct the opensearch comment

* add combined shard stats

* add indexing graphs

* correct graph name

* correct some units as being per second

* add more graphs

* add more items for graph sets

* cleanup of units and naming... also more graphs

* more graph stuff

* change the RRD def again and define a few more graphs

* finish basic graph sets

* more graph stuff

* another rrd def change

* add more graphs

* add some more graph sets

* correct unit for c_task_max_in_time

* more graph stuff

* more graph stuff

* correct the unit

* add missing tw_time and another rrd def change

* another unit change

* add trc graphs

* more graph stuff

* add tseg graphs

* add all shards graph to both cluster items

* more graph stuff

* update opensearch app page

* add Opensearch\Elasticsearch app

* add opensearch tests

* run php-cs-fixer on two files

* add alert examples for checking cluster status

* remove an item that was accidentally added as a metric in the test but is not

* derp! thanks jellyfrog

* make it come up as Elisticsearch\Opensearch in the webui

* no longer use components, but app_data, for cluster name change

* update the web side for opensearch for using app_data

* style fix

* update opensearch for new app data stuff

* update to the new Application model

* update poller and device app page for ES/OS

* style cleanup

* update graphs

* test fix

* more test cleanup

* Update alert_rules.json

* begin work on breaking out the RRDs

* update all non-multi rrd graphs for opensearch

* update time_all

* add a unass shards graph

* correct rrd name

* should all be good now

* add missing tm stats

* Un Assigned -> Unassigned

* style cleanup

* another style fix

* remove cluster_name from saved metrics as it is not a metric

Co-authored-by: Tony Murray <murraytony@gmail.com>
Co-authored-by: Jellyfrog <Jellyfrog@users.noreply.github.com>
2022-08-15 14:44:20 -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
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
Tony Murray
9320e6cd06
Prevent duplicate plugin table entries (#14120)
* Prevent duplicate plugin table entries
Some sort of race condition.
Add a unique index, this will cause the create query to fail when it tries to add a new entry for an existing plugin.

* Add index
2022-07-20 15:25:45 +02:00
Dag Bakke
24fc12722b
Add option STARTTLS for authentication via AD (#14051)
* Add option STARTTLS for authentication via AD

* Fix dangling spaces

* Moved starttls code to the correct place

* tabs vs spaces...

* Update ActiveDirectoryAuthorizer.php

Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-07-05 14:53:29 -05:00
Tony Murray
2b67dde6dd
Remove mib poller module remnants (#14077)
fixes #14075
2022-07-01 06:54:50 -05:00
Zane C. Bowers-Hadley
09b63ba90f
Example rules for diskspace on / (#14082)
* add a rule for space on /

* correct copy/paste issue
2022-07-01 10:44:36 +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
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
kruczek8989
69a03bdd39
Update macros.json (#14023)
Add past_20m
2022-06-09 17:46:56 -05:00
Tony Murray
a63166dd0e
Remove traceroute6, it is unused (#14019)
* Remove traceroute6, it is unused
LibreNMS just uses traceroute -6, which is supported on all supported OS, and then some.

* missed some items
2022-06-08 08:52:33 +02: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
32f1ce494e
Dashboard code cleanup (#13996)
* Dashboard Cleanup
Remove static widgets table, list of available widgets should not be in the database.
Remove legacy ajax scripts
Cleanup and reorganize controllers

* reorganize code to put all dashboard things into it's controller
better url scheme while supporting the original

* lint clean ups

* properly formatted language file

* style fixes

* update schema
2022-05-31 08:08:40 -05:00
Holger Hees
3b255edc37
Implement support for usernames coming from reverse proxies (#13894)
* implement support for usernames comming from reverse proxies

* add configurable auth header

* Move implementation to AuthorisationBase class

* refactored default value handling

* fixed external user check
2022-05-24 07:48:19 -05:00
Charly Forot
e34e6e07a5
BGP unnumbered support for Cumulus (#13785)
* Add Cumulus-BGPUN-MIB
* Add bgpPeerIface column into bgpPeers table
* update mysql database for BGP unnumbered support
* Rename BGP unumbered MIB for Cumulus
* remove duplicate Cumulus BGPUM mib
* Use custom BGPUN minb for Cumulus while polling bgp peers
* Update BGP peers discovery for Cumulus with unumbered support
* Update BGP peers polling for Cumulus with unumbered support
* Correct typing error
* Add BGP unumbered Cumulus tests units
* Remove unused SQL file
* Update migrations databse by adding bgpPeerIface into bgpPeers table
* Correct spacing error for continous integration
* Update DB column bgpPeerIface to point to ifIndex
* fix: bgpPeerIface column exist
* fix: use Eloquent instead of dbFetch deprecated
* fix: delete unused namespace
* fix: type bgpPeerIface
* fix: add root cumulus mib lacking
* move root cumulus mib into mibs/
* fix: missing root cumulus MIB
* fix: bgpPeerIface not expected for other OS
* fix: add bgpPeerIface into json tests for other OS
* fix: add bgpPeerIface for poller tests OS
* add relathionship between bgpPeers and Ports tables
* Revert "fix: bgpPeerIface not expected for other OS"
This reverts commit f979482106.
* fix: HasOne not imported
* fix: CI php placement of use line
* fix: bgpPeerIface has not default value
* updates way to fill bgpPeerIface
* remove relationship between BgpPeer and Ipv4Address/Ipv6Address
* fix: CI php syntax
fix: CI php syntax
fix: CI php syntax
fix: CI php syntax
* updates cumulus tests
* updates bgpPeerIface already filled
* fix : bgpPeerIface wrong ifIndex
* fix: update cumulus test for polling bgpPeerIface
* fix: CI PHP syntax
* fix: update cumulus test for polling bgpPeerIface
* fix: update cumulus test for polling bgpPeerIface
* Fix Fortigate Test
* Tests
Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
2022-05-22 14:27:28 +02:00
micko
c3cf527301
Added: auth_ldap_skip_group_check when ldap_compare is not supported (#13926)
* Adding an option (auth_ldap_skip_group_check) to bypass ldap_compare if the server does not support the option

* add auth_ldap_skip_group_check to config_definitions.json

* update resources/lang/en/settings.php

* add missing comma

* rename auth_ldap_skip_group_check to auth_ldap_require_groupmembership and change logic

Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-05-06 16:48:01 -05:00
Zane C. Bowers-Hadley
cdf457fbc5
add Suricata monitoring (#13942)
* add poller

* add a generic alert graph

* add support for .total

* add the initial work on the suricata app page

* add applayer flow sources

* more rrd work and add more fields

* add a missing graph to the suricata page

* add suricata to the apps page

* all working now for suricata

* add some suricata alert examples

* all done with the php

* update the application docs for Suricata

* add another note about Suricata stats in the docs

* add the test file

* add the test JSON

* remove a unneeded newline from the appication docs

* correct the type uptime type

* packets graph should by packets/sec

* minor formatting cleanup

* one more minor formatting cleanup

* shot in the dark to see if something fixes the angry linter

* fix snmpsim file

* add metrics

* add values to the metrics

* add a missing comma to the json

* add a missing line to snmprec and cleanup json a bit

* a few more minor changes to see if this makes it happy... regened via scripts/json-app-tool.php

* see if this will make it happy

* add suricata to app discovery and hope that fixes it... take a shot in the dark as to why the linter errors strangely on two of the files

* fix json

* add a missing ] to the json

* rename two graphs so it does not trigger one alert and add a missing metric

* whoops, *_alertString is not a metric
2022-04-25 20:30:49 -05:00
Tony Murray
d026e9f0cc
Allow unordered OIDs (global and per-os) (#13923)
* Allow unordered OIDs (global and per-os)
Fix global no_bulk setting, was ignored before
(to fix global needed to rework Config::getCombined() a bit to allow a global prefix to be specified)
Removed invalid use of getCombined and updated tests

* fix whitespace

* update os schema
2022-04-21 21:49:26 -05:00
Fehler12
b093d8bd25
Remove non-working Dell specific alert rules from the collection (#13706)
* Removed non-working rules and conditions

Removed non-working Dell alert rules and removed constraints fo state_sensor_warning in order to make this rule working

* Update alert_rules.json

* Update alert_rules.json

Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-04-15 16:59:59 -05:00
William Irvine
5672d10a79
Add ISIS discovery and polling for iosxe devices (#13880)
* Add ISIS discovery and polling for iosxe devices

* remove ModuleModelObserver

* add php stan exclusions as they are already present for the base module

* change port_id to cached lookup

* Create model object instead of using arrays and set properties directly

* remove unneeded space...

* remove null from non nullable field

* revert to extending from ciscowlc rather than os

* remove OS module

* remove phpstan exclusions and fix errors

* add spacing...

* add spacing....

* add spacing

* again...

* Add tests

* Update Iosxe.php

* Update IsisAdjacency.php

* Create 2022_04_08_085504_isis_adjacencies_table_add_index.php

* Update db_schema.yaml

* Update iosxe_asr920.json

* Update Iosxe.php

* Update Iosxe.php

* Update junos_mx5t_isis.json

Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-04-08 16:33:41 -05:00
geg347
a7019bf8f1
Add generic PSU status failed alert rule template (#13821)
* Add Juniper PSU status failed alert rule template

* Converting Juniper PSU failed default alert into a more generic one (Thanks ottorei)
2022-03-13 11:23:04 -05:00
Jellyfrog
09929bd686
Implement OAuth and SAML2 support (#13764)
* Implement OAuth and SAML2 support via Socialite

* Add socialite docs

* fixes

* Additional information added

* wip

* 22.3.0 targeted version

* Allow mysql auth as long as there is a password saved

Co-authored-by: laf <gh+n@laf.io>
Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-02-20 22:05:51 +01:00
Tony Murray
29bd6789cb
Stp module rewrite (#13570)
* STP module rewrite WIP

* Finish rewrite

* Ignore disabled and log root/topology changes

* Remove interfaces for now

* fix style

* Lint fixes

* Document ResolvesPortIds and hide map functions

* whitespace fixes

* Revert to stpInstances in case someone writes mstp support

* missed one

* phpstan fixes

* Handle table and oids separately

* forgot to register observer

* Test data and correct non-table handling in SnmpResponse->table()

* update test

* test data

* revert aos7 silly things

* minimal polling

* Update test data

* order ports_ntp and rename new field to port_index

* forgot the db_schema

* revert ciena-sds port things

* MSTP support, maybe

* Adding test data

* Filter bad lines instead of discarding the entire snmp response
and capture fixes and test data

* fresh data

* add os data

* update data, ignore unfound ports, obviously bad device implementation.

* fixes

* Ignore context files in os detection test

* Remove empty table data

* add ciena-sds vlan

* designatedCost column is too small

* Update stp webui

* Refactor code to interfaces, to allow vendor mibs

* update schema

* fix issues added by abstraction

* STP fixes

* Default to no context for vlan 1

* never store vlan 1

* Update test data

* remove eltex brokenness

* fix style

* fix stan

* Fix Rewrite MAC to Hex padding with floats

* fix sqlite migration
2022-01-30 16:28:18 -06:00
Josh Jameson
0b85bceb34
Fix Temperature Sensor for AirOS 8.7.4+ (#13655)
* Fix Temperature Sensor for AirOS 8

* Update airos_airos8.json

* Update airos.json

* Add new skip_values feature to deal with Ubiquiti nonsense.
Tweak test data to test the change
fix not_regex

Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-01-26 16:02:57 -06:00
Tony Murray
9f42abd6c6
snmp timeout is a float (#13676) 2022-01-15 10:00:16 -06:00
Peca Nesovanovic
592a0efa51
added oids.no_bulk os setting (#13666)
* forcewalk param

* [snmp][no_bulk]

* var names, test, schema

* Key off OIDs, not mibs

luminato is POC and needs to be reverted before merge.

* fix up os schema

* docs

* remove luminato arbitrary changes

Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-01-15 09:59:23 -06:00
Tony Murray
a95efd6d2a
Global search: search device display (#13583)
* Global search: search device display
Add display field to search (also port_desc_descr, portName, and bgpPeerDescr)
Rewrite backend
update typeahead bundle
update devices and ports indexes
reduce some port field sizes so we can index them

* Style fixes

* remove nonsense
2021-12-06 16:12:24 +01:00
Tony Murray
5ce7a5ad0e
snmp.unescape setting (#13590)
* snmp.unescape setting
Works around issue with (I think net-snmp < 5.8.0) where it adds backslashes.

* Updated test data
2021-11-30 21:33:18 -06:00
TheGreatDoc
82d008ca95
Added support for Himoinsa gensets status state sensors (#13456)
* Fix missing mib_dir in definition

* Added state sensors

* snmprec data

* json data

* delete unused snmprec

* License and Author

* remove unused json data

* Fix style issues

* Fix more style issues coz im blind

* Fix more style issues coz im blind last

* Refactored

* Why do we loop?

* Fix style issues

* Update polling

* Refactor to use methods

* Fix a pair of style issues

* Updated test files

* Convert to yaml

* Wrong description on Mode

* Added another state + fixed some indexes

* Dunno what happened

* Fix for phpstan level 6

* Fix forstyleci

Co-authored-by: Tony Murray <murraytony@gmail.com>
2021-11-26 01:18:49 -06:00
Tony Murray
790c4b3402
Configurable device display name (#13528)
* Configurable device display name
You can just set the display name in device settings.

It also accepts simple template format with  the variables: hostname, sysName, sysName_fallback, ip

Default controlled by device_display_default, (set from old force_hostname_to_sysname and force_ip_to_sysname settings

* remove second argument to format_hostname()

* Style fixes

* Update schema

* update phpstan baseline

* Improved settings strings (and add for translation)
2021-11-18 15:46:22 -06:00
pepperoni-pi
4b572b9b31
Added migration file to change cpwVcID to unsigned integer (#13510) 2021-11-12 14:15:50 -06:00