* 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>
* 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>
* 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>
* 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>
* 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
* 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.
* 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
* 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>
* 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>
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>
* 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.
* 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
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.
* 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
* 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>
* 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
* 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>
* 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
* 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
* Add support to REST API for creating Maintenance Schedules for Device Groups
* Update documentation to include the maintenance_devicegroup API endpoint
* Fix quotes
* Fix whitespace
Co-authored-by: Tony Murray <murraytony@gmail.com>
* Improve support for legacy Arista/Metamako MOS devices
* Fix indentation in license text
* Fix formatting in OS discovery
* Add hardware type discovery for Arista/Metamako MOS
* style fixes
* Implement hardware model detection for Arista MOS
* Refactor to use YAML based OS discovery
* Reformat test data for arista-mos_metamux48, 0.16 code
* Enable lm_sensors polling of Arista MOS devices
* Remove bgp-peers data from arista-mos test files
The GS108Tv1 doesn't present the same information over snmp as they do
over lldp. This tries to detect such a remote device and figure out
which remote port we actually should map it to.
* 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>
* Improve the efficiency of some queries
Mostly by switching from whereIn to whereIntegerInRaw.
This inserts integers directly into the query instead of using placeholders (also escapes them)
also remove extra json_encode/json_decode in PingCheck
* Fix return types
Probably will result in some missing baseline exceptions.
* Update PingCheck.php
* whitespace
Using GetBulk on PrimeKey is inefficient, partly because the mibs are not
organised into tables. Moving to standard walks improves polling speed by around
10 percent.
Also changed over graphs to something more useful.
* Fix IPv6 in service check host (#13939)
* Add hostName cleaning to Clean
* Apply RFC 5952 formatting to Clean::hostName output
* Use more liberal cleaning for hostnames
* Remove unwanted whitespace
* Apply Clean::hostName() to all relevant fields
* Fix docstring
* Use IP::isValid inline
* Update Clean.php
* Update services.inc.php
Co-authored-by: Tony Murray <murraytony@gmail.com>
* Fix avtech 12E environment sensor
Updated MIB for newer internal sensor object schema in 12E models.
Updated discovery yaml file to retrieve temperature and humidity
data from internal and digital sensors.
Added test data for roomalert12e model.
Co-authored-by: Sander Steffann <sander@steffann.nl>
Co-authored-by: Tony Murray <murraytony@gmail.com>
* 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
* Move Config loading to a service provider
That way other service providers can depend on it
Move various random listener registrations into the EventServiceProvider
Various startup cleanup
* Config::persist Set live variable before persisting incase db update fail
* Disable strict mode for legacy code (init.php)
* Disable debug after os test data is gathered
* remove Eloquent::boot it is never used
* remove Eloquent::version
* lint fixes
* style fixes
* there is no c_echo here
* Add hostName cleaning to Clean
* Apply RFC 5952 formatting to Clean::hostName output
* Use more liberal cleaning for hostnames
* Remove unwanted whitespace
* Apply Clean::hostName() to all relevant fields
* Fix docstring
* Use IP::isValid inline
* Update Clean.php
* Update services.inc.php
Co-authored-by: Tony Murray <murraytony@gmail.com>
* 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
* FS OAP OEO and EDFA mibs
* definitions and discovery yaml
* current dbm state temperature and voltage updates
* update on poller and discovery modules
* test data
* removing unneeded pollers and discovery modules as requested
* update to os test data
test data now reflects fs-nmu details instead of module details as module may not be present at previous oid or module may not be present at all in the device
* OS update and Test Date Updates
* channels numbers
* removal of default true poller and discovery modules
* reintroduced previous OEO module data
* StyleCI fixes
* Update fs-nmu.inc.php
* Update fs-nmu.inc.php
* Update fs-nmu.inc.php
* Update fs-nmu.inc.php
* Update fs-nmu.inc.php
Co-authored-by: Neil Lathwood <gh+n@laf.io>
* Revamp validate web page
to load page then validate, instead of validate then load page
* style fixes
* lint cleanups
* fixes
* translations and a couple fixes
* style fixes
* move result serialization into the class.
* Add support for PrimeKey Hardware Appliance
https://doc.primekey.com/ejbca-appliancehttps://doc.primekey.com/signserver-appliancehttps://doc.primekey.com/ejbca-appliance/operations/webconf-configurator-of-hardware-appliance/monitoring
* Correct off-by-one error for Galera states
* Add load multiplier
* Don't poll transaction ID, it's too messy
* Tabs -> spaces
* Don't modify system load. (Is this a %age or not?)
* CUP moves Load -> Count
* CPU moves Load -> Count
* Now I have MiBs. Attempts to use them are to date unsuccessful
* Removed numeric oids entirely
I'm not sure how easy it will be to conver this to YAML.
* Formatting
* More formatting
* Numeric it is
* Fix States
* Numeric oids
* Shorten Descriptions
* Add DB threshold
* Percent -> Yaml
* Temperature -> Yaml. Relaxed num_oid validation
* Fanspeed -> Yaml
* Volgate -> Yaml
* Count -> Yaml
* State -> Yaml
* Tweak snmp_flags
* minimize icon
* Check if first_word function is required
* Incorporate feedback
Co-authored-by: Tony Murray <murraytony@gmail.com>
* Add DBm and State Sensors
Added extra MIB files
Added Dbm levels on ports
Added Stacking State Sensors
* Added include for zynos.inc.php
File patch - includes/discovery/ports/zynos.inc.php
* Create ZYXEL-STACKING-MIB
Official Zyxel MIB
* Create ZYXEL-TRANSCEIVER-MIB
Official Zyxel MIB
* Added test file zynos_xgs4600.json
* Create zynos snmprec test file
* CENSORED zynos_xgs4600.json
* Created new polling file for Zynos ports
Converts zynos SWP port style to be 1/1 style
* Created new discovery for Zynos ports
Changes zynos SWP ports to be 1/1 style during discovery
* Fixing ci complaints in discovery/ports/zynos.inc.php
* Fixing ci complaints in polling/ports/os/zynos.inc.php
* fixing more ci complaints in discovery
* Updated Zynos.snmprec
* Updated zynos.json
* Updated zynos.json
* Removed ifDescr pre-cache
* Removed pre-cache from zynos.yaml
* Reverted zynos.snmprec
* Restored zynos.json
* Updated zynos polling to use zeropad
* Updated zynos discovery to use zeropad
* Updated zynos.yaml
Updated zynos.yaml to include ifname: true to change port names and added '/^ZyXEL/' to sysDescr_regex
* Update zynos.inc.php
* Update zynos.inc.php
* Update zynos_xgs4600.json
* Update zynos_xgs4600.snmprec
* Re-Generated Zynos.json
* Fixed ifOperStatus in Zynos.json
* Delete zynos.inc.php
* Update ports.inc.php
* Added new test data
* Updated zyxel test data and discovery
* Update ports.inc.php
* Update zynos.snmprec
* Updated zynos.json
* Update Zynos.json
* Fix StyleCI issues
* Update zynos.json
* Update zynos.json
* Update zynos.json
* Updated zynos mgs3712.json
* Update zynos_mgs3712.json
* Added back old SFP discovery
-SFP Temperature
-SFP Voltage
* Migrate addhost.php to lnms device:add
Have snmp-scan.py call lnms device:add (make exit codes line up so this works)
Fix issue with ping only devices trying to detect os via snmp
Reorder options in device:add help and improve formatting
Update docs to remove references to addhost.php
Fix a bit of code that was in functional code
* fixes
* fix snmp version message
* Fixeed Hardware and Versiondetection for US-8 and USW-Switches with Version 5
It seems that the same model and same firmware version respond with different SNMP-records, depending on Hardware revision. This should be more general
* removed "linux" from version string in some cases
Changed regex for better version isolation and updated test data
* Update edgeswitch.yaml
Corrected the edgeswitch Test-Version detection. It seems that there are 4 cases :(:
USW GigaBit Ethernet Switch, firmware 5.76.7.13442
US-8, 5.76.7.13442, Linux 3.6.5
USW-Flex 5.76.7.13442
EdgeSwitch 24-Port 250W, 1.0.1.4720839, Linux 3.6.5-f4a26ed5
* Removed false change. Changed 8XP test data
Removed false change. Changed 8XP test data
* ' -> "
' -> "
Extreme changed the name on universal hardware(5520, 5420, 5320) when running VOSS 8.6 software or greater to FabricEngine for universal hardware only. This change removed VOSS in system description and added the word FabricEngine. So previous a switch with sysDescr of 5520-24X-VOSS became 5520-24X-FabricEngine.
General Info :
SysDescr : 5520-24X-FabricEngine (8.6.0.0)
SysName : 5520X-Traffic-VSP
SysUpTime : 0 day(s), 15:59:25
SysContact : http://www.extremenetworks.com/contact/
SysLocation : some location
* API: device_add support display field
remove legacy code path
update docs
A few improvements to the new code too
* some fixes, port_association_mode was not available
* hand version -> snmpver translation