Commit Graph

5202 Commits

Author SHA1 Message Date
Tony Murray
2f681a3df3
fix stupid error in vars.inc.php (#8904) 2018-07-16 16:05:23 -05:00
Richard Mayhew
4bca036433 Updated Old Template URL to point to the correct location within docs (#8905) 2018-07-16 14:28:43 -05:00
CrazyMax
d0943313e2 Added detection for CoreOS devices (#8899)
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.

- [ ] 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-16 17:36:42 +01:00
Neil Lathwood
ad6ec7f72a
Refactor alert templates to use Laravel Blade templating engine (#8803)
* Initial start on new templating support

* further updates

* more updates

* More working version

* Last fixes

* Small updates

* modified test to look for dbname.

* Schema update

* Added fix for not being able to disable Philips Hue transport

* Updated sql file

* Updated db_schema

* Set myclabs/deep-copy to be 1.7.x version in composer

* Fixes from murrant

* Forced nikic/php-parser to version 3.1.x in composer

* Updated composer to use custom fork of string-blade-compiler + fixed transport use

* Updated to always use correct template

* Merged legacy and blade templating engines

* Removed template type + fixed test-alert.php

* Added more template placeholders

* Added ability to reference data in templates as $alert->X

* Updated docs for templates

* Updated db_schema.yaml

* Added $alert->builder

* Clarify the use of $alert->builder

* Fixed the use of $alert->transport

* renamed schema file

* Added template validation

* Small update to fix travis issue

* Add Docs text to title bar

* Updated amqp to new of version

* Consistency in alert rule and template title bars
2018-07-14 22:15:43 +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
PipoCanaja
46eef4412c Fix broken navigation on VRFs Page (#8889)
Hello

The VRFs page has navigation issue right now, that bring the user back to BGP page when most links are clicked (graphs, VRF). This change does some cleanup based on the "device/vrf" page, to recreate a "consistant" navigation. 
Graphs are fixed, and clicking the "VRF" says "Not implemented". 

Bye
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`
2018-07-13 21:20:22 +01:00
dsgagi
d9bbc60041 Added support for sorting alerts by severity on the Alerts widget (#8895)
Added feature to sort alerts by severity on the Alerts widget.


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:48:18 +01:00
Tony Murray
f1c0f5235f Fix processor usage on edit page (#8887)
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-10 19:57:18 +01:00
Peter Hansen
e9e30c5e98 Add sysDescr and hardware for oxidized overrides (#8885) 2018-07-09 20:25:26 +01:00
Tony Murray
61ee9be20d Fixed api list devices query for normal users (#8881)
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`

fixes: https://github.com/librenms/myLibreNMS/issues/37
2018-07-09 20:23:38 +01:00
Adam Bishop
73031b1f28 Fix up depth column (#8884)
Remove some dead code
2018-07-09 12:15:29 -05:00
KOMEDA Shinji
d6c54af9e1 Collectd graph bug fix (#8855)
- fix graph color handling bug
- fix graph listing when metagraph exists
- show collectd metric name (plugin and type) in title

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-07 14:27:46 +01:00
Tony Murray
0ba76e6d62 New python service for poller, discovery + more (#8455)
Currently has a file handle leak (and will eventually run out of handles) related to the self update process.

Either need to fix that or rip out self-update and leave that up to cron or something.


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-06-30 12:19:49 +01:00
Tony Murray
461e7067f3 Only list polling as overdue when it is 20% over the rrd_step value. (#8848)
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-06-30 08:53:24 +01:00
Richard Mayhew
357139b595 Sanitize device config returned from Oxidized (#8847)
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`

When the output of a configuration file is parsed by Geshi it replaces quotes with html codes instead of leaving them as is. I have sanitized this back in to normal output.
2018-06-27 16:10:39 +01:00
utelisysadmin
1e47f57bd8 Added support for graphing pf related stats for pfsense devices (#8643)
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.

- [ ] 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`

In response to feature request:
https://community.librenms.org/t/add-support-for-begemot-pf-mib-for-pfsense-devices/3628
2018-06-26 18:34:10 +01:00
Klaas Tammling
20741e1b21 Disable autocomplete on pages with SNMPv3 settings (#8833)
We have noticed that some Firefox password managers try to autocomplete AuthUser, AuthPass and CryptoPass with user credentials. This can lead to a security issue as the credentials of users are stored in plaintext inside the LibreNMS database.

The autocomplete="off" should disable this behaviour.

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.

- [ ] 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-06-23 20:48:03 +01:00
Steven Barnes
93dbd94bfb Checking for 'none' as the only device relationship (#8837)
Per a discussion with @murrant in Discord, this change adds a check to make sure `None` is not the relationship that is being queried against on save.  'None' has an ID of '0' in the $_POST['parents_id'] array. 

Without this check added, the Librenms error log contains entries like this when you save an edit to a device if `none` is the relationship that is selected.

```2018-06-21 09:18:25 MySQL Error: Cannot add or update a child row: a foreign key constraint fails (`librenms`.`device_relationships`, CONSTRAINT `device_relationship_parent_device_id_fk` FOREIGN KEY (`parent_device_id`) REFERENCES `devices` (`device_id`) ON DELETE CASCADE) (INSERT INTO `device_relationships` (`parent_device_id`,`child_device_id`)  VALUES ('0','35'))```
2018-06-21 16:45:49 -05:00
Patux
97e401888a Change _POST to vars to get params by URL on FDB search. (#8838)
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-06-21 22:31:23 +01:00
vivia11
bbc798b5c9 Adding mplsVpnVrfDescription to group by statement (#8824) 2018-06-16 12:51:32 +01:00
centralscrutiniser
646a37f55e Added detection for EfficientIP SOLIDserver (#8773)
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`

- Added initial detection for EfficientIP SOLIDserver
2018-06-15 14:00:20 +01:00
vivia11
d88d230a02 Change VRFs page to group together by RD and vrf_name (#8799)
UI used group vrfs together by the route distinguisher only. This causes problems when route distinguishers are not configured for every vrf. 

The UI now groups by vrf name AND the route distinguisher.

Also unset the port variable before using it in the code. 

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-06-13 22:28:12 +01:00
theherodied
a6c328925c Added Discord transport (#8748)
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-06-13 22:25:09 +01:00
Andrew Steen
c5a8794f9b Added Juniper SRX Branch Session Graphing (#8815)
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`

This was previously a pull request that was closed #8721 

Not sure why it was closed or if it was abandoned since the branch they had was deleted, but I just put everything back together along with some test data. Kudos to @centralscrutiniser for the code in the original request.
2018-06-13 21:15:43 +01:00
Adam Winberg
7fab99cfc1 Fixed missing var declaration for description/ifAlias search in FDB tables (#8802) 2018-06-07 02:24:24 -05:00
theherodied
201ccea04b webui: Fixed Collectd patch
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-05-25 18:04:50 +01:00
Neil Lathwood
08022aae7a api: Map LibreNMS OS' to known Oxidized models (#8758) 2018-05-24 22:08:44 -05:00
PipoCanaja
f14823954b webui: Allow Submenus in Plugin Menu by removing the scrollable-menu … (#8762)
Hello

The "scrollable-menu" class appears incompatible with nested submenus. Removing it for Plugin submenu would allow a plugin to use SubMenus itself. 

Use case: WeatherMap would list in a submenu all the weathermaps defined, allowing a quick access.

The patch for weathermap would come if this one is accepted.

Bye
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`
2018-05-24 22:15:13 +01:00
Adam Winberg
32e86eb4dd webui: Added 'dns name' and 'description' (ifAlias) in fdb search (#8554) 2018-05-24 21:31:56 +01:00
Tony Murray
b0968e850c webui: Changed alert rule triggered icon from X to ! (#8760)
![image](https://user-images.githubusercontent.com/39462/40490177-981b5a78-5f30-11e8-949d-2353272b334b.png)


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-05-24 20:14:25 +01:00
Tony Murray
9b78424b0c
Don't leak passwords deep linking to a graph and logging in on Apache httpd (#8761)
* Don't leak passwords when users update urls to include all variables after login

* Less aggressive
2018-05-24 11:29:12 -05:00
Neil Lathwood
8038b6fe7a webui: Fix the all ports search for fSpeed -> ifSpeed (#8759) 2018-05-23 19:13:13 -05:00
Scott Horsley
b6ed5751ec api: Allow more complete overrides on Oxidized output (#8633)
This patch provides the ability to override most aspects of the configuration output provided to Oxidized. This is now backwards compatible with any current groups defined previously but allows for extra features such as group overrides in Oxidized as well as IP changes (for hosts that are treated differently inside Oxidized), as well as ProxyHost additions. Of course, this goes further and allows for any flag that can be defined within Oxidized to be mapped in the config.

Examples

1) Define a group for these hosts
```php
$config['oxidized']['maps']['group']['sysname'][] = array('regex' => '/^(foo|bar)/', 'group' => 'myGroup');
$config['oxidized']['maps']['group']['sysname'][] = array('regex' => '/^(baz)/', 'group' => 'anotherGroup');
```
2) Provide a proxy host for these hosts to bounce through
```php
$config['oxidized']['maps']['ssh_proxy']['sysname'][] = array('regex' => '/foo/', 'ssh_proxy' => 'mySshProxyHost');
$config['oxidized']['maps']['ssh_proxy']['sysname'][] = array('regex' => '/bar/', 'ssh_proxy' => 'anotherSshProxyHost');
```
3) Allow overrides of IP addresses so the external DNS is not used for connections
```php
$config['oxidized']['maps']['ip']['sysname'][] = array('regex' => '/baz/', 'ip' => '10.10.0.23');
$config['oxidized']['maps']['ip']['sysname'][] = array('regex' => '/lala/', 'ip' => '192.168.0.243');
```
As already mentioned, this doesn't stop with the above examples.

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-05-23 22:00:39 +01:00
Jarkko Oranen
adbd3307a4 webui: Fixed oxidized configuration fetch for empty group (#8754)
Sending an empty group to Oxidized results in it not finding a node's
configuration even though it will find it just fine when the group is
not specified.

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-05-23 20:49:09 +01:00
PipoCanaja
1a618d0127 Typo in new port/plugin.inc.php and Copyright cleaning (#8751)
* Copyright correction, no_refresh for plugin page, and typo for parameter array

* Copyright correction, no_refresh for plugin page, and typo for parameter array
2018-05-22 20:38:04 +01:00
centralscrutiniser
52ea0a58b3 Bluecoat updates - Fixes (#8715)
* Blue Coat device updates

* Blue Coat device updates

* Updated PHP code per @laf comments

* YAML update for Packetshaper

* SSL Visibility YAML and snmprec file

* Cleanup problematic MIB files which should not have been there

* Reset Packetshaper YAML to original

* Fixed typos and value bugs in inc files|added missing definitions.inc.php entries to display graphs

* Fixed SQL typo

* Corrected SQL file names

* Update 251.sql
2018-05-22 09:29:45 -05:00
PipoCanaja
5c83d438c5 feature: Added plugin support in the Port page (#8665)
* Added new plugin menu_option in the "port" page, which contain hook calling public function port_container($device, $port) in plugins

* Cleaning after pre-commit error

* New method in Plugins.php to allow counting all plugins implementing a specific hook. This allow conditionnal display of the plugin menu_option in the port view.

* Typo after rebase

* Update plugins.inc.php

* Updating the documentation with device_overview_container and port_container hooks.
2018-05-22 08:11:27 +01:00
Aldemir Akpinar
f389500f65 feature: Added VM overview page in devices menu (#8640)
I've created single page which shows all VMs known to LibreNMS. Also I thought not everyone would like to enable this option so it requires $config['show_allvm_list'] = true; in config.php to be enabled as a menu item (under devices)

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-05-21 19:36:09 +01:00
Paul Heinrichs
2d7423cdaa API: System endpoint, more health graphs (#8730)
* API: System endpoint, more health graphs

* Add new line api_functions

* Get count of relationships

Using eloquent

* Add new lines in Models
2018-05-18 23:36:06 -05:00
Aldemir Akpinar
edab606428 refactor: device dependency bootgrid sql queries (#8717)
* Starting to work on queries

* Fix sorting

* Fix row count when searching

* Update get-host-dependencies.inc.php
2018-05-16 20:54:59 -05:00
PipoCanaja
a1a13de0f6 feature: Added PoE graphs and improved PoE polling code (#8705)
* Poe Polling Code, Poe Graphs, and Huawei MIB

* Reverting the reindent done after pre-commit script

* Cleaning of code not used for Cisco IOS, removal of untested Procurve code, and restore of legacy generic code (tested with Cisco+huawei)

* Rename MIB file

* Rearranged duplicated code

* Cleaning of variable not used

* Cleaning of commented code after night validation in test environnement

* Cleaning after pre-commit.php comments

* test data with PoE oids for huawei 5720

* test data with PoE oids for cisco 2960X
2018-05-15 21:39:36 +01:00
Roger
e22642c73f feature: Added feature to filter delayed alerts on widget (#8704)
* Added feature to filter delayed alerts on widget

* fix build job error

* change filter name to fired
2018-05-15 20:54:02 +01:00
Tony Murray
9e30d3fd7b Fix some issues with globals (#8709)
Some variables aren't global anymore.
Make $vars global.
2018-05-14 18:31:46 +01:00
centralscrutiniser
ba0ed73d5f device: Added and Updated Blue Coat device support (#8664)
* Blue Coat device updates

* Blue Coat device updates

* Updated PHP code per @laf comments

* YAML update for Packetshaper

* SSL Visibility YAML and snmprec file

* Cleanup problematic MIB files which should not have been there

* Reset Packetshaper YAML to original

* Added json test data
2018-05-13 21:54:10 +01:00
Tony Murray
3e9f4b396e
Fix device inventory page (#8698)
$device isn't global it is in the local scope.
2018-05-11 12:06:03 -05:00
Tony Murray
b3c3f0434f
Fix two factor auth (#8697) 2018-05-11 11:29:10 -05:00
Tony Murray
66e4eccba7
Version librenms.js to break cache (#8696) 2018-05-11 11:14:35 -05:00
vivia11
5fd81db819 device: Added Open Access Netspire OS support (#8674)
* Add netspire os support

* Update netspire.yaml

* Change from numerical oid to regular oid and readd poller/discovery modules

* Remove mib_dir and change os polling
2018-05-10 20:17:42 +01:00
Tony Murray
5236a24dd5 Fix missing vlan name on port vlan page (#8684) 2018-05-10 19:56:53 +01:00
Tony Murray
0020479fc8
Test plugin menu method should be static. (#8681) 2018-05-09 08:39:21 -05:00