16258 Commits

Author SHA1 Message Date
1f19eb2146 Fix mysql bug in cisco-sla module (#10357)
* Update cisco-sla.inc.php

Fix SQL error during discovery of cisco-sla.
This error points to /opt/librenms/includes/discovery/cisco-sla.inc.php(80).

LOG ERROR:
[2019-06-18 07:07:01] production.ERROR: SQLSTATE[HY093]: Invalid parameter number: mixed named and positional parameters (SQL: UPDATE slas set device_id=39,sla_nr=1,owner=,tag=xxx.xxx.xxx.xxx,rtt_type=echo,status=1,opstatus=0,deleted=0 WHERE sla_id = 5) (SQL: UPDATE slas set device_id=39,sla_nr=1,owner=,tag=xxx.xxx.xxx.xxx,rtt_type=echo,status=1,opstatus=0,deleted=0 WHERE sla_id = 5)#0 /opt/librenms/includes/discover
y/cisco-sla.inc.php(80): dbUpdate(Array, ‘slas’, ’sla_id = :sla…’, Array)
#1 /opt/librenms/includes/discovery/functions.inc.php(179): include(’/opt/librenms/i…’)
#2 /opt/librenms/discovery.php(120): discover_device(Array, false)
#3 {main}

I suggest to change this lines of code in cisco-sla.inc.php to avoid this error:

line 80: dbUpdate($data, ‘slas’, ’sla_id = :sla_id’, array(‘sla_id’ => $sla_id));
change to: dbUpdate($data, ‘slas’, ’sla_id = ?’, array($sla_id));

line 87: dbUpdate(array(‘deleted’ => 1), ‘slas’, ’sla_id = :sla_id’, array(‘sla_id’ => $existing_sla));
change to: dbUpdate(array(‘deleted’ => 1), ‘slas’, ’sla_id = ?’, array($existing_sla));

* Fix quotes

* Missed one
2019-06-21 07:16:19 -05:00
7f6a342d71 Fix device group queries that don't start with devices table (#10360) 2019-06-21 06:53:48 -05:00
6239db7435 French language support (#10277)
* First part of french traduction

* bugfix: false inattention

* merge with @murrant json and WIP

* Work in progress on a time-loss period

* Work in progress on a time-loss period

* Change with comment @Bounzz
2019-06-20 20:18:15 -05:00
1d2adecd79 Traditional Chinese language support (#10178)
* Traditional Chinese language support

* Rename zh-tw to zh-tw.json

* Rename zh-tw.json to zh-TW.json

* Update zh-TW.json

* Create preferences.php

* Update zh-TW.json

* Create auth.php

* Create commands.php

* Create pagination.php

* Create passwords.php

* Create validation.php

* Update auth.php

* Update passwords.php

* Update zh-TW.json
2019-06-20 20:17:55 -05:00
a0bcf190bf Russian language update (#10319)
* Russian language update

* Russian language update
2019-06-20 16:06:14 -05:00
210529cff3 Ukrainian language support (#10328)
* first pass of uk translation

* Update commands.php

* Update commands.php

* Update wireless.php
2019-06-20 16:05:12 -05:00
6575042f5f go through making lots of the docs more lint happy (#10342)
* clean up all but header incrementing in Creating-Transport.md

* make Device-Dependencies.md mdl happy

* make Entities.md as mdl happy as possible... one long table line left

* make mdl as happy as possible for index.md

* clean up Introduction.md as much as possible

* minor formatting cleanup... move each icon onto its own row

* make ack and notes the same style

* clean Macros.md up

* clean Rules.md up as much as possible

* tweak one line a bit to get it to format a bit nicer

* a bit more format tweaking, making sure it does not sure with >

* clean up as much as possible for Templates.md

* make Testing.md as mdl happy as possibly

* clean Transports.md up as much as possible

* clean as many issues as possible for Alerts.md

* clean up as much of ARP.md as possible

* clean up as much as possible for Bills.md

* make DeviceGroups.md as mdl happy as possible

* cleanup Devices.md

* make as mdl happy as possible Inventory.md and index.md

* mdl cleanup for Logs.md and PortGroups.md

* make Ports.md and Routing.md as happy as possible

* clean up Services.md, Switching.md, and Systems.md as much as possible

* more markup cleanup

* lots more md cleanup udner Devloping/

* reapply bits from #10343 that accidentally got removed when merging
2019-06-20 13:53:44 -05:00
72de183775 Improve UI of filter menu (#10348)
* Improve UI of filter menu

In the current UI of the filter menu, it's not readily apparent that one, you are supposed to use the filter tabs, and two, that you need to refresh in order for the filter to apply. This request adds button colors to search, update, and refresh to make the filter bar and action buttons stand out.

* Only change search button color

Changed search button color to blue to fit in better
2019-06-20 13:49:01 -05:00
5a2403e6d2 Fix saving new device groups (#10356)
We need a device group id
2019-06-20 11:35:58 -05:00
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
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
d8931e1946 Fixed multiple typos in SNMP Trap doc (#10343)
* Fix multiple typos in doc
* Update SNMP-Traps.md
2019-06-17 23:23:44 +02:00
2da6c8104b Sort Device Applications in Optionbar alphabetic (#10324) 2019-06-17 10:55:43 +02:00
c2b09b8f80 Revert "Rewritten device groups (including static) (#10295)" (#10340)
This reverts commit cfc51d51f5714519536931bc331ed981639a9d87.
2019-06-16 21:52:57 -05:00
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
2ee843d86b Check correct path for config in the installer (#10333)
* Check ../config.php for older installations in installer

For older installations, install.php is still available for installations that have the configuration file in the parent directory. This PR fixes this.

* Replace relative directory with absolute path

* Update install.php

* Update install.php
2019-06-15 18:04:18 -05:00
da9e67b296 Aruba IAP: Fix Radio State Sensor (#10335)
* 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
2019-06-15 10:10:37 -05:00
19914adc55 add raisecom os version, hardware and serial data (#10336) 2019-06-15 07:49:03 -05:00
d4017c1428 Update VMWare guest IDs (#10338)
63 added others changed
move into Rewrite class
2019-06-14 22:27:14 -05:00
0baeb07754 Split install steps into git clone and composer install (#10249)
* Split install steps into git clone and composer install
This gives the admin a little more knowledge about how to maintain the system, showing them composer_wrapper.php and su - librenms
They will get errors if composer_wrapper doesn't work because of a proxy or no internet connection

We lose stats on packagist.org (https://packagist.org/packages/librenms/librenms/stats)
If we wanted to keep stats, we could use:
```
COMPOSER_ALLOW_SUPERUSER=1 composer create-project --no-dev --no-install --keep-vcs librenms/librenms librenms dev-master
```
not sure that is worth it.

* fix composer_wrapper.php path
2019-06-12 00:21:32 -05:00
fd7defd5ec Example SNMP Trap handler class (#10311)
* Update SNMP-Traps.md

* Update SNMP-Traps.md
2019-06-12 00:19:55 -05:00
fec165fb86 Add power sensor for eaton ups (#10306)
* Add power sensor for eaton ups

* removed whitespace at end of line

* add test data
2019-06-11 23:46:43 -05:00
8c69d7dac8 Support for Fibernet XMUX4+ (#10331)
* Support for Fibernet XMUX4+

* Update fibernet.svg

remove length and width, add viewbox
2019-06-11 22:16:10 -05:00
6e7908a49e Update dependencies (#10325)
* Update dependencies
Removed symfony/contracts (v1.0.2)
Installed kylekatarnls/update-helper (1.1.1)
Updated symfony/polyfill-ctype (v1.10.0 => v1.11.0)
Updated symfony/yaml (v4.2.4 => v4.3.1)
Updated influxdb/influxdb-php (1.14.7 => 1.15.0)
Updated symfony/process (v4.2.4 => v4.3.1)
Updated symfony/finder (v4.2.4 => v4.3.1)
Updated symfony/filesystem (v4.2.4 => v4.3.1)
Updated symfony/polyfill-mbstring (v1.10.0 => v1.11.0)
Installed symfony/service-contracts (v1.1.2)
Installed symfony/polyfill-php73 (v1.11.0)
Updated symfony/console (v4.2.4 => v4.3.1)
Updated symfony/debug (v4.2.4 => v4.3.1)
Updated composer/xdebug-handler (1.3.2 => 1.3.3)
Updated composer/spdx-licenses (1.5.0 => 1.5.1)
Updated composer/semver (1.4.2 => 1.5.0)
Updated composer/composer (1.8.4 => 1.8.5)
Updated symfony/css-selector (v4.2.4 => v4.3.1)
Updated symfony/polyfill-php72 (v1.10.0 => v1.11.0)
Updated symfony/var-dumper (v4.2.4 => v4.3.1)
Updated symfony/routing (v4.2.4 => v4.3.1)
Updated symfony/polyfill-intl-idn (v1.10.0 => v1.11.0)
Installed symfony/mime (v4.3.1)
Updated symfony/http-foundation (v4.2.4 => v4.3.1)
Installed symfony/event-dispatcher-contracts (v1.1.1)
Updated symfony/event-dispatcher (v4.2.4 => v4.3.1)
Updated symfony/http-kernel (v4.2.4 => v4.3.1)
Updated symfony/polyfill-iconv (v1.10.0 => v1.11.0)
Updated egulias/email-validator (2.1.7 => 2.1.8)
Updated swiftmailer/swiftmailer (v6.2.0 => v6.2.1)
Updated opis/closure (3.1.6 => 3.3.0)
Installed symfony/translation-contracts (v1.1.2)
Updated symfony/translation (v4.2.4 => v4.3.1)
Updated nesbot/carbon (1.36.2 => 1.38.4)
Updated league/flysystem (1.0.50 => 1.0.52)
Updated erusev/parsedown (v1.7.2 => 1.7.3)
Updated dragonmantank/cron-expression (v2.2.0 => v2.3.0)
Updated lcobucci/jwt (3.2.5 => 3.3.1)
Installed psr/http-factory (1.0.1)
Updated zendframework/zend-diactoros (1.8.6 => 2.1.2)
Updated nexmo/client (1.6.3 => 1.8.1)
Updated barryvdh/laravel-ide-helper (v2.6.1 => v2.6.2)
Updated laravel/dusk (v5.0.2 => v5.1.0)
Updated sebastian/environment (4.1.0 => 4.2.2)
Updated phpunit/php-timer (2.1.1 => 2.1.2)
Updated theseer/tokenizer (1.1.0 => 1.1.2)
Updated phpdocumentor/reflection-docblock (4.3.0 => 4.3.1)
Updated doctrine/instantiator (1.1.0 => 1.2.0)
Updated myclabs/deep-copy (1.8.1 => 1.9.1)
Updated phpunit/phpunit (7.5.7 => 7.5.12)
Updated staudenmeir/dusk-updater (v1.0.3 => v1.1.1)
Updated symfony/dotenv (v3.4.23 => v3.4.28)
Updated nikic/php-parser (v4.2.1 => v4.2.2)

* Fix tests
2019-06-11 21:37:01 -05:00
d071c8b403 sort arrays before storing them in a component (#10329) 2019-06-11 07:52:42 -05:00
1ae77dfb70 Fix language select for new languages (#10323) 2019-06-07 21:07:49 -05:00
cf35d99319 Warn maintenance tasks are disabled (#10273) 2019-06-06 23:41:00 -05:00
349e102b73 enhance smart to show power_on_hours also (#10261) 2019-06-06 23:39:22 -05:00
e6ad2b5bb8 Cisco UCOS Version and Feature Fix (#10307)
* 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
2019-06-06 23:37:26 -05:00
b9ed72f1c7 mdadm rrd graph fix (#10312) 2019-06-06 23:35:20 -05:00
c7228e3b55 Extend the Dell drac module to report CMC status and sensors (#10310)
* 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
2019-06-06 23:21:52 -05:00
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
2f96570c3f fix smokeping graphs (#10317)
include pointed to the wrong place
2019-06-06 09:08:34 -05:00
47be799234 update syslog.md (#10309) 2019-06-05 22:21:53 -05:00
9dc60029be change <h2></h1> ? by span and class like the other (#10305)
* change tab <h2></h1> ? by tab span and class like the other

replace bad tag h1 h2 by span and class to be in phase with the others link

* Update sensors-common.php
2019-06-05 22:14:03 -05:00
3129dd3148 Restore cimc data (#10308) 2019-06-04 20:41:44 -05:00
6ba05cdbbb Enable menu translation (#10298)
And better translation support for sensors, not complete
2019-06-04 20:03:50 -05:00
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
16471931c0 Fix style (#10304) 2019-06-03 22:33:08 -05:00
e514cbc3e1 CIMC Version Fix (#10284)
* 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
2019-06-03 22:32:41 -05:00
bee4dbcd44 Changed color of Non Unicast Packets (#10289) 2019-06-03 22:25:22 -05:00
cafe057001 Add overlib link css class for changing background color - Update Url.php (#10300)
* Update Url.php

Ad css class to onmouserover event and overlib, easyer to change color of background ex.: for a dark theme vs bg color hardcoded

* Update styles.css

* Update Url.php

* Update librenmsv1.blade.php
2019-06-03 19:40:56 -05:00
1c1b07fee5 Restore vminfo menu (#10303) 2019-06-03 19:15:13 -05:00
6f6e8e9f1c Fix global service count showing on device overview (#10301) 2019-06-03 19:14:35 -05:00
437a577dba allow -24h style to/from for graphs again (#10294) 2019-06-02 01:18:50 -05:00
15d72c23b0 Dispatcher Service: Remove duplicate polling complete message (#10290) 2019-05-31 20:04:29 -05:00
41623f2894 User Management: use url helpers (#10288)
Small fix for success string
2019-05-31 20:04:01 -05:00
75b67f2d41 Add a 'session' sensor for PanOS, SRX5800 Flow Accounting (#8857)
* feature: Add a 'session' sensor type
This allows things like the SRX5800 SPU's to be graphed as they expose current and maximum usage in a table.
The intent is to contain things like TTY sessions, flow counters from other vendors, or other resources with support a finite number of simultaneous users or connections.

* Include the node description in the descr field

Chassis clusters use the same FPC's

* Track PanOS session count

* Add JunOS CP Flows

* Missed file containing overview

* Missed a spot

* remove custom sessions sensor and use count

* Update junos.yaml

* Update panos.yaml
2019-05-31 07:47:15 -05:00
93f3528bbf Add Ipoman power consumption support (#10244)
* Add Ipoman power consumption support

* Create ipoman.json
2019-05-31 07:43:54 -05:00
9faae11381 Sanitize graph input (#10276)
Could execute arbitrary rrdtool commands such as cd and ls.
2019-05-31 07:43:12 -05:00