Commit Graph

84 Commits

Author SHA1 Message Date
SourceDoctor
030cd5e9b2 Get Outage Data from for the requested Device 2020-06-27 17:49:58 +02:00
SourceDoctor
4e6a7291a2
Device Availability Calculation (#11784)
* Device Availability Calculation

* Travis fix

* .

* schema corrections

* flexible duration

* travis

* .

* .

* .

* .

* remove not needed code

* line Text to RRD

* update humantime

* .

* only set up again if device was marked as down

* set RRD area transparency

* save uptime also, to keep last availability as good as possible

* file description correction

* look for outages even if uptime > duration
2020-06-22 22:57:30 +02:00
Tony Murray
24d4a50cdf
Fix wireless sensor polling unit display (#11748) 2020-05-31 09:54:01 -05:00
Tony Murray
1c08c11a77
Remove Laravel helpers (#11428)
* Remove Laravel helpers

* Replace qualifier with import
2020-04-18 00:37:56 +02:00
PipoCanaja
3fb46710a6
Added support for RIEDO data concentrator (#11237)
* Riedo E3Meter DataConcentrator

* Riedo E3Meter DataConcentrator Image

* logos

* name

* Freq + Power

* Power

* Tests + standalone riedo mib

* tests
2020-04-10 13:24:49 +02:00
Martijn Schmidt
a64bd45dbc
Update IronWare sensors & bgp-peers discovery, allow skip_values to target a specific index appended to the OID (#10941)
* Migrate ironware sensor discovery from php to yaml.

* More sensors, add grouping.

* dynamic_discovery_get_value() becomes getValueFromData()

* Target a specific index with skip_values.

* Improve Brocade BGP session discovery/polling

This commit allows for the correct discovery of BGP sessions
with 32-bit ASNs, IPv6 neighbors using the BGP4V2-MIB which is
based on draft-ietf-idr-bgp4-mibv2-11 and also polls for IPv4
unicast received routes through the FOUNDRY-SN-BGP4-GROUP-MIB.

Copied most of the code from PR#8877 by @Mikeburke14, cleaned
up the code a little bit to match the normal LibreNMS style,
and fixed bgpPeers_cbgp discovery as well as polling for the
ipv4.unicast neighbors.

Note that older Brocade IronWare firmware versions are known
to have multiple defects relating to the BGP4V2-MIB which
might result in certain missing non-established neighbors.

Related vendor defect numbers:

- DEFECT000633962
-- Symptom: The OID bgp4V2PeerAdminStatus does not return the
            correct value
-- Reported: NI 05.7.00
-- Resolved: NI 05.8.00g

- DEFECT000583319
-- Symptom: SNMP polling on bgp4V2PeerTable (OID brcdIp.3.5.1.1.2)
            does not display all the BGP entries
-- Reported: NI 05.6.00
-- Resolved: NI 05.8.00e

- DEFECT000550309
-- Symptom: SNMP polling on bgp4V2PeerTable (OID brcdIp.3.5.1.1.2)
            does not display the full information
-- Reported: NI 05.7.00
-- Resolved: NI 05.8.00c

* Add ironware CER & ICX platform test data.

* Re-add ironware.json compatible with current master branch.
2020-02-01 23:28:03 +01:00
Jozef Rebjak
c69efb3444 Added support for Mikrotik LTE Modem (#10805)
* Added support for Mikrotik LTE Modem

* Deleted mistaken file

* Travis fix

* Another Travis fix
2019-11-13 11:31:32 +00:00
Tony Murray
6ba05cdbbb
Enable menu translation (#10298)
And better translation support for sensors, not complete
2019-06-04 20:03:50 -05:00
PipoCanaja
0b4c7b584a remove calls to unavailable {{ $variable }} from YAML discovery (#9864)
* remove calls to unavailable {{ $variable }} from YAML discovery

* tests

* Add a warning for debugging purposes
2019-03-13 21:04:50 -05:00
PipoCanaja
4599b36b25 Access to "sub" index (when OID has multiple indexes) (#9893)
* accessing in YAML each part of the index in case oid has more than one

* accessing in YAML each part of the index in case oid has more than one

* accessing in YAML each part of the index in case oid has more than one

* accessing in YAML each part of the index in case oid has more than one

* accessing in YAML each part of the index in case oid has more than one

* accessing in YAML each part of the index in case oid has more than one

* accessing in YAML each part of the index in case oid has more than one

* Codeclimate

* Initialisation + comments

* Like this
2019-03-04 21:17:14 -06:00
Tony Murray
fad0bffc43 Escape SNMP & IPMI shell commands (#9537)
hopefully doesn't break anything
Mostly issues with snmp oids and options containing spaces.  Try to remove all of those.

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
After you are done testing, you can remove the changes with `./scripts/github-remove`.  If there are schema changes, you can ask on discord how to revert.
2018-12-16 13:42:50 +00:00
markoh76
7bf769e19c Ceraos more sensors (#9392)
* Update to Added support for HeliOS 10Ghz failover to 5Ghz state sensor
Converted /includes/discovery/sensors/state/helios.inc.php to yaml
Test units included
CLA has been signed

* Added support for CeraOS TX Mute Status state sensor, NTP Client Lock Status state sensor.
Updated CeraOS temperature sensor, now called from includes/definitions/discovery/ceraos.yaml - removed includes/discovery/sensors/temperature/ceraos.inc.php
Corrected issue with CeraOS temperature reverting to zero after polling (added a trailing . to the num_oid)
Amended includes/definitions/discovery/helios.yaml with changes as advised by Neil Lathwood and Tony Murray

* Added unit test data and corrected ceraos.yaml validation error

* Added support for Ceraos Wireless Sensors (php)
Cross Polar Interference
Wireless Frequency

Added Ceraos state sensors (yaml)
NTP Client Lock Status
Tx Mute Status
Radio Operational Status
Remote Radio Operational Status
IDU Temperature
Power Amplifier Temperature

* Fix up tests, etc

* remove helios changes, fix style
2018-12-11 08:41:26 -06:00
PipoCanaja
e10e7b7939 Fixed Typo in YamlDiscovery.php (#9530)
Hi,

As far as I understand the code, it seems that array_reduce should be array_replace in this line, isn't it ?

PipoCanaja

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [X] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
After you are done testing, you can remove the changes with `./scripts/github-remove`.  If there are schema changes, you can ask on discord how to revert.
2018-12-07 22:06:07 +00:00
PipoCanaja
0b3f1daed9 Dynamic_discovery_get_value in can_skip_sensor to use all oids in skip_values (#9495)
* Use of dynamic_discovery_get_value in can_skip_sensor in order to use all available oids in skip_values

* Use LibreNMS\Device\YamlDiscovery code instead of keeping duplicated function can_skip_sensor

* Fix Travis errors
2018-12-05 12:40:29 -06:00
Janno Schouwenburg
1ca1909074 SAF CFM wireless device support (#9450)
* Added support for SAF CFM L4 wireless device

* Added copyright statement according to LibreNMS documentation

* Added snmp test data and excluded some discover modules from os definition

* Style issue fixed

* More descriptive function

* MIB file rename

* Rename MIB file and change other files accordingly

* Added test data

* Removed debug statement

* Last checks

* Style changes

* Style changes

* Style changes

* Style changes

* Code restructure to make it more readable

* Fixed error in foreach

* Style issues

* Formatting of states within Yaml changed to make it more readable

* Omit default arguments

* Better code and modules only in CFM-M4P-MUX

* Chaged cfml4 to cfm

* Update Sensor.php

* Update Sensor.php

* Better handling of scientific numbers

* Better handling of scientific numbers

* New test data

* Correction on handling trailing zeros

* Different way of cleaning the numbers based on Tony's input
2018-12-05 07:50:34 -06:00
Tony Murray
4a49de1d35 Put it in the right place. 2018-10-24 15:15:58 -05:00
Tony Murray
1a240f0c01 Don't overwrite processor warn percentage 2018-10-24 15:05:47 -05:00
PipoCanaja
5dae25b48b Feature: Collect VRP Entity details in the Huawei MIB (#8888)
* Feature: Collect VRP Entity details in the Huawei MIB

* Feature: Collect VRP Entity details in the Huawei MIB - Add Test Data

* Renaming of the test file vrp_5720_vrf.snmprec

* Added json test files

* Update vrp_5720_vrf.snmprec

* Update vrp_5720_vrf.snmprec

* Update vrp_5720_vrf.json

* Updated processor and mempool discovery to limit descr field

* Updated test

* Updated tests again

* Updated json test data

* Update vrp_ce12804-entity.json

* Update vrp_ce12804-entity.json

* Update vrp_5720_vrf.json
2018-09-10 23:07:45 -05:00
Tony Murray
6ac9980c20 Squelch PBN processor warnings (#9153)
Don't use NMS-PROCESS-MIB for pbn processors.  This keeps tests from spitting out warnings about the broken mib.

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
2018-09-06 23:05:44 +01:00
Tony Murray
d17eb4faaa Do not try to fetch data again if previous attempts failed (#9139)
result is null, which will fail isset() check
2018-09-03 07:55:34 +01:00
Tony Murray
eeb3d58f5b Improved Logging and Debugging (#8870)
Use Log facility when Laravel is booted.
Update init.php so we can easily boot Laravel for CLI scripts. (and just Eloquent, but that may go away)
Move all debug setup into set_debug() function and use that across all scripts.
Log Laravel database queries.
Send debug output to librenms log file when enabling debug in the webui.
Allow for colorized Log CLI output. (currently will leave % tags in log file output)

** Needs testing and perhaps tweaking still.

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
2018-07-13 23:08:00 +01:00
Tony Murray
846cf11331 Support specifying submodules in poller and discovery for debug (#8896)
Mostly useful for debugging

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
2018-07-12 21:30:39 +01:00
Neil Lathwood
974b5eb84f device: Updated cyberpower sensors and os support (#8551) 2018-04-11 22:32:24 -05:00
theherodied
f69412525e device: Added AeroHive Wireless Support (#8500)
* AeroHive 001

* AeroHive 002

* AeroHive 003

* Removed duplicate HiveOS for OS

* Added AP550 detection

* changed to Hiveos-Wireless

* changed back to HiveosWireless. Hiveoss-Wireless doesn't work

* changed back to HiveosWireless. Hiveoss-Wireless doesn't work

* Added Processor Usage.

* Added Mempool.

* working on review requests 001

* working on review requests 002

* stuck on radio stats

* WirelessSensor.php added channel 165

* Added AP250 snmprec

* Frequency work in progress.

* Frequency trying another way.

* Frequency trying another way 002

* Fixed AH-SMI-MIB? Added array try 003

* Frequency array is working thanks to Murrant.

* Frequency array description working.

* Added TX Power

* changed interface naming method

* Review changes 001

* Review changes 002

* Review changes 003

* Added json test data.

* Fixed test data 001.
2018-04-07 13:27:19 +01:00
James Andrewartha
1792a9cd02 Add some previously undocumented WirelessSensors and fix units (#8296) 2018-02-25 20:27:46 -06:00
Tony Murray
6887d771aa device: Added CeraOS wireless sensors (#8167)
* CeraOS wireless sensors

* Add CeraOS test data, fix MSE

* fix whitespace
2018-02-18 21:31:18 +00:00
Tony Murray
fa1d9e9238
Fix incorrect processor unique index query (#8202) 2018-02-05 23:02:57 -06:00
Tony Murray
11147d3bbf
Major Processors rewrite (#8066)
* Extract DiscoveryItem and move some things to better places.
Extract model class
Fix up model construction.  I have problem with construction...
Makeshift model working.  Switch constructor to factory.  discover() and create()
Support legacy discovery.
Remove uneeded custom pollers
Remove netonix custom detection as we try ucd on all os now.
Add a few yaml procs.  Fix a couple things.
More processor discovery conversions
Move Calix e7 to standard hrProcessorLoad, but it doesn't fully implement the HR-MIB, move things around to make it work.
Add a few yaml procs.  Fix a couple things. Correct some stupid mib stuff.
Move more, drop php 5.3
Add netscaler which uses string indexes.  Port fiberhome to yaml and use skip_values
More conversions.  BroadcomProcessorUsage Trait
Serveriron and Ironware share some mibs.  Create a common abstract os for them.
Add yaml support for mib specification in each data entry
Make legacy discover_processor() set 0 for hrDeviceIndex

Untangle Dell switch OS processors

Use use shared OS for groups if they don't have a specific group.
fix silly mib mistake

Make index optional

Move HR and UCD to Traits and out of Processor.

* forgot to update the fortiswitch index

* Make sgos and avaya-ers match the old index.

* fix comware test data

* fix merge errors

* fix dsm and remove pointless empty modules

* file not found exception is in the wrong place.

* Updated processor development docs
2018-02-05 07:39:13 -06:00
Paul Heinrichs
0dd3ec25d3 device: Update Cambium devices to the new wireless sensors (#7703)
* Inital cambium refactor

* Refactored tests

* Remove CMM from pmp group

* Add sensors / Give CMM individual OS

* Fix linting

* More Sensors / states and Revised Headers

* Added old graphs / more sensors

* Add modulation rate to sensor

* Fix Hardware detection bug

* Further hardware detection refinments

* Modify pmp hardware detection

* New Wireless Metric - SSR

* SSR Sensor Graph

* Migrate SSR to metric

* Added last metric file

* Add master check to isAp method

* Fix variables in epmp

* CMM Discovery and state addition

* Add another test for cmm
2017-12-06 21:36:01 +00:00
Tony Murray
527a989b4c newdevice: Added wireless sensors for SAF Tehnika (#6975)
Add new sensor type MSE (Mean Squared Error) which is similar to SNR
2017-07-07 16:05:55 +01:00
Tony Murray
5ca07e11aa newdevice: Added connected AP count for Cisco WLCs (#6572)
* newdevice: Add connected AP count for Cisco WLCs
Adds ap-count wireless sensor type
fixes: #4295

* better detection
Update the overview graph to the new one
2017-05-04 08:03:10 +01:00
Tony Murray
35414a73c7 newdevice: Aruba Instant AP wireless sensor support (Freq, NoiseFloor, Power, Util) (#6564)
A few other fixes elsewhere
2017-05-03 22:53:36 +01:00
Tony Murray
c59ae3c537 Improve discovery output. Only output type names if we actually attempt to discover data for that type. (#6551) 2017-05-02 14:12:04 +01:00
Tony Murray
4c0412b14d feature: Wireless Sensors Overhaul (#6471)
* feature: Wireless Sensors
Includes client counts for ios and unifi
Graphing could use some improvement.
Alerting and threshold ui not implemented

WIP: starting OO based wireless sensors.

Class based functionality working
remove old functional files
add schema file

discovery needs to be enabled, not polling

fix up schema

fix Unifi discovery not returning an array

Add some debug when discovering a sensor.
Fix style.

Add missing semicolin

Add a null object (Generic) for OS.
Fill out some phpdocs

Re-organized code
Each sensor type now has it's own discovery and polling interface
Custom polling tested with Unifi CCQ

Left to do:
Implement UI (Graphs and Custom thresholds)
Alerting
Testing

Fix event message text

Remove runDiscovery and runPolling from OS, they are unused and don't belong there.

Cleanups/docs

Missed this file.

Remove the requirement to fetch the current value to check validity.
Do that automatically if current is not specified
A few cleanups here and there

First pass at graphing.
device_ and wireless_ graphs added.

Add RouterOS support

Singleton OS instance isn't required right now.
Remove that to allow some memory to be freed.

Add wireless to the device list metrics.
Make all metrics clickable

Tweak graphs a bit

Implement limit configuration page.
Use sensors page as common code instead of duplicating.
Clean up some javascript interactions:  Allow enter on values to save. Cancel if update is not needed. Enable the clear custom button after setting a custom value.
Add some wireless alert rules to the library.

Add documentation.

Add unifi client counts by ssid in addition to radio.
Optimize Sensor polling a bit.

Add HP MSM clients support (for full controller)
Fix function accessibility

Formalize the discovery and poller interfaces.

Add Xirrus clients and noise floor
move module interfaces to a more appropriate place.
push caching code up to os, unsure about this do to the limitations

No point in selectively enabling wireless discovery.  We only discover if the device supports something.

Add RSSI, Power, and Rate.
Add these sensors for Ubnt Airos.
Clean up some copyrights.

Reduce the amount of files need to add new types.
Leave graph files for consistency and to allow customization.

Remove the old wifi clients graph completely.
ciscowlc should have improved counts (total and per-ssid)

Schema didn't get added.

Impelement the rest of the AirOS sensors
Reformat and re-organize the Airos.php class.

Add several UBNT AirFiber sensors

A few fixes add links to the section headers

Add HP MSM mibs.

* Schema file got dropped in rebase.

* Add wireless menu to view sensors across all devices.
Icons in the menu need help :/

* Add HeliOS, Mimosa, and Siklu support
Sensors added SNR + Noise

* Add power and utilization to Unifi

* Update polling to prefetch all sensor data in a few snmp requests as possible

* Add Extendair: tx+rx power, aggregate rate, frequency

* Add a check for duplicate sensors in discovery.  Just print an error for now.

* Add Bit Error Ratio (named error-ratio to allow for bit error rate to be added if needed)
Fix an incorrect link in the wireless sensors table

* Add error rate and change all bps and Hz to use si units

* Fixes to limits and frequency display

* Fix overview graph frequency display
A few decimal place tweaks

* Don't allow switching sensor and wireless-sensor graphs, it doesn't work.
Change individual distance graphs to use si units

* Go through the OS and make sure I got all the sensors I can (probably missed some still)
Because pollWirelessChannelAsFrequency() is generic and a little complex, so pull it up to OS.
Message to help developers adding supports that don't return an array from discover functions.

* Fix some issues

* Remove noise and signal for now at least
A couple more fixes
Add a notification

* Oopsie

* Bonus AirFiber sensors
2017-05-01 23:49:11 -05:00