Commit Graph

583 Commits

Author SHA1 Message Date
Jellyfrog
05507526c0
Set PHP 7.2.5 as minimum supported version (#11470) 2020-04-24 11:04:36 +02:00
Wheel
59222847b9
Ubiquiti Airfiber LTU many more sensors (#11382)
* Update AFLTU mib

* Airfiber LTU details

* More detailed graphs for Ubiquiti AF-LTU

* Travis fix

* Cleanup and Modulation change

* Ethernet port status

* SNMPrec

* SNMP data json
2020-04-22 01:30:35 -05:00
Heath Barnhart
10660261df
pagerduty transport uses template message (#11459) 2020-04-21 23:48:23 +02:00
Tony Murray
47b125b247
Fix sensor link (#11454)
used bitwise operator instead of a logical one.
2020-04-21 10:19:41 -05:00
Tony Murray
cc60a76c7b
Show full path to ini file for timezone errors. (#11444) 2020-04-21 07:30:19 -05:00
SourceDoctor
cc2894c0df
Widget Eventlog Sensors Link and Mouseover functionality (#11380)
* Global Settings - Alert Default Settings

* Revert "Global Settings - Alert Default Settings"

This reverts commit a1af62b146.

* Widget Eventlog - Sensors link and overlib Image

* travis fix

* handling via AppServiceProvider

* collect function

* Travis ...

* static list of Sensor Types

* adding all sensor graph_types

* remove collect

* correct getTypes - remove change to lower case

* class sensor_descr switch

* class sensor_descr switch - revert

* Use standard sensor type names

* move types to attribute list

* going back to changes from 9eee7fad58

Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-04-19 12:57:49 -05:00
Jozef Rebjak
bb9ebb4e45
Added support for Peplink Pepwave & FusionHub (#11432)
* Added support for Peplink Pepwave & FusionHub

* Travis fixes

* Another Travis fixes

* Travis fixed

* Travis fixes

* Update peplink.svg

* Resolved reviews

Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-04-19 10:28:21 -05:00
Tony Murray
1c08c11a77
Remove Laravel helpers (#11428)
* Remove Laravel helpers

* Replace qualifier with import
2020-04-18 00:37:56 +02:00
Tony Murray
e4b49f59f6
Delete ports via eloquent event (#11354)
* Delete ports via eloquent event
Chunk delete during purge all operations so we don't use too much memory.

* protect against missing device

* fix whitespace

* fetch less from the database when deleting a device's ports
fix output
2020-04-16 09:19:58 -05:00
Tony Murray
faac90d2b3
Revert "Use which instead of whereis (#11407)" (#11413)
This reverts commit 3925e78d84.
2020-04-12 09:09:18 -05:00
Adam Bishop
492ab32b6d
Add support for sending events to Sensu (#11383)
* Add support for sending events to Sensu

Sensu is an alerting and monitoring service (and much more) that has a
nagios compatible check API.

This transport translates LibreNMS alerts into Sensu events, and sends
them to the agent API running on the same host as the poller.

The transport has a few options, but none of them are required - if the
Sensu agent is correctly configured, alerts will be sent as soon as the
transport is enabled.

There's a fair amount of code, as I've tried to translate as much data as
possible between LibreNMS and Sensu.

* Update Transports.md

* If alerted is 0, send an "ok" alert dated rrd.step / 2 seconds ago

This makes Sensu aware of the last time the check ran successfully (ish).
If we don't send the initial "ok", Sensu will either display 'unknown',
or an incorrectly high duration for the incident.

Alerted gets set to 1 after the first alert is sent.

We choose rrd.step / 2 as:
 * rrd.step is the maximum time ago the check could have succeeded
 * we halve it, so that if a check is flapping, it is not masked

Basically, we guess that the check fails around halfway through the time
since the poller last ran.

* Add additional metadata

* Improve codeclimate slightly

* Consider names that are 2 or 3 components long
2020-04-11 14:29:13 -05:00
Jellyfrog
3925e78d84
Use which instead of whereis (#11407)
which searches in PATH
whereis -b doesn't exist on some OSes
2020-04-11 13:03:39 +02:00
Heath Barnhart
d6de5cb67b
CyberPower SNMP Traps (#11403)
* Initial Commit of Handlers

* Starting unit tests

* Completed Unit Tests
2020-04-10 13:27:15 +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
PipoCanaja
ad1c7d0e19
IPv6 support for BGP peers in VRP devices (#11243)
* ipv6 support for BGP routes in VRP devices

* reverse bgpPeers array to allow VRF aware BGP

* codeclimate

* codeclimate

* codeclimate, finally

* Split VRP out of bgp-peers for readabilty

* Split VRP out of bgp-peers for readabilty

* tests

* CodeClimate

* improve function description

* improve function description

* v6data

* rebase

* space

* ipv6 support for BGP routes in VRP devices

* reverse bgpPeers array to allow VRF aware BGP

* codeclimate

* codeclimate

* codeclimate, finally

* Split VRP out of bgp-peers for readabilty

* Split VRP out of bgp-peers for readabilty

* tests

* CodeClimate

* improve function description

* improve function description

* v6data

* rebase

* space

* fixed corner case
2020-04-10 13:22:26 +02:00
Martin22
c379fee161
Add support Ray3 (#11374)
* Add support Ray3

* Create ray3.json

* Fixed copyrights, comments and move MIB file.

Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-04-05 17:13:22 +02:00
Tony Murray
7688426c85
Fix adsl graphs (#11379)
disable name checking
2020-04-04 07:41:22 -05:00
Tony Murray
f0d68a1ad8
Update PHP dependencies (#11377)
* Update composer dependencies
Fix PSR-4 violations

* Actually support PHP 7.1 :D

* all trap tests should extend SnmpTrapTestCase
2020-04-03 17:13:18 -05:00
Jellyfrog
19ab723167
Also count reviewer help in changelog (#11376) 2020-04-03 11:50:34 -05:00
Tony Murray
217969e140
Update php-codesniffer (#11368)
* PHPCS 3.5+

* Fix newly detected style issues
2020-04-03 08:41:24 -05:00
Martin22
0b78bb202e
Mikrotik - Updated MIB file and added Wireless Quality (#11347)
* Updated MIB file and added Wireless Quality

* Update snmprec file

* New snmprec file and restore original routeros.snmprec

* Revert "New snmprec file and restore original routeros.snmprec"

This reverts commit ce3a1fbc048b7b084adf3b07f17b5119b9e60d4f.

* Fix snmprec files

* Create routeros_wifi.json

* Update routeros.json

* rebase, more

Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
2020-04-01 20:13:11 +02:00
Hayden
cdb6a74dc8
implement watchdog to librenms-service (#11353)
* add watchdog to librenms-service to check log file
add Redis timeout to librenms-service

* updated docs

* fixed logfile_watchdog() indentation in service.py

* indentation fix

* code climate patch

* updated default redis timeout if alerting frequency is 0
2020-03-31 23:10:45 -05:00
Tony Murray
46c0587caf Bump version to 1.62 2020-03-31 20:51:06 -05:00
SourceDoctor
f7f6c63e86
QueryBuilder Filter alphabetic sorting (#11358)
* Global Settings - Alert Default Settings

* Revert "Global Settings - Alert Default Settings"

This reverts commit a1af62b146.

* Sort Querybuilder Filter alphabetic
2020-03-31 04:30:51 +02:00
Tony Murray
16f02f8b3b
Fix issue when field name is longer than allowed (#11349)
by rrdtool
2020-03-25 14:46:00 -05:00
Tony Murray
67f3d889b9
Only check depedencies once in validate.php (#11316)
* Only check depedencies once in validate.php

* Update librenms-service.py
2020-03-23 09:05:18 -05:00
Nick Hilliard
fb7c578fdf
symfony requires php-dom extension (#11320) 2020-03-22 14:02:07 -05:00
Tony Murray
22e8b16530
Fix show rrdtool command (#11305) 2020-03-19 10:12:00 -05:00
Tony Murray
df16de9d2f
Refactor Datastores to allow future improvements. OpenTSDB Tags. (#11283)
* Datastores to object oriented code, using the Laravel IoC container

Change instantiation
better DI
move OpenTSDB

Small re-orgs

remove unused stuff

Fix graphs and other scripts

Use DI for all except rrd

fix up connection error handling

Add tests, fix up a "few" things
Add Config::forget()

Style fixes

Don't reference legacy code

remove accidental code paste

Add datastores phpunit groups

some tests

* rebase fixes

* some test fixes

* shorter tests

* shorter tests

* Don't except when rrdtool can't be started.

* restore tests

* fix rrd tests

* fix iterable change upstream

* fix isValidDataset

* fix invalid data bug

* fix mysql incorrect ds

* fix issue with data that is too long

* use regular data_update()

* Use log facade

* OpenTSDB mis-ordered arguments fix

* Making a singleton with different options makes different singletons.  Just use the global config settings to disable datastores.

* only filter tags for datastores that won't it don't modify the tags permanently

* Update copyrights to include original authors.

* Stats for all datastores

* Fix mysql sends different rrd / other ds names

* fix snmp last stats not initialized
remove unused function

* remove unused function and move single use function closer to its use

* InfluxDB does not need to update null or U values.
Skip write if all fields are empty

* Fix smart value checks

* fix style issues

* Make sure port data is stored the same way as before for Graphite and OpenTSDB
Add ifIndex tag to all to be compatible

* Missed rrdtool_tune() call

* Test update WIP

* OpenTSDB now includes tags

* fix style
2020-03-16 09:17:58 -05:00
SourceDoctor
4e349efd11
Rewrite Poller Management to Blade/Eloquent (#11277)
* Rewrite Poller Management to Blade/Eloquent

* remove further no more needed file

* Code Climate

* Code Climate

* hardcode tabs

* change URL style

* change prefix from poller-groups to poller

* .

* parameter fix

* Refactor to use more direct routing.
remove switch statement.

Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-03-13 20:58:37 +01:00
crcro
2ee2862357
app: mailcow-dockerized postfix stats (#11058)
* app-mailcow-dockerized-postfix

* fix docs

* updated niceCase

* test-data

* snmprec upload

* new test data

* new test data
2020-03-13 10:16:03 +01:00
Tony Murray
7fe895bd08
Revert "Refactor datastores to classes (#9179)" (#11273)
This reverts commit e5dad7a64e.
2020-03-11 07:52:52 -05:00
Tony Murray
e5dad7a64e
Refactor datastores to classes (#9179)
* Datastores to object oriented code, using the Laravel IoC container

Change instantiation
better DI
move OpenTSDB

Small re-orgs

remove unused stuff

Fix graphs and other scripts

Use DI for all except rrd

fix up connection error handling

Add tests, fix up a "few" things
Add Config::forget()

Style fixes

Don't reference legacy code

remove accidental code paste

Add datastores phpunit groups

some tests

* rebase fixes

* some test fixes

* shorter tests

* shorter tests

* Don't except when rrdtool can't be started.

* restore tests

* fix rrd tests

* fix iterable change upstream

* fix isValidDataset

* fix invalid data bug

* fix mysql incorrect ds

* fix issue with data that is too long

* use regular data_update()

* Use log facade

* OpenTSDB mis-ordered arguments fix

* Making a singleton with different options makes different singletons.  Just use the global config settings to disable datastores.

* only filter tags for datastores that won't it don't modify the tags permanently

* Update copyrights to include original authors.

* Stats for all datastores

* Fix mysql sends different rrd / other ds names

* fix snmp last stats not initialized
remove unused function

* remove unused function and move single use function closer to its use

* InfluxDB does not need to update null or U values.
Skip write if all fields are empty

* Fix smart value checks

* fix style issues
2020-03-10 19:08:00 -05:00
SourceDoctor
fa753c2c57
Fix - not - not in - Operator Crash in Device Group (#11250) 2020-03-07 16:29:46 +01:00
SourceDoctor
c059225652
Changed poller member validation step and message (#11239) 2020-03-05 16:50:53 +01:00
Tony Murray
c70e1b936a Bump version to 1.61 2020-03-01 22:03:32 -06:00
Tony Murray
21518a5cfd
Validate that php sockets is available (#11177) 2020-02-25 19:00:12 -06:00
PipoCanaja
13e6a38ee4
Added Cambium PTP670 (#11186)
* cambium PTP670

* Wireless data

* space

* space
2020-02-26 01:28:40 +01:00
Tony Murray
9fb0f1713d
Fix global settings array validate messages (#11199) 2020-02-25 07:48:05 -06:00
Tony Murray
b78084f1ba
Fix invalid dnos test data (#11158)
It encoded non-ascii data in the test string
2020-02-16 17:49:06 -06:00
SourceDoctor
5bfc44f812
Location based Alert Rule (#11128)
* Location base Alert Rule

* travis fix
2020-02-12 12:53:26 -06:00
joseUPV
3b8e6c619e
Change Poller time validation (#11108) 2020-02-11 20:32:54 +01:00
Jellyfrog
c380921d4b
Speed up canAccessDevice/devicesForUser (#10992)
Relying on filtering on user_id/device_id with laravel/arrays is slow.
By splitting the cache on user_id, we can utilize faster array functions
2020-02-05 18:00:08 -06:00
Joseph Tingiris
bf3522614c
Add a space for times like '1 minute' (#11105)
* Add a space for short times like '1 minute'

* codeclimate, round 1
2020-02-05 17:58:52 -06: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
Tony Murray
dc60edd8bf
Include maintainers in release notes (#11002)
* Include maintainers in release notes
Use GraphQL to pull in the exact data we need

* remove changelog

* Update LibreNMS/Util/GitHub.php

Co-Authored-By: Jellyfrog <Jellyfrog@users.noreply.github.com>

* Update LibreNMS/Util/GitHub.php

Co-Authored-By: Jellyfrog <Jellyfrog@users.noreply.github.com>

* style fixes

Co-authored-by: Jellyfrog <Jellyfrog@users.noreply.github.com>
2020-01-30 06:15:03 -06:00
Joe Clarke
0a34322877
Do not strip tags when markdown is in use. (#11075)
Markdown supports limited HTML tags, which can help enrich messages.
Additionally, eliminate extra whitespace when markdown is used as that
will have weird output effects.
2020-01-29 05:59:23 -06:00
HostIRE
761d105847 Added OS definition and discovery for SIAE Alfo80HD (#11063)
* Added definition and sensors for SIAE Alfoplus80HD

* updated the units for the wireless rate sensor

* Added test data

* regenerated test data as requested by PipoCanaja
2020-01-27 19:39:52 +01:00
SpaceDump
25920be1db Added fix for escaping underscore while using Markdown (#11070)
* Added fix for escaping underscore while using Markdown

* Corrected indentation
2020-01-26 08:05:49 -06:00
Heath Barnhart
59f4491afc SNMP Traps for Juniper Power Supplies (#10965)
* Juniper Power Supply Trap Handlers

* Added unit test

* fixed tests
2020-01-24 05:59:59 -06:00