Commit Graph

475 Commits

Author SHA1 Message Date
jozefrebjak
f07651a2eb Added Teltonika Rutos-2xx wireless sensors (#10646)
* CodeClimate Fix

* Added Teltonika Wireless Sensors

* Removed HiveOS local changes

* cleanup

* Update Rutos2xx.php

* typo fix

* Blank Line Fix

* Travis FIX

* White Space Fix
2019-10-07 13:16:51 +00:00
Tony Murray
be04388137
Store config data serialized (#10651)
* Store config data serialized
This way we can store null, booleans, and more reliably.

* Use model to get the mutated output.

* fix whitespace and unused function

* use json_encode/decode and casts
migration to transfer

* json_encode JSON_UNESCAPED_SLASHES

* Use JSON_UNESCAPED_SLASHES.  That is only relevant if you are printing into an HTML page.

* pre-encode the seed...

* filter other fields besides config_value
2019-10-06 21:51:22 +00:00
Tony Murray
7482422614
When sending email alerts use CRLF for windows clients (#10563)
* When sending email alerts use CRLF for windows clients

* Convert hard \r\n into line return in templates

* there is no down really
2019-10-02 14:08:10 +00:00
Tony Murray
ef4e6de867
Fix device_groups in alert/group builder (#10643) 2019-10-02 13:54:54 +00:00
bewing
74724a4618 Add redis sentinel support to dispatcher service (#10598)
* Add redis sentinel support to dispatcher service

* Update docs for redis sentinel support

* Don't re-raise python exception in service
2019-10-01 06:51:07 +00:00
Tony Murray
4c075a3484 Bump version to 1.56 2019-09-30 11:07:05 +00:00
pobradovic08
91ac7aff7f Removed ambiguity in Component filter query (#10638)
In case we try to filter the component by it's `id`, we ran into ambiguity issue because both `component` and `component_prefs` tables have column `id`. Fixed by filtering explicitly on `component` table.
2019-09-29 19:23:53 +02:00
soto2080
2139eed306 Add EdgeCore ECS4110-28T Support (#10525)
* Add ECS4110 cpu usage

* Add cpu usage oid for ECS4110
* TESTED

* Fix EdgeCore ifOperStatus does not follow the Cisco convention
* Since EdgeCore use "lowerLayerDown" in ifOperStatus when port is unplugged
* On the other way, Cisco use briefly "down".
* So change "lowerLayerDown" to "down" to workaround the bug that will make port always show as up/up

* Refactor Edgecos cpu usage oid
* Codeclimate is unhappy about it maybe the refactor will make it happy.

* Add EgdeCore ECS4110 MIB

Just got MIB from EdgeCore

* Refactor Egdecos Mempool

* a bit refactor of Mempool discover and polling
* add support for ECS4110 via MIB

* Modify ECS-4110 MIB

* MODULE-IDENTITY change from ECS4110-52P-MIB to ECS4110-MIB
* strip off syntax error part(time range)

* Add EdgeCore ECS-4110 OS polling

* polling OS and Hardware via MIBs

* Fix typo

* Sorry that I am dazzled

* Fix Syntax Check

* Codeclimate is a bit aggressive

* Update edgecos.inc.php

* Update edgecos.inc.php

* Revert "Fix EdgeCore ifOperStatus does not follow the Cisco convention"

This reverts commit 27971b34a8.

* Add snmprec file for unit testing.

* Create edgecos_ecs4110-28t.json
2019-09-28 03:18:24 +00:00
pobradovic08
f672c12bcc discovery: Added Cisco QFP processor (#10622)
* Added Cisco QFP processor discovery

* Fix QFP index loop variable name

* Add test data for IOS-XE processors (from ASR1001-HX)

* set the right variable
2019-09-28 01:22:06 +00:00
Tony Murray
31eced4875
Fix creating device groups issue (#10521)
* Fix creating device groups issue
Not being able to write the device relationships file should not be fatal

* remove @

* bootstrap.php calls this, Laravel isn't booted yet

* d_echo does not include \n
2019-09-25 06:41:18 +00:00
seros1521
2db29a325f Add procedure URL to alert templates (#10609) 2019-09-24 13:08:22 +02:00
Tony Murray
d5b61002cc
MPLS only poll if records exist (#10523)
Downside is if all are removed then re-added, will have to wait for discovery for them to be re-added.
2019-09-18 14:49:22 +00:00
jozefrebjak
344f315991 AeroHive OS Wirelless Noise Floor Fix (#10608)
* AeroHiveOS NoiseFloor Fix

* Update hiveos-wireless_650ax.snmprec

* Update HiveosWireless.php

* Update hiveos-wireless_650ax.snmprec

* Update hiveos-wireless_650ax.json

* Update hiveos-wireless.json

* Update hiveos-wireless_650ax.json

* Update hiveos-wireless_ap130.json

* Update hiveos-wireless_ap130.json
2019-09-18 14:47:31 +00:00
Shao Yu-Lung (Allen)
9ac70037bb Add LINE Notify Alert Transport. (#10495)
* Add LINE Notify Alert Transport.

* Fix code style.

* Update document.

* Update Linenotify.php
2019-09-05 04:30:53 +00:00
Lee Keitel
85492d245d Catch exceptions generated by alert transports (#10565)
* Catch exceptions generated by alert transports

The alert.php script would completely die if a single alert
transport generated an exception. For example the API transport
if CURL couldn't connect to the api endpoint. The script
should attempt to send alerts to all working transports and not
die because a single transport fails.

* Move alert transport creation into try block

Catch any potential exceptions during transport creation.
None of the transports currently implement __construct()
but the DB could throw and in the future there may be
a transport that does implement it.
2019-09-05 02:13:32 +00:00
Martin Zatloukal
a136e5094d Fix ericsson MINI LINK wifi sensors (#10566)
* Fix Ericsson Mini-link wifi sensors

* Fix Ericsson Mini-link wifi sensors

* Fix Ericsson Mini-link wifi sensors

* Fix Ericsson Mini-link wifi sensors

* Fix Ericsson Mini-link wifi sensors
2019-09-04 02:57:49 +00:00
Tony Murray
74f1f65234 Bump version to 1.55 2019-09-03 04:19:02 +00:00
Brian Sidebotham
d0d7d8552e Fixed testing fping output when the LibreNMS user doesn't have a valid shell (#10567) 2019-09-02 22:11:24 +02:00
rdezavalia
a0ba412d6c Added more DELL switches in order to get proper CPU stats (#10529)
* Added more DELL switches in order to get proper CPU stats

More DELL switches supported:

* N4032
* N2048
* N2024
* N3048
* N2048P
* 54XX

* fixed indent as requested by phpcbf

* fixed multiline argument function call

* removed blank lines

* Added CPU stats for N4064F

* Added test data for N4064F

* fixed indent as requested by phpcbf

* Added test data for Dell Powerconnect 5424

* Added test data for Dell Powerconnect 5448

* Added test data for Dell Powerconnect 5524

* Added test data for Dell Powerconnect N4032

* Added test data for Dell Powerconnect N2024

* Added test data for Dell Powerconnect N2048

* Added test data for Dell Powerconnect N2048P

* Added test data for Dell Powerconnect N3048

* Fixed processor usage data

* Fixed snmpsim data for 3056

* Fixed processor usage

* easier to read format

* remove space changes

* 3056 should be 8%
2019-08-29 22:11:23 +00:00
Tony Murray
852647198b
use -s option for older versions of git (#10561)
fix small visual issue too
2019-08-27 16:48:21 -05:00
Jellyfrog
47e4641e04 Convert About page to Laravel (#10551)
* Convert About page to laravel

* clean up callback stuff

* More translatable strings
2019-08-24 16:52:10 -05:00
SniperVegeta
e0a33021da Update RunAlerts.php (#10552)
Added for {{ $alert->id }}
2019-08-22 14:06:44 -05:00
Orsiris de Jong
ccf2d9a5c5 Use PHP sys_temp_dir by default (#10428)
* Fix installer not generating tmp directory directive

This fixes a usecase when open_basedir is set, not allowing php to write to default temp directory /tmp.
In that case, temp directory is set by `php_admin_value[sys_temp_dir] = /var/www/site/tmp`
Without setting config['temp_dir'] in generated config.php, LibreNMS will use /tmp regardless of what is set in fpm configuration.

* is_writeable and is_writable are both valid, but let's stay consistent

* Make $config['temp_dir'] non static

* Remove $config['temp_dir'] from standard config.php

* Make sys_get_temp_dir() fallback to '/tmp'

* Update defaults.inc.php

* Update install.php

* Update Config.php

* Update defaults.inc.php

* Update defaults.inc.php
2019-08-22 18:08:42 +01:00
Martin Zatloukal
f16805b71d Added support Ericsson MINI-LINK (#10546)
* Added support Ericsson MINI-LINK
* cleaning
2019-08-22 13:19:50 +02:00
Tony Murray
2d2a55e47d
Fix .env with number symbols (#10497)
* Fix .env with number symbols

* Handle tabs and trim when quoting so we don't include spaces
2019-08-06 22:03:13 -05:00
Tony Murray
42fd5afb23
Laravel 5.8 and updated dependencies (#10489)
* Laravel 5.8
and dependencies

* Fix cache time

* upstream base file changes

* Accidentally ran composer with PHP 7.3

* fix test error

* one more

* one more

* one more

* fix dotenv loading
2019-08-05 15:54:58 -05:00
Tony Murray
e99f421511
Remove legacy auth usage of $_SESSION (#10491)
* Remove auth use of $_SESSION

Will break plugins that depend on $_SESSION, Weathermap was already fixed.
Port them to use Auth::check()/Auth::user()/Auth:id()

* revert accidental replacement
2019-08-05 14:16:05 -05:00
Tony Murray
f62f254465
more changelog categories (#10470) 2019-07-29 08:50:33 -05:00
Tony Murray
c14fd96bb4 Bump version to 1.54 2019-07-28 21:47:34 -05:00
Vitali Kari
1de640c3aa MPLS Services (#10421)
* initial database migrations

* first part, discovery

* second part, polling

* add SAP polling and discovery

* style checks

* rename variables in more generic way

* html global pages for sdp and sdp binds

* add Services and SAPs

* port links, database, etc.

* html device routing pages

* add tests

* checks

* rework database id relationship

* scruntinizer inspection

* fix unit test for new mpls tables
2019-07-27 23:11:04 -05:00
ifred16
77d94a458b Allow filtering of getUserlist LDAP function (#10399)
* Modification of the getUserlist fonction to use ldap filter

* Modification of the getUserlist fonction to use ldap filter V2

* documentation of auth_ldap_Userlist_filter option

* documentation of auth_ldap_Userlist_filter option V2

* Allow filtering of getUserlist LDAP function
2019-07-23 22:57:16 -05:00
Tony Murray
36a5da00ca
Fix missed alert function renames (#10452) 2019-07-18 11:05:43 -05:00
Heath Barnhart
851994cfb8 Alert Subsys to OOP and SNMPTraps trigger Alert Rules (#9765)
* Changed snmptrap.php and handlers to allow for alerts.

* Moved RunRules() to Dispatcher.php

* Modified includes, passes pre-commit tests locally.

* Converted RunRules to OO, fixed formatting in files found by TravisCI

* rebase, covert alert subsy to oop

* Modified init.php to call new Alert subsystem

* fixed dependencies

* Resolved undefined functions

* Fixed PingCheck.php not triggering

* Changed runAlerts to __construct

* Fixes
Can't have Config inside empty()
incorrectly named function (my fault)
poller.php missing shebang
organize imports
2019-07-18 08:36:02 -05:00
Joe Clarke
8bbc69a878 Add support for using Markdown for the Ciscospark transport (#10442)
* Add support for using Markdown.

Alert templates can be written using Webex Teams (i.e., Spark) Markdown,
which makes for some richer alerts.  This option defaults to false to
maintain Principle of Least Astonishment.

* Update Cisco Spark docs.

* Mention that Cisco Spark is now called Webex Teams
* Add support for Markdown

* Refactor text.

Do not exceed 80 characters per line.

* Refactor code to meet style guidelines.

* Remove errant tabs and use spaces instead
* Correct type check
* Remove use of 'else'
2019-07-14 16:34:22 -05:00
PipoCanaja
ef637a7c77 API Transport - Empty lines handling (#10431)
* API Transport - Empty lines handling

* Handle empty lines

* Update Api.php
2019-07-10 23:23:45 -05:00
PipoCanaja
55f67f42fe Refactor Api transport to use Guzzle (and new variables syntax) (#10070)
* Allow new {{ $xxxx }} syntax

* Properly handle urlencode on variable values without braking the URL, and uses Blades

* Doc
Doc typo

* use Guzzle for HTTP requests

* Add Basic auth support

* Doc update

* clean

* Revert Blades, but keep the {{ $xxxx }} syntax

* Revert Blades, but keep the {{ $xxxx }} syntax

* Init Vars and comments

* Notifications

* api-options are not required

* Update notifications.rss
2019-07-04 16:55:29 +01:00
Tony Murray
8ad55b55b5
More changelog generation changes (#10397)
more categories and reorder some.
fallback category
2019-07-01 08:06:27 -05:00
Tony Murray
87a2231469 Bump version to 1.53 2019-07-01 00:07:02 -05:00
Tony Murray
dd2fc0baf8
Fix Dummy alert transport (#10379) 2019-06-26 09:47:03 -05:00
Tony Murray
f3ba8947f7
Use Config helper (#10339)
remove usage of global variable
2019-06-23 00:29:12 -05:00
Tony Murray
7f6a342d71
Fix device group queries that don't start with devices table (#10360) 2019-06-21 06:53:48 -05:00
Tony Murray
b5ca6573df
Fix device groups not using cached joins sometimes (#10353)
for device groups that only reference the devices table
2019-06-20 08:58:35 -05:00
Tony Murray
1a60c44eb0
Device groups rewrite (#10346)
* 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
2019-06-19 16:01:53 -05:00
Tony Murray
c2b09b8f80
Revert "Rewritten device groups (including static) (#10295)" (#10340)
This reverts commit cfc51d51f5.
2019-06-16 21:52:57 -05:00
Tony Murray
cfc51d51f5
Rewritten device groups (including static) (#10295)
* 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
2019-06-16 08:27:22 -05:00
Tony Murray
d4017c1428
Update VMWare guest IDs (#10338)
63 added others changed
move into Rewrite class
2019-06-14 22:27:14 -05:00
Tony Murray
cf35d99319
Warn maintenance tasks are disabled (#10273) 2019-06-06 23:41:00 -05:00
Vitali Kari
00b148dbd3 Add MPLS Support (#10263)
* 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
2019-06-06 16:12:13 -05:00
Tony Murray
6ba05cdbbb
Enable menu translation (#10298)
And better translation support for sensors, not complete
2019-06-04 20:03:50 -05:00
Tony Murray
cc0fa745b2
Don't include time macros in field list (#10299)
They can only be used as the value
2019-06-03 22:34:34 -05:00