* 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>
* Fix expandable sizing
* Temp fix: port_id_{low,high} is actually ifIndex
* new PortsStack discovery module, store actual port_ids
* Show 4 rows of ports by default
* Add test data
* Fix up the single port view too
* Apply fixes from StyleCI
* Update db_schema.yaml
* Update base migration because sqlite cannot add primary keys
* Fix phpstan failures
---------
Co-authored-by: Tony Murray <murrant@users.noreply.github.com>
* Custom Maps: geo map and color background
tabs blade component
geo-map blade component and related script enhancements
* Update css/js
* style fixes
* update db_schema.yaml
* fix db_schema hand edit
* ignore phpstan being wrong
* Handle null
* another possible null spot
* Use standard file cache for custom map background images
* Create map->image as jpeg so we can compress it
* whitespace fix
* Fix background cancel button when other type is selected than the saved type
* Save and restore layer
* Map must exist before creating static image
* Don't show set as image button for Google and Bing.
Bing gives an odd error, but Google won't work.
* Improved Latency graph
Store loss+jitter info in rrd instead of database
New graph icmp_perf (legacy ping_perf still valid referencing part of the newer data)
Delete device_perf table
* Change loss to an area so it is more visible
* Style fixes
* Cleanups from phpstan & tests
* exit_code fix
* Remove alert usage of device_perf
* Don't use magic __get
* Add test for bulkPing
Add host to previous tests
* style fixes
* Fix issue fping error responses
* Added options on edges for a label and to show graphs as bps as well as percentages
I think that vis.js needs to be updated to allow both bps and percentages at the same time.
* Add database migration
* Try to avoid putting multiple mid points in the same position
* Added a URL parameter for screenshot mode, where node labels are blanked out
Also fixed up the node labels in the editor
* Added legend to the editor as well as database options for reversing arrows and adjusting the edge separation
All features have been implemented in the editor, but need to be implemented in the viewer
* Fix missing defaults on the edit map list page
Added arrow reverse code to the viewer
Added legend code to the viewer
Added code to the editor to correclty handle moving the legend
* Formatting fixes and DB schema update
* Remove view from database schema
* Initial commit with editor.
* Added custom map models and database migrations.
Modified the controller and view to support saving the custom map settings to the database
* Added menu items and sorted out access permissions for maps and nodes
* Cleaned up some of the conditions in the javascript section of the blade
* Started work on the map data save
* Save of map nodes and edges is complete
* Got the map to load data on page load and added the delete functionality
* Fixed a typo and made link colour black if intertface is down
* Various usability fix-ups
* Show the save button on node and edge delete
* Fixed up access for users without global read
* Increase typeahead search size and standardised the way modals are triggered.
* Update data fetch to copy values into array so I can add more fields
* Convert blank array check to use count()
* Formatting changes
* More formatting fixes
* Formatting again
* DB schema update
* Revert previous commit
* Pass device id to pages
* Remove bad characters from javascript
* Re-add the - character in search results
* Update to avoid background colour being set to the current colour for offline devices
* Fixed a bug in speed detection when no suffix is given
* Fixed up the speed colour calculation and added comments
* Update default edge font size to 12
* Reduce arrow size
* Formatting fix
* Update the custom map controller to handle null interface speeds
* Alter JSON columns to be longtext instead
* Only refresh map data on successful save
* Update labels on default settings to make it clear that they are not saved
* Added timestamps to all custom map tables
Use HasFactory instead of static definitions for custom map tables
convert JSON DB fields to longtext and updated PHP to do the appropriate JSON decoding as a result
* Added missing vis.js images for the editor
* Split the custom map blade into different pages
* formatting fixes
* Initial commit with editor.
* Added custom map models and database migrations.
Modified the controller and view to support saving the custom map settings to the database
* Added menu items and sorted out access permissions for maps and nodes
* Cleaned up some of the conditions in the javascript section of the blade
* Started work on the map data save
* Save of map nodes and edges is complete
* Got the map to load data on page load and added the delete functionality
* Various usability fix-ups
* Show the save button on node and edge delete
* Fixed up access for users without global read
* Increase typeahead search size and standardised the way modals are triggered.
* Convert blank array check to use count()
* Formatting changes
* More formatting fixes
* Formatting again
* DB schema update
* Revert previous commit
* Pass device id to pages
* Remove bad characters from javascript
* Re-add the - character in search results
* Update to avoid background colour being set to the current colour for offline devices
* Reduce arrow size
* Only refresh map data on successful save
* Update labels on default settings to make it clear that they are not saved
* Added timestamps to all custom map tables
Use HasFactory instead of static definitions for custom map tables
convert JSON DB fields to longtext and updated PHP to do the appropriate JSON decoding as a result
* Added missing vis.js images for the editor
* Split the custom map blade into different pages
* Updated the custom maps to use the select2 searches for ports and devices
* Fix port search clearing with select2
* Update DB schema to add timestamps
* Add the ability to set a node alignment value where nodes will align to a grid
* Add a checkbox to re-center edge lines
* Schema update for node alignment
* Removed unused route
* Fixups after rebase
* Remove DevicePortSearchController
* Rebase fixups
* Remove unneeded controller
* Formatting fixes
* Update all network map documentation
* Fixed typo in doc
* Change background imgae database migration
* Update migration for custom map background to fix schema error
* Place a try/catch around the BLOB->MEDIUMBLOB migration
* Formatting fix
* Moved custom map background image location and added some SVG images to test as image options
* Updated the editor to use a static set of device images
* Update the image logic in the editor and added to the viewer
* DB Schema update
* Formatting
* remove svg height/width attributes
* Added some more icon options for arrows
* Added database migration to allow nodes to link to another custom map
Fixed an error in the image migration
* Added the ability to link a node to another custom map
* Formatting fixes
* DB Schema update
* Remove images-custom directory
* Explicitly cast map ID to int
* Made the image selection list dynamic based on the contents of the custom map icons directory
* Formatting fix
* Double-clicking on a link will take you to the link
* Remove whitespace
* Add translations
fix an xss and hopefully not add any new ones
refactor node image to use translations with fallback
* split modals out into separate files
return width/height to avoid js scope issues
* Formatting fixes
* refactor edit select page into a "manage" page
Still left:
validation/custom request
Controller refactor
ui tweaks
* MapSettingsRequest
* Refactor more routes, policy, controller
I think this is the last refactor. Everything is now organized in a standard way.
Missing a method to check if a user has access to a map
* Fix booleans and style
* Add versioning to the background image to prevent browser caching
* Fixed the background image update by splitting it into a separate modal
Changed the delete button on the map editor screen to return to the map list
* Formatting fix
* Added double-click actions in editor to edit nodes and edges
---------
Co-authored-by: Tony Murray <murraytony@gmail.com>
* search improvement for PortNac
* rename func
* style
* DB migration for timestamps
* style
* rules
* fix manually db_schema
* remove vlan only search for now
* add a bool column to ident historical nac entries
* add columns to the table
* queryByOui renamed everywhere
* age value instead of delete
* style
* style
* use Illuminate\Support\Facades\DB;
* tests fix
* module_tables.yaml
* dump model instead of tests/module_tables.yaml
* tests
* testVrp
* daily
* config
* display historical NAC entries in global view
* same for NAC device page
* nac tab on device/port view
* and display the tab link if necessary
* filter by port as well
* historical data in port tab
* formatters
* Updated bill_data table, alter indexes and add new column
* Added missing <
* Removed first
* Moved column in bill_data
* Updated schmea changes
* Updated schmea
* Updated migration
* Use id alias
* index after and only index
* Update and rename 2024_01_09_223917_bill_data_new_column.php to 2024_01_09_223917_bill_data_new_primary.php
* Trying these schema changes
* Another go
* And another
* Debugging
* Revert change
* Revert changes + debugging
* Updated schemas again
* Trying to rename column name
* Updated db_schema.yaml
* renamed column back to id
* Added debugging
* Added debugging
* Added debugging
* Added debugging
* Added debugging
* Remove redundant primary id
* Remove var_dump
* Remove var_dump
* I swear
---------
Co-authored-by: Tony Murray <murraytony@gmail.com>
* add a new notes field to the rule editor. use a bigger text field for sql queries to avoid mistakes...
* add api doc
* allow notes field from the collection
* add a sample notes to the collection
* lint and db schema
* unmix some schema changes from a nother PR
* unmix schema update No°2
* unmix schema update No°3 - silly me
* add strip_tags, minor optimisation, db default value
* apply linting
* db_schema empty '' as default
* update db_schema.yaml
* default value changed as 'BLOB, TEXT, GEOMETRY or JSON column 'notes' can't have a default value'
* better keep the migration in 2023...
* Update 2023_12_12_171400_alert_rule_note.php
* Update create-alert-item.inc.php
---------
Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
With tools installed, the string provided by ESXi contains a lot more information. In 8.9, Red Hat have further extended the string to include a machine readable string, parsable by tools that are compatible with OVAL:
Linux 4.18.0-513.5.1.el8_9.x86_64 Red Hat Enterprise Linux 8.9 (Ootpa) 8.9 Red Hat Enterprise Linux 8.9 (Ootpa) cpe:/o:redhat:enterprise_linux:8::baseos
* 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>
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.
* 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
* 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>
* 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
* 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
* 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
* Fix vendor_ouis duplicates in migration
Can't trim the duplicates efficiently due to lacking an index on oui.
* fix style
* restrict columns to make strict group by happy.
* 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
* 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
* Move `resources/lang` folder
* Shift registered middleware
* Remove `fruitcake/laravel-cors` dependency
* Streamline `$commands` property
* Upgrade to Flysystem 3.0
* Shift core files
* Convert `optional()` to nullsafe operator
* Remove unnecessary `$model` property
* Convert route options to fluent methods
Laravel 8 adopts the tuple syntax for controller actions. Since the old options array is incompatible with this syntax, Shift converted them to use modern, fluent methods.
* Convert deprecated `$dates` property to `$casts`
* 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
* Use `<env>` tags for configuration
`<env>` tags have a lower precedence than system environment variables making it easier to overwrite PHPUnit configuration values in additional environments, such a CI.
Review this blog post for more details on configuration precedence when testing Laravel: https://jasonmccreary.me/articles/laravel-testing-configuration-precedence/
* Fix error provider
* Match new symfony syntax
* Match upstream syntax
* Fix route syntax
* generate composer.lock
* Sync back configs
* routes
* composer
* Fix more flare
* fix cors
* sync lang
* Apply fixes from StyleCI (#14517)
Co-authored-by: StyleCI Bot <bot@styleci.io>
* bump larastan
* update packages
* wip
* Temporarily lower phpstan level
* Update phpstan.neon
* wip
* wip
* wip
* Apply fixes from StyleCI (#14592)
Co-authored-by: StyleCI Bot <bot@styleci.io>
* test
* Update CiHelper.php
* Update test.yml
* Update CiHelper.php
* Update CiHelper.php
* Apply fixes from StyleCI (#14616)
Co-authored-by: StyleCI Bot <bot@styleci.io>
* test?
* fix phpstan problems
* dont run snmpsim on github ci
* Fix whitespace
* More whitespace
* More whitespace ???
* I think the space broke it
* fix the reset of the whitespace
* hard code auth guard
---------
Co-authored-by: Shift <shift@laravelshift.com>
Co-authored-by: StyleCI Bot <bot@styleci.io>
Co-authored-by: Tony Murray <murraytony@gmail.com>
* 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
* 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>
* 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>
* 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