* 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>
* Add Cisco flash storage discovery
* Add Cisco flash storage polling
* LibreNMS indentation
* Move file to storage module
* move file to storage module
* Rename and check
Rename the file and add a check only against Cisco devices
* Rename file
* Change parameter from mib name to file name
Co-authored-by: Tony Murray <murraytony@gmail.com>
* Add a first test file for review - Nexus C9340 NXOS ver 10.2.2
* Add first device test files for review - Nexus 9340 ver 10.2.2
* Add Cisco IOS 15.2.7 on C2960X snmprec file
* Add Cisco IOS 15.2.7 on C2960X test data file
* Create nxos_n5548-7.3.3.snmprec
* Create nxos_n5548-7.3.3.json
* Update nxos_n5548-7.3.3.snmprec
* Update nxos_n9340-10.2.2.snmprec
* Update ios_c2960x-15.2.7.snmprec
* Update nxos_n5548-7.3.3.json
* Update nxos_n9340-10.2.2.json
* Update ios_c2960x-15.2.7.json
* Update cisco-flash.inc.php
Co-authored-by: Tony Murray <murraytony@gmail.com>
* Fix Undefined variable/key warnings
* massage for test data
* restore set_numeric, only generates noise
* Fix ucd storage used (apparently free is not stored in discovery...)
* autodiscovery fix
* much simpler approach
* murrant suggestion
* Simplify even more
* Use nullable operator
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
* 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.
* 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
* 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
* 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>
* 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
* Add support for IPMIv2 Kg Key in device settings
Some devices require that the Kg key be specified. An example would be a server of mine, a Cisco C220 M3.
Otherwise, it would error out with `Error: Unable to establish IPMI v2 / RMCP+ session`.
With verbose output enabled, the connection attempt would stop at `RAKP 4 message has invalid integrity check value`.
* Add Kg key support in Poller
* Sanitize Kg key from debug output
* Added Kg key support for discovery process
And it seems to work like a charm. New fields, such as fan tachometers, were added in automatically.
* Applying StyleCI changes
* New device:add code
pre-requisite for updating other code paths
includes option to set display name
separate validation code from device creation
* remove duplicate community and v3 creds
* style fixes
* some lint fixes
* fix phpstan
* Exception cleanup
improved messages and translations
* port association mode to enum
well, pseudo enum
* defaults and cleanups
* fixed/improved validation messages
* fix tests
* fix stupid ide refactor mistake
* lint fixes
* 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
* Add ubiquiti Airfiber 60
* New AF60 data and MIB
* Stylci fix and small additions
* Update test data
* Stylefix
* Remove the weird ubiquity oids containing encoded mac addresses
* Updated test data
* Remove more complex sensors for now to be added after the conflict airos airos-af60 is solved
* Fix hardware and OS
* To be verified is this is the most practical / clean way of doing it
* Advanced wireless and MCS state sensor
* Fix link capacity multiplier and active link
* Test data update fix lint
* Maybe better
* added new sensors to mes23xx
* ci
* copy/paste error
* ci
* cleanup + testdata
* yaml
* yamlnew
* added [no_bulk] for PoE discovery
* fully qualified OID name