Commit Graph

17054 Commits

Author SHA1 Message Date
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
That Guy --^
0e5a6f90ef update definition for devices running VyOS so they're discovered as Unix devices and can have sensors discovered (#11390) 2020-04-11 13:57:00 -05:00
PipoCanaja
e4fdac18e7 Split BGP-Peer for Timos in its own file (#11410)
* timos in its dedicated file

* timos in its dedicated file
2020-04-11 13:56:15 -05:00
Hayden
8993817674 Fix memcached always reporting "ERROR" for app_state (#10739)
* perform json_encode() on memcached app $response data to match update_application() string parameter

* return raw snmp_get result for memcached response data during update_application()
2020-04-11 13:53:28 -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
PipoCanaja
ae5da84d57 Typo in F5 serial detection 2020-04-10 20:10:34 +02:00
Tony Murray
4958aaf1a6 Update Meraki logos (#11406)
Had an issue with the SVG...
2020-04-10 18:05:27 +02:00
SourceDoctor
f7c85fedfa Toggle visibilty of Dashboard Editor (#11321)
* Toggle visibilty of Dashboard Editor

* code climate

* reposition Menu point

* add Dashboard Menu

* unclickability ob Dashboard menu

* Global Settings - Alert Default Settings

* Revert "Global Settings - Alert Default Settings"

This reverts commit a1af62b146.

* update to Frontend rewrite

* globalize hide_dashboard_editor variable

* .

* .

* remove legacy code

* update link path to laravel routing

* Travis ...

* Travis ...
2020-04-10 14:34:44 +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
PipoCanaja
07d4da21ca Add support for Ascom IPBS (#11308)
* ascom support

* tests

* typo

* Correct missing 'mpls' in misc/os_schema.json

* remove mpls for now

* tests

* Update ascom.svg

* Don't disable already disabled modules

As I usually state, not much gain in disabling these here.   Would be better to optimize the modules if you think they take too long on devices that don't have support.

* refactor polling code

Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-04-10 13:21:25 +02:00
vsessink
123a669386 fixed race conditions in distributed poller setup (#11307) 2020-04-09 22:38:49 -05:00
Tony Murray
e9a3317749 Fix dashboard size (#11405)
* Fix dashboard size
Missing container
scrollbar and empty space on the right

* Can't change the width it will break existing dashboard :S
Odd that the default width 6 doesn't fit nicely into 20
2020-04-09 22:15:05 -05:00
Tony Murray
76e58b6cb2 Clarify that you can use IP or hostname to add device (#11393)
Remove overwrite IP when adding devices, it is very rare this should be used and the setting is misleading.
2020-04-09 23:39:37 +02:00
Tony Murray
961beb0e8b Fix Panos icon (#11404)
viewbox instead of width/height
2020-04-09 23:09:35 +02:00
dneto82
01350a29ab Update on OS only logo. (#11399)
* Update on OS only logo.

Update for Palo Alto 2020 OS only logo.

* Update panos.svg

Co-authored-by: Jellyfrog <Jellyfrog@users.noreply.github.com>
2020-04-09 11:33:02 +02:00
dneto82
1bd86c4e58 Updated panos.svg (#11398)
* Updated panos.svg

Update for Palo Alto Networks 2020 Logo.

* Update panos.svg

Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-04-09 10:49:56 +02:00
Tony Murray
204a79418c Fix global search by IP (#11395) 2020-04-08 22:46:15 -05:00
Danislav
b3690ea11e Read the db_port as integer (#11392)
db_port must be read as integer.
I have missed to add this in the pull 11284
2020-04-08 16:27:53 -05:00
SourceDoctor
fc921a143c Cleanup unused code (#11391)
* Global Settings - Alert Default Settings

* Revert "Global Settings - Alert Default Settings"

This reverts commit a1af62b146.

* remove not more used code

* Travis restart
2020-04-08 15:56:44 -05:00
Alexandre L
a4cf77b26b Fix device creation using overwrited ip (#11388)
* Fix device creation using overwrited ip

`deviceArray` was creating a device missing the `overwrite_ip` field, so it was not used by `isSNMPable`

* Fix device creation using overwrited ip

Part 2: Fix using not yet set variable

* Fix device creation using overwrited ip

Part 3: remove double space

* Useless commit to trigger Travis
2020-04-08 11:47:40 +02:00
Martin22
820a98bdcb Added skip values for older devices without temperature sensor support. (#11387) 2020-04-08 09:29:37 +02:00
Tony Murray
5f2eab0ba5 Create FUNDING.yml 2020-04-06 14:12:24 -05:00
Mathieu Poussin
29748fe306 BGP API: Allow to filter by local and remote peer address. (#11340) 2020-04-05 17:16:16 +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
Tony Murray
4335607a8d fix asterisk test data (#11378)
* fix test data
oops

* fix order

* one too many
2020-04-03 12:20:41 -05:00
Jellyfrog
19ab723167 Also count reviewer help in changelog (#11376) 2020-04-03 11:50:34 -05:00
TFujiwara
49afd24ed6 Patch unix agent (#11312)
* Fixed unix packages and polling

* Update packages.inc.php

* Update unix.inc.php

* Update packages.inc.php

* Update packages.inc.php

code guidelines

Co-authored-by: SourceDoctor <sourcehhdoctor@gmail.com>
2020-04-03 10:37:08 -05:00
Jellyfrog
0b5fcb58c8 Convert alert modals to blade (#11373) 2020-04-03 09:52:42 -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
Tony Murray
1445263290 Fix rrd format issues for asterisk and cipsec-tunnels (#11375) 2020-04-03 07:57:37 -05:00
SourceDoctor
83d980515c Rrdcached Socket Check fix (#11372)
* Global Settings - Alert Default Settings

* Revert "Global Settings - Alert Default Settings"

This reverts commit a1af62b146.

* RRDCached Socket Check fix
2020-04-02 20:50:39 -05:00
Tony Murray
7d2a1ae799 Display custom types as in the config file (with ucwords) (#11367)
* Display custom types as in the config file (with ucwords)

* filter same line
2020-04-02 23:38:38 +02:00
Jellyfrog
69280b3501 Fix dashboard html escaping and javascript redirect (#11370) 2020-04-02 23:33:18 +02:00
Hayden
7c770a99d8 Fix 10853 os specific syslocation (#11082)
* added functionality to set sysLocation override in $os.inc.php files

* php styling fixes

* updated docs for location override in $os.inc.php

* patch poweralert.inc.php to use $location override

* added location override for enexus (Eltek)

* update phpdoc for set_device_location()

* converged location code in core.inc.php to use set_device_location()

* added new snmprec test data for enexus os

* Travis test data

* remove enexus_smartpacks2 test data

* Revert "remove enexus_smartpacks2 test data"

This reverts commit 36c8fc7036.

* updated enexus_smartpacks2 test data with generic syslocation

* kick travis CI

* kick travis CI
2020-04-02 23:28:12 +02:00
Jozef Rebjak
6d8db3fc82 Update RRDTune.md (#11369) 2020-04-02 12:02:36 +02:00
Hayden
e469d15493 check if lat/long exist for each device with link (#11366) 2020-04-02 10:49:28 +02:00
Jozef Rebjak
ad58cc6db9 Added Support for AirConsole Servers (#11302) 2020-04-01 22:51:36 -05:00
Martin22
df95b771b2 Device: Added IMCO POWER (#11296)
* New device IMCO POWER

* Add other outputower sensors

* Fix description sensor battery voltage

* Fix num_oid load sensors

* Index added

* Added test data

* Fix svg file

* Change image svg to png

* Fix yaml and change image size

* Fix permission .gitignore file

* Fix permission

* Fix state
2020-04-01 20:22:14 +02: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
FingerlessGloves
f34f552c57 OPNsense poller better reporting of Version and Platform (#11350)
* OPNsense better reporting of Version and Platform

OPNsense can now report exact version and platform, if the settings in OPNsense is ticked "Display Verion in OID".

* OPNsense poller change to better type check

OPNsense poller change to better type check on $OIDVersionString, which returns false if not found but contains string if it is.

* Add missing bracket to if statement

Add missing bracket to if statement on $OIDVersionString

* OPNsense poll add required spaces to function call

OPNsense poller add required spaces to function call, for coding style checks to pass.

* OPNsense test data json files

OPNsense test data json files
2020-04-01 20:12:55 +02:00
Tony Murray
60533e0bf9 Fix shared dashboards missing users (#11365)
* Fix shared dashboards missing users

* Translation for Deleted User
2020-04-01 11:04:06 -05:00
Tony Murray
3dae7784de Protect against plugins that leak output (#11364)
* Protect against plugins that leak output

* comment
2020-04-01 11:03:20 -05:00
SourceDoctor
bbe88c71b5 Device test fix - missing Columns (#11362)
* test fix
2020-04-01 15:35:06 +02:00
SourceDoctor
7dfb4ef1df Adding Column ifSpeed_prev, ifHighSpeed_prev to Ports Table (#11348)
* adding Column ifSpeed_prev, ifHighSpeed_prev to Ports table

* grammar fix

* rename migration class

* tests

* .

* .
2020-04-01 10:50:33 +02:00
SourceDoctor
7b8ca66c67 Get configured Rrdcached Socket from config (#11351)
* Global Settings - Alert Default Settings

* Revert "Global Settings - Alert Default Settings"

This reverts commit a1af62b146.

* Get RRDCached Socket from Configuration

* socket check

* misstype fix

* travis fix

* .
2020-03-31 23:16:15 -05: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