* Default to null for group yaml discovery.
* Update test data for a154bda yaml group null fix.
* Changes to guessed limit functions for sensors.
Original behaviour
===================
The file `includes/discovery/functions.inc.php` contains
`sensor_limit_low()` and `sensor_limit()` which both attempt to
guess a sane value for sensors when no explicitly defined
low_limit or high_limit can be found during discovery.
Both switch control structures used in those two functions
have empty case statements which means that if one of those matches,
it's going to fall through and run the code for each subsequent
case until a `break` is reached.
For example, when we call `function sensor_low_limit(dbm, -13.036)`
it will return the value `-12.3842` instead of `null`. That is
because there will be a match at `case 'dbm':` which falls through
all the way to `case 'cooling':`, where it performs
`$limit = -13.036 * 0.95` before hitting a `break`.
Changed behaviour
===================
Removed `power_consumed` and `count` guessed low_limit and
high_limit, I personally added those sensor classes in PR #9471
when I didn't understand that a switch control structure has
fall-through behaviour so I can guarantee that guessing limits for
those is a mistake on my behalf. It should not be there, only
power_factor can have guessed limits. Apologies for the issue,
I'm still a beginning programmer!
Furthermore, I removed guessed high_limit values for `current`
and `power` because these are supposed to draw higher values as
more devices or components are installed on for example a PDU or
a chassis.
Finally, I removed guessed low_limit and high_limit for `dbm`
sensors, there is a much too large variance in power budget on
commercially available optical transceivers for there to be a
sensible window where you can guess these values.
* Documentation on adding sensor classes.
* Update test data - sensor limit changes @ 30212d2
* Device Groups rewrite
Updated web ui
Static or dynamic groups allowed
Alert rule query builder
Translation support
Permissions support
* cleanup, make relationship save, and validate it
* builder WIP
* rules builder and rules saving/loading
* Parse query builder to Laravel Fluent query
* Upgrade existing groups when editing.
Properly update only dynamic groups when polling.
* remove unused old code
Update API and other places to use Eloquent
* debug output in poller restored
* Fix up some things
creating static
improved validation
fix js error on creation
Fix static groups in polling
* hide pattern for static group
* Implement authorization
Use in the menu too
* update schema
* fix rollback
* Don't abort on invalid queries
* fixes to query builder
* add test data, looks like macros aren't handled (omitted them because groups don't use them generally)
* Add macro support for QueryBuilderFluentParser
* add test for macro that accepts value
* More space in forms
Retain rules when converted to static
no duplicate names allowed
* Better error feedback
Update related devices on save
* Add button icon
* format
* update docs
* fix tests
* Fix some QueryBuilderFluentParser issues with OR
updated/more test data
* Show device groups runtime
fix querybuilder.json format
* Store table joins in the rules to minimize polling time
Update group joins in daily.sh (and when they are saved)
* Update daily.php
* Add units to time
* Device Groups rewrite
Updated web ui
Static or dynamic groups allowed
Alert rule query builder
Translation support
Permissions support
* cleanup, make relationship save, and validate it
* builder WIP
* rules builder and rules saving/loading
* Parse query builder to Laravel Fluent query
* Upgrade existing groups when editing.
Properly update only dynamic groups when polling.
* remove unused old code
Update API and other places to use Eloquent
* debug output in poller restored
* Fix up some things
creating static
improved validation
fix js error on creation
Fix static groups in polling
* hide pattern for static group
* Implement authorization
Use in the menu too
* update schema
* fix rollback
* Don't abort on invalid queries
* fixes to query builder
* add test data, looks like macros aren't handled (omitted them because groups don't use them generally)
* Add macro support for QueryBuilderFluentParser
* add test for macro that accepts value
* More space in forms
Retain rules when converted to static
no duplicate names allowed
* Better error feedback
Update related devices on save
* Add button icon
* format
* update docs
* fix tests
* Aruba IAP: Fix Radio State Sensor
Fix state sensor for radio status from warning when disabled to unknown state.
* Update aruba-instant.json
* Update aruba-instant_105.json
* Fix Software Version #
I don't think setting $firmware does anything, not to mention the regex wasn't matching correctly. I tested this fix tons of different software versions and they all seem to work.
* Revert "OS CIMC Software Version Number"
* version and features
* fixed feature
* Fix Extra Blank line EOF
* Extend the Dell drac module to report CMC status and sensors
* CMC status sensors do not have chassis id
* Update test data for drac OS
* Add missing test data for drac os
* WIP - Add MPLS Support
This introduce the generic MPLS support
- New database tables for MPLS LSPs
- actually discovery and polling on NOKIA SR OS (Timetra) devices
- new routing->MPLS HTML pages
- ToDo MPLS LSP paths table and views
Suggestions and improvements are welcome
* add db schema
* some fixes
* add path table, discovery and polling
* add path views
* add test data
* Convert MPLS module to new style
Implement a SyncsModels trait to simplify code a lot
* abs() for negative value from snmp (bug?), test data
* fix db schema
* Fix up test data, remove uneeded data in json
* fix whitespace
* Fix Software Version #
I don't think setting $firmware does anything, not to mention the regex wasn't matching correctly. I tested this fix tons of different software versions and they all seem to work.
* Revert "OS CIMC Software Version Number"
* cimc-version-fix
* added test data
* Update cimc.snmprec
* Dynamic entPhysicalIndex values for YamlDiscovery
* Use degree symbol when displaying temperature values
* Adjust SNMP options for new snmp_get_multi()
The OS polling module for mrv-od was using snmpget commands with
-Ovqs, rather than -OQUs, which meant that the equal sign was
stripped in the snmpget output. But that equal sign is now used
as the explode() delimiter so it broke the construction of the
returned array for the snmp_get_multi() function.
Additionally, I removed the NBS-CMMC-MIB:: prefix which is no
longer returned by snmp_get_multi() as part of the OID. Now,
the mrv-od.inc.php OS polling module is retrieving data from
positions in the array with actual content.
* Convert mrv-od to yaml, improve sensors discovery
Converted sensors discovery for mrv-od to yaml, retaining all
functionality for pre-cache, dbm, and temperature. Replaced specific
SFF-8472 Digital Diagnostics state sensors with generic ones, given that
we are now reading out detailed values through new dbm, current, voltage
sensors.
Reasoning: the generic Digital Diagnostics state sensors report state
diagsOk, or else the worst severity level measured among all of the
Digital Diagnostics values for that optical data point. You'd really
only want to set a generic "alarm" so the box can report that it
thinks something is wrong, whereafter a human can look at the graphs
and/or the CLI to draw their conclusions about the alarm. Otherwise,
things would quickly become too spammy as you are essentially duplicating
every sensor across both regular measurements and state measurements.
Further changes:
- Increase maximum number of detected PSUs from 4 to 8 per the MIB.
- State sensor to detect (in)sufficient power budget for all modules.
- Use skip_values to hide state sensors with the notSupported value.
- Use skip_values to hide sensors which are unsupported per the MIB,
signified by the device returning special values -1 or -2147483648.
- Add dBm, temperature "over" graphs to the mrv-od device header bar.
* Add mrv-od entity-physical support
MRV does not use the ENTITY-MIB data format, so we had to reconstruct
the inventory from their proprietary format using the following tables
from their NBS-CMMC-MIB:
- nbsCmmcChassisTable
- nbsCmmcSlotTable
- nbsCmmcPortTable
Additionally, since sensors didn't have their own ifindex in the
NBS-CMMC-MIB, I went ahead and appended the last OID digit to
the "containing" ifindex create a unique number. The same was
done for the sensors in the yaml-discovery.
* Test data for mrv-od, fix 2* pre-commit.php issues
* Fix entPhysicalIndex returning 0 instead of null
Some unit test breakage was caused by 62167ebcb which changed
the code to return 0 instead of null when {{ $index }} was
set as the entPhysicalIndex in the YamlDiscovery. So now we
detect if it returns some value which may be interpreted as
false, and if so we set null rather than 0.
* Fix for RouterOS LLDP discovery
Only the first nine neighbors were correct on RouterOS - missing hexdec() led to the remaining neighbors being linked to the wrong ports. Ex. port 10 in hex was incorrectly linked to port 10 decimal when it should be 16 in decimal
* Added test data for MikroTik RouterOS CRS317 switch
* fix client count polling, add ap count polling.
* Set low warning/critical thresholds for AP count sensors
* Add Aruba AP Count Warning and Critical Alerts to collection, lint alert_rules.json
* add newline at end of alert_rules.json
* add/update tests/data/arubaos*.json test data
* Fix Cisco MAC acounting discovery, polling and HTML templates.
* Remove empty code.
* Provide test data for cisco-mac-accounting module.
* Added module test dependency.
* Refactor LibreNMS service
add ping
* services ported
remote legacy stats collection
* alerting
* implement unique queues
* update discovery queue manager
* remove message
* more cleanup
* Don't shuffle queue
* clean up imports
* don't try to discover ping only devices
* Fix for discovery not running timer
* Update docs a bit and and add some additional config options.
Intentionally undocumented.
* Wait until the device is marked up by the poller before discovering
* Handle loosing connection to db gracefully
* Attempt to release master after 5 db failures
* Sleep to give other nodes a chance to acquire
* Update docs and rename the doc to Dispatcher Service to more accurately reflect its function.
* add local notification
* Collect Appliance serial number from Sophos device
Add serial number read. Added on polling session instead of discovery because the S/N changes in case HA functionality is enabled, and there is a switch between active and standby.
* Update cyberoam-utm.inc.php
* Fix Siklu Version/Serial
Siklu allows for two software images. We must first determine which SW bank is "running" in order to report the correct version.
Also adding correct Serial Number detection for Siklu devices.
* Update siklu.inc.php
* Update siklu.snmprec
* Create siklu.json
* New OS: Aruba Instant
* New OS: Aruba Instant
* recreate test data
* remove aruba_instant test data
* remove empty file includes/definitions/discovery/aruba-instant.yaml
* fix state sensor discovery
* remove minor changes to includes/polling/functions.inc.phpwq
* move mac helper functions to Rewrite class
* simplify snmpwalk_group usage, general code cleanup
* fixes
* fixes
* fixes
* fixes
* fixes
* fixes
* recreate test data for 105 variant
* Add Client sensors for 8.4.0.0+
* begin stream-lining discovery and polling. separating discovery functions
* update test data
* update test data
* update test data
* improve mempool discovery/polling, clean up os polling, improve state discovery, improve os definition, misc fixes to wireless sensors module
* attempt to implement custom AP and client discovery and polling
* code fixes
* re-add ap count top graph
* more fixes
* more fixes
* more fixes
* more fixes
* remove some debugging, update test data
* code cleanup
* code cleanup
* address some scrutinizer warnings
* Fix Avtech discovery
pre-cache stored the data incorrectly
* Fix RA-4E external sensors
sen1 had incorrect oids (duplicate of sen2)
Description oid from data doesn't match the mib, perhaps outdated MIB?
* add test data
* Updated 4E MIB
* initial commit of junos handlers
* added DOM alarm test, refactored handlers for DOM alarms
* fixed some formating issues with last commit
* Created DOM alarm handlers and unit tests
* Made tests for LSP Down handler
* Added trap tests for JnxVpnSes*, JnxVpnIf*, JnxVpnPw*
* Added BGP4 trap handlers and tests
* Fixed some variable names for codeclimate
* Simplified JnxBGPM2* handlers
* updated unit tests