Commit Graph

5356 Commits

Author SHA1 Message Date
dupondje
fbb6d35061 Added support for Rancid git (#9036)
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 pull req adds support for Rancid GIT backend (instead of the current supported SVN).
Not only git is preferred these days, also php-svn is non-existing on php 7+, so the only Rancid option is broken on PHP 7+, so might be nice to have this included :)
2018-09-04 22:41:51 +01:00
Neil Lathwood
fe45eacae9
Fixed print date selector (#9142) 2018-09-04 10:24:02 +01:00
Tony Murray
30790bafd1 Remove js symlinks and extra files (#9134)
All symlinks are removed except:
./html/api_v0.php -> index.php
./html/pages/device/neighbours/list.inc.php -> ../ports/neighbours.inc.php

Allows things to mostly work on Windows Linux subsystem when LibreNMS resides on the ntfs partition.

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-09-02 23:32:58 +01:00
Neil Lathwood
a8f10deee5 Fixed web installer to allow users to change db creds if we can't connect (#9126) 2018-09-01 10:54:25 -05:00
Neil Lathwood
3446cf7989
Fixed url to graphs from date selector (#9109) 2018-08-30 20:58:12 +01:00
Neil Lathwood
0e6b59133e
Fixed install suggesting to install mysqli -> mysqlnd (#9108)
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-08-29 22:40:33 +01:00
Neil Lathwood
e603fcfd6f Converted PagerDuty to new transport format (#9092)
* Converted PagerDuty to new transport format

* Attempt at oauth for transports

* clean

* missing images

* reverted wrong file. phpstorm saved me...

* fix typo

* Updated to help the display

* Fix validation error, start to try to send alerts.
Editing the transport, deletes the service_key...

* Ignore hidden config options

* Fix up api call, proper feedback.

* hide oauth field in print list
2018-08-29 09:44:29 -05:00
Neil Lathwood
f2253d70fd SNMP v3 auth is no longer checked for case sensitivity + push pass v3 creds to front of queue (#9102)
* Match api code to addhost.php for v3 config order

* Updated v3 auth checks for case insensitivity + docs
2018-08-29 09:16:33 -05:00
bonzai86
9350b54464 feature: Added dynamic graphs with RrdGraphJS by oetiker (#9087)
* feature: Added dynamic graphs with RrdGraphJS by oetiker (https://github.com/oetiker/RrdGraphJS)

* fixed DragCursor.cur

* refactoring, only js when needed

* doc: added use of dynamic graphs switch in Configuration.md

* Updated to use Config, schema + example gif

* Rename 261.sql to 262.sql
2018-08-29 08:25:16 -05:00
dsgagi
31a21ba2bc Additional parameters for list_alerts and list_devices API calls (#9040)
- Add filtering by severity in list_alerts.
- Added ability to filter only active devices (not ignored and not disabled) in list_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-08-28 17:44:47 +01:00
TheGreatDoc
24993e7bd3 Fixed PeeringDB AS Selection table (#9096)
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`

One note: As bgpLocalAs field in database is a varchar, ordering could be inconsistent with 4-byte asn as it will order using the first char.
If you have 2 ASN (203524 and 32137) and your order by ASC (default) you will get:
203524
32137
2018-08-28 10:54:11 +01:00
Neil Lathwood
84478b4367
Fixed query for alert settings (#9085) 2018-08-27 12:21:25 +01:00
Tony Murray
e9ff8c48b6 Fixed IN db queries (#9077)
Most were fine as they hardcoded the in into the query.
Change them all to use PDO properly.
Did not fix IRCBot, they are are all hardcoded.

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-08-26 13:42:21 +01:00
Tony Murray
0a34a37d9e Fixed xss in deluser (#9079)
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-08-25 12:10:00 +01:00
Cole R. Davis
af300f7984 Added Basic Support for Allworx VoIP Systems (#9057)
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-08-24 09:06:24 +01:00
TheGreatDoc
5064285f10 Fixed Device->Eventlog to show rows/pages and Syslog hostname filter (#9060)
Fixed Device-> Eventlog to show number of rows per page and pagination.

FIxed when you filter by Hostname in Overview->Syslog, the Hostname filter dissapear as is like you were in Device->Syslog.

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-08-23 21:05:18 +01:00
Alexey Medvedev
e448190a68 Added transport modules Kayako Classic and SMSFeedback (#9027)
Hello! I've made a first version of Alert Transporting module for Kayako Classic Servicedesk. May be it is possible to use with Kayako OnPremise version (not sure).

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-08-21 22:41:59 +01:00
Tony Murray
d83b675090 Check for incorrect heartbeats in rrdtstep.php script (#9041)
Also, fix some incorrect config names (rrd_step -> rrd.step)

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-08-21 22:21:55 +01:00
Tony Murray
2720ca5f1f Workaround for bill quota/cdr bigint (#9053)
Real fix is to install mysqlnd

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-08-21 22:15:25 +01:00
Tony Murray
73b8dae345
Fix customers display (#9048)
Was trying to inject sql
2018-08-21 15:45:37 -05:00
Neil Lathwood
d65ea76355 Fix top interfaces for non-admin users (#9038) 2018-08-19 20:21:03 -05:00
Neil Lathwood
478502ac4a
Fix laravel start from PDO PR (#9037)
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-08-19 22:44:04 +01:00
Neil Lathwood
2d72d8144e
Convert old templates title as well as body (#9034)
* Convert old templates title as well as body

* Update convert-template.inc.php
2018-08-19 09:28:57 +01:00
Neil Lathwood
65e07d1951
Fixed widgets from updated dbFacile changes (#9033)
* Fixed widgets from updated dbFacile changes

* Updated top interfaces
2018-08-18 17:07:42 +01:00
Neil Lathwood
bc2fe6aeb1
Tidy up some transport code from previous pr (#8927) 2018-08-17 22:38:00 +01:00
Nick Hilliard
50210234c1 Use rrdtool_escape() for sensors instead of manually padding text (#9029)
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-08-17 21:53:55 +01:00
Tony Murray
a2e33efba8 Use PDO for MySQL queries (#8935)
Gut dbFacile
mres() now does nothing... could have some vulnerable queries, but most are ok

TODO
- [x] IRC client broke
- [x] Install broke

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-08-17 21:29:20 +01:00
Evil.2000
86c097574b Added hiding of disabled ports in graph, device overview and device ports view. (#9017)
When disabling or ignoring ports in the "Ports Settings" (http://<nms_host>/device/device=<device_id>/tab=edit/section=ports/) then the ports are still shown under the Port tab for a specific device (http://<nms_host>/device/device=<device_id>/section=ports/) and in the Overall Traffic Graph.
To keep the view and graph more clear, this change only shows the ports which are not disabled or ignored.

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.

- [y] 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-08-17 18:24:11 +01:00
Cory Hill
2adecd5ddb device: Added detection for SIAE Microelettronica ALFOplus2 microwave radio device (#8953)
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-08-15 20:06:40 +01:00
dsgagi
1ea2ed273e Update alerts.inc.php (#8977)
Also sort by timestamp, after sorting/grouping by severity.
2018-08-11 16:41:40 -05:00
PipoCanaja
dea988ab79 Display MAX rrd value in Service Graphs (#9001)
Hi

This patch does add the MAX graph (AREA) for the Service graphs. And the Max numerical value is as well taken from the MAX RRD value instead of AVERAGE. 

When scaling to larger amount of time, displaying like today the average only makes all spikes disappear, and the Max value does not make much sense.

I also added a color choice to *pinkify* the "Loss" graphs. 

Exemple with HTTP graphs polling google: 

![http-exemple](https://user-images.githubusercontent.com/38363551/43886912-7760b28c-9bbd-11e8-875b-b2afe140bdf9.png)

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-08-10 21:57:33 +01:00
crcro
32f8a297eb Added rockstor svg os and logo (#9002)
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-08-09 22:43:14 +01:00
Richard Mayhew
abd2c6363f Fixed the display of hostnames within the edit device permissions if a SysName is used instead (#8986) 2018-08-06 09:37:36 -05:00
Tony Murray
50bb72f530 Remove port association mode map from the database (#8941)
* Remove port association mode map from the database

* Renamed sql file

* Renamed sql file
2018-08-05 09:50:13 +01:00
Tony Murray
f45e1997c5 Line up ping graph legend (#8955)
![image](https://user-images.githubusercontent.com/39462/43288765-7ff46116-90ee-11e8-80ec-a1f37e5027ae.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-08-04 22:33:18 +01:00
PipoCanaja
f659ed8c41 Added 'Disabled' and 'Down' state for devices/links rendered on NetworkMap (#8926)
Hello

Here is a proposal for a dedicated color on disabled devices displayed on the Network Maps. Usecase is that during a migration, we are "disabling" the old devices and we delete them only a few days/weeks later. This change allows to see the productive devices as well as the disabled ones and clearly know which is which. 

Thanx

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-08-04 22:05:15 +01:00
TheGreatDoc
a883264df9 Fixed Eventlog search (missing OR in SQL query) (#8981)
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-08-04 21:45:14 +01:00
Neil Lathwood
5b24934f8a Update convert-template.inc.php (#8980) 2018-08-03 17:13:03 -05:00
Tony Murray
5bc91addb2 Fix template conversion (#8976)
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-08-03 20:56:22 +01:00
Tony Murray
3b6fbd99ee Convert alert templates in place (#8951)
* Convert alert templates inplace

* Update copyright

* Update convert-template.inc.php
2018-07-31 21:54:12 +01:00
Tony Murray
deb405fac9 Alert transport fixes (#8967)
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-31 21:53:03 +01:00
Tony Murray
9bc0c542a5 Allow ping checks to be ran separately from polling (#8821)
Allows ping checks at intervals not tied to the poller.  Pointless if you are not alerting on device status.
I updated the rrdstep.php script to treat ping-perf files separately and made it so it only converts if needed.

Docs here: https://docs.librenms.org/Extensions/Fast-Ping-Check/

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-30 22:58:38 +01:00
TheGreatDoc
290e07ca49 Fixed typo in new alert rule html (#8958) 2018-07-27 16:26:31 -05:00
Paul Heinrichs
046a97fe76 Remove testing data (#8945) 2018-07-25 09:43:55 -05:00
Neil Lathwood
3a2774ae1e
Fixed test transport form (#8942) 2018-07-25 09:00:24 +01:00
vivia11
2d4d4ce43b Make alert transport form compatible with sql strict mode (#8931)
* Edit is_default so it is compatible with sql strict mode

* whitespace fix

* Evaluate is_default earlier

* Fix logic
2018-07-24 00:30:53 -05:00
Tony Murray
153d23b222 fix foldersize() recursion (#8930)
previously, it tried to add an array to an integer...
2018-07-23 17:54:02 +01:00
TheGreatDoc
b844dd44c8 Asterisk Application support (#8914)
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`

PR 183 from librenms-agent contains the script to make this work

https://github.com/librenms/librenms-agent/pull/183
2018-07-21 20:48:31 +01:00
vivia11
e1118b628a Added Alert Transports Mapping (#8660)
Hello all,
I guess this is the second version of a more fully fleshed out alert contact mapping feature. The old one was GH-8507

Transports to convert:

  - [x] API
  - [x] Cisco Spark
  - [x] Elasticsearch
  - [x] GitLab
  - [x] Philips Hue
  - [x] Jira
  - [x] Mail
  - [ ] ~~PagerDuty~~ - Requires a callback so leaving for now
  - [x] Nagios
  - [x] IRC
  - [x] Discord
  - [x] Rocket.chat
  - [x] Hipchat
  - [x] Pushover
  - [x] Boxcar
  - [x] Telegram
  - [x] Pushbullet
  - [x] VictorOps
  - [x] OpsGenie
  - [x] Clickatell
  - [x] PlaySMS
  - [x] Canopsis
  - [x] osTicket
  - [x] Microsoft Teams
  - [x] SMSEagle
  - [x] Syslog
  - [x] Slack

The intention is for this feature to have three different levels to it:
1. Alert rule to an alert contact mapping (where the code is at now)
2. Alert rule to an alert group (made up of alert contacts) mapping
3. Alert contact mapping to different transport configurations.

There will be three transport configuration types.
1. Default (the configuration that is held in the configs table)
2. None (no transport configuration - will explain later)
3. Other (a configuration that will be defined in a different able)

Take Mail transport for example. It can either be of a "default" or "other" configuration. The hope is that in the future, users can send mail from different mail servers if they wish.
However, for ciscospark which requires a room ID and an api-token, I've decided that it has no transport configuration. Most likely, every alert contact will contain a different room-id and an api-token - which is why it has the transport config of "none".
For other transports : I am not familiar with them, so hopefully the community can add support for these. I can definitely help!

To add support for each transport will require several things:
- addition to the UI
- addition to forms/alert-contacts.inc.php
- modifications to its object class

Screenshots
![image](https://user-images.githubusercontent.com/28970851/39594533-2092ce9e-4eca-11e8-9c5d-cd002ece1425.png)
![image](https://user-images.githubusercontent.com/28970851/39594544-276e9856-4eca-11e8-80cc-82789ee0b2b2.png)
![image](https://user-images.githubusercontent.com/28970851/39594553-2fdf528c-4eca-11e8-8a40-4f149e767054.png)

I'm not sure if this is the best way to do things, so please let me know if there's a better way to structure the code! Any comments on code/db schema,/UI etc is welcome and encouraged! 

The UI is heavily based on alert rules (front end is not my strong suit). And parts of the code are based on the code that was written for alert rules.

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-21 20:34:59 +01:00
angryp
064ab1c297 Added missing Config dependency (#8919) 2018-07-18 07:12:33 -05:00
Neil Lathwood
19cdad8a1b Stop allowing search text to be tagged for select2 (#8915) 2018-07-17 07:11:16 -05:00
Tony Murray
66bfa4d509 Don't depend on String_Blade_Compiler so hard (#8907)
Allows things to boot if it is missing but displays a toast.
Allows Toastr facade to work on legacy pages too.

Not 100% sure if we want this.

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-17 09:33:54 +01:00
Tony Murray
7cde27338b Fix errors in vars.inc.php (#8913)
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-17 09:19:29 +01:00
Neil Lathwood
6487bb6512
Revert "fix stupid error in vars.inc.php" (#8909)
* Revert "test-template.php fixed after #8803 PR"

This reverts commit 2c26c08020.

* Revert "fix stupid error in vars.inc.php (#8904)"

This reverts commit 2f681a3df3.
2018-07-17 00:30:21 +01:00
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
Tony Murray
1ad7f3138b
Add Laravel to LibreNMS (#8318)
* Add Laravel to LibreNMS.

* Try to set permissions during initial install and first composer update to Laravel.

* Fix composer.lock
Fix missing db config keys

* Start building v1 layout
Port ajax_setresolution, inject csrf into jquery ajax calls
Layout works, building menu
Partially done.

* Fix device group list
remove stupid count relationships

* Print messages for common boot errors.
Don't log to laravel.log file.
Log to error_log until booted, then librenms.log

* Fix up some issues with Config loading
Start of custom directives

* Custom blade directives: config, notconfig, admin

* Preflight checks
Only load config files once.

* Update the composer.lock for php 5.6

* Menu through routing

* Start of alert menu

* Better alert scopes

* reduce cruft in models

* Alerting menu more or less working :D

* Fix style

* Improved preflight

* Fix chicken-eggs!

* Remove examples

* Better alert_rule status queries
Debugbar

* fix app.env check

* User Menu

* Settings bar (dropped refresh)
Search JS

* Toastr messages

* Rename preflight

* Use hasAccess(User) on most models.
Add port counts

* Missed a Preflight -> Checks rename

* Fix some formatting

* Boot Eloquent outside of Laravel
Use Eloquent for Config and Plugins so we don't have to connect with dbFacile inside Laravel.
Move locate_binary() into Config class

* Config WIP

* Try to fix a lot of config loading issues.

* Improve menu for non-admins removing unneeded menus
url() for all in menu

* Only use eloquent if it exists

* Include APP_URL in initial .env settings

* Implement Legacy User Provider

* Helper class for using Eloquent outside of Laravel.
Allows access to DB style queries too and checking the connection status.

* Fix up tests

* Fix device groups query

* Checking Travis

* copy config.test.php earlier

* dbFacile check config before connecting
Don't use exception to check if eloquent is connected, it gets grabbed by the exception handler.
Ignore missing config.php error.

* Fix config load with database is not migrated yet.

* Remove Config::load() from early boot.

* Use laravel config settings to init db (this prefers .env settings)
Fix bgp vars not set in menu
add _ide_helper.php to .gitignore

* Restrict dependencies to versions that support php 5.6

* Update ConfigTest

* Fix a couple of installation issues

* Add unique NODE_ID to .env

* Correct handling of title image

* Fix database config not loading. Thanks @laf

* Don't prepend /

* add class_exists checks for development service providers

* Fix config value casting

* Don't use functions that may not exist

* Update dbFacile.php

* d_echo may not be defined when Config used called.

* Add SELinux configuration steps
More detailed permissions check.
Check all and give complete corrective commands in one step.

* Ignore node_modules directory

* Re-add accidetal removal
2018-05-09 08:05:17 -05:00
mattie47
e898075c36 device: Add NTP support for Allied Telesis AWPlus products (#8580)
* Add support for Allied Telesis AlliedWare Plus products

- Uses mibs from 5.4.7-2.1 for AlliedWare Plus products
- Updates Legacy AlliedWare mibs
- Added Allied Telesis svg

* Remove unnecessary "trim" from snmpget

* Add new line to end of file

* Minor fixes for commit

* awplus: initial ntp commit

This isn't completely working, however initial patch of it partially working

* awplus: Add NTP support

- Fixed polling issues for awplus. Now offset and delay graphs work.

- html/includes/graphs/device/ntp_*.inc.php
--  Removed extra "\" from MAX count which showed up in Graph legend

- html/includes/graphs/device/ntp_delay.inc.php
-- Present legend in either seconds, or milliseconds (depending on vendor)

- html/includes/graphs/device/ntp_dispersion.inc.php
-- Present legend in either seconds, or milliseconds (depending on vendor)

- html/includes/graphs/device/ntp_offset.inc.php
-- Removed rrd minimum (-l 0). This is because offset can be below 0.
--- It's better for the graph to auto scale than set a fixed minimum to display here.

- html/includes/graphs/device/ntp_stratum.inc.php
-- Changed graph to go from 0 to max of 16. NTP Stratum can only be 0 to 16.

* awplus: Add NTP test data

* updated awplus ntp poller

* device: awplus convert NTP poller into seconds

* device: fix NTP graph formatting

* device: Improve NTP formatting

* device: unset awplus NTP variable

* fix formatting

* device: awplus change NTP from numerical OIDs to named

* device: update awplus ntp json tests

* device: fix cisco and awplus ntp database creation

* device: update awplus json
2018-05-08 20:37:06 -05:00
Tony Murray
9279c845f6 feature: Added wireless sensors to about and stats.librenms.org (#8676) 2018-05-08 21:42:52 +01:00
angryp
2d237710e2 Fix for recurring date placeholders in maintenance scheduling form. Only actual for MySQL-community, tested on 5.7.20 and 5.7.22. (#8659) 2018-05-07 23:32:40 -05:00
angryp
82072b3694 Fix for get_alert API method. Tested on MySQL-community 5.7.22 and MariaDB 10.2.14. (#8658) 2018-05-04 23:51:04 -05:00
Aldemir Akpinar
d214f9d5b7 Added new raritan logo (#8581)
* Added new raritan logo

* Cropped logo for the device list, also minified svg a bit more

* updated logo

* Create raritan.svg
2018-04-30 09:58:17 -05:00
Neil Lathwood
80ef4d4324 Fixed clicking notes on device alerts page (#8629) 2018-04-27 11:58:07 -05:00
Tony Murray
c88d28c10a Always update the alert note when acknowledging (#8620)
and unacknowledging
2018-04-27 14:28:08 +01:00
Neil Lathwood
efe8b8858b device: Added detection for Red Lion Sixnet devices (#8576)
* device: Added detection for Red Lion Sixnet devices

* Added state sensors
2018-04-26 08:47:15 -05:00
Neil Lathwood
3d65deaf91 device: Added detection for Corero CMS devices (#8574)
* device: Added detection for Corero CMS devices

* remove files added by accident
2018-04-26 08:46:10 -05:00
Neil Lathwood
1eee6e8195 alert: Added ability to make notes for acking alerts + record who did so (#8433)
* alert: Added ability to make notes for acking alerts + record who did so

* Updated schema

* moved sql file

* Updated from comments in PR

* warning changed to blue

* reset notes + keep notes on ack
2018-04-26 00:00:56 -05:00
Hans Erasmus
163c595494 feature: Added a third graph to unbound with more metrics (#8616)
* Added a third graph to unbound with more metrics

* Update unbound.inc.php

* Reset composer.lock

* Update unbound.inc.php

* Update unbound.inc.php
2018-04-25 20:52:12 +01:00
CZ
492a973e2d webui: Added new TPLINK logo with brand name (#8613)
* added new TPLINK logo with brand name

* Create tplink.svg logo

* Update tplink.svg

* Update tplink.svg
2018-04-25 09:27:37 +01:00
Tony Murray
b41e32c7aa
Fix missing use statements (#8614) 2018-04-24 21:20:21 -05:00
CZ
fa035be4c9 New FiberHome SVG Logo (#8601)
- replace PNG with SVG
- adjust testing json data to *.svg
  (fiberhome_switch and fiberhome)
2018-04-23 21:17:51 +01:00
Neil Lathwood
21e26a437e
doc: Updated github issues links to community site (#8598) 2018-04-22 23:00:46 +01:00
ospfbgp
9a420a6910 device: Rebranding of Avaya BOSS and VOSS OS' (#8469)
* Update avaya-ers.yaml

Extreme bought avaya network assests so rebranding and moving some files.

* Add files via upload

Extreme bought avaya networking assets and so rebranding to Extreme and adding logos with OS for easier reading when on devices pages

* Update avaya-vsp.yaml

removing .1.3.6.1.4.1.45.3.79.1  This is a VSP 7024xl from avaya.  This is techincally not VOSS but BOSS operating system.  It should be in BOSS and avaya-ers.yaml

* Add files via upload

* Update and rename avaya-vsp.inc.php to extreme-voss.inc.php

* Update and rename avaya-vsp.inc.php to extreme-voss.inc.php

* Update and rename avaya-vsp.inc.php to extreme-voss.inc.php

* Update extreme-voss.inc.php

* Rename avaya-vsp.inc.php to extreme-voss.inc.php

* Rename avaya-vsp.inc.php to extreme-voss.inc.php

* Rename avaya-vsp.yaml to extreme-voss.yaml

* Update and rename avaya-vsp.yaml to extreme-voss.yaml

* Update avaya-ers.yaml

* Rename avaya-ers.yaml to extreme-boss.yaml

* Rename avaya-ers.inc.php to extreme-boss.inc.php

* Update and rename avaya-ers.inc.php to extreme-boss.inc.php

* Update and rename avaya-ers.inc.php to extreme-boss.inc.php

* Update and rename avaya-ers.inc.php to extreme-boss.inc.php

* Update and rename avaya-ers.inc.php to extreme-boss.inc.php

* Update and rename avaya-ers.inc.php to extreme-boss.inc.php

* Update extreme-boss.yaml

* Update extreme-voss.yaml

* Update and rename extreme-boss.yaml to boss.yaml

* Update extreme-voss.yaml

* Rename extreme-voss.yaml to voss.yaml

* Rename extreme-boss.inc.php to boss.inc.php

* Rename extreme-voss.inc.php to voss.inc.php

* Rename extreme-boss.inc.php to boss.inc.php

* Rename extreme-voss.inc.php to voss.inc.php

* Update and rename extreme-voss.inc.php to voss.inc.php

* Rename extreme-voss.yaml to voss.yaml

* Rename extreme-voss.inc.php to voss.inc.php

* Update and rename extreme-voss.inc.php to voss.inc.php

* Update and rename extreme-boss.inc.php to boss.inc.php

* Update and rename extreme-boss.inc.php to boss.inc.php

* Update and rename extreme-boss.inc.php to boss.inc.php

* Rename extreme-boss.inc.php to boss.inc.php

* Update voss.inc.php

* Update boss.inc.php

* Update boss.inc.php

* Update voss.inc.php

* Update voss.inc.php

* Update voss.inc.php

* Update voss.inc.php

* Update voss.inc.php

* Update voss.inc.php

* Update boss.inc.php

* Update boss.inc.php

* Update voss.inc.php

* Update boss.inc.php

* Update voss.inc.php

* Update voss.inc.php

* Rename avaya-vsp_8404c.snmprec to voss_8404c.snmprec

* Rename avaya-vsp_8404.snmprec to voss_8404.snmprec

* Rename avaya-vsp_8284xsq.snmprec to voss_8284xsq.snmprec

* Rename avaya-vsp_7254xtq.snmprec to voss_7254xtq.snmprec

* Rename avaya-vsp_7254xsq.snmprec to voss_7254xsq.snmprec

* Rename avaya-vsp_7024xls.snmprec to boss_7024xls.snmprec

* Rename avaya-vsp_4850gts.snmprec to voss_4850gts.snmprec

* Rename avaya-vsp_4850gts-pwr.snmprec to voss_4850gts-pwr.snmprec

* Rename avaya-vsp_4450gsx-pwr.snmprec to voss_4450gsx-pwr.snmprec

* Rename avaya-ers.snmprec to boss.snmprec

* Rename avaya-ers_1.snmprec to boss_1.snmprec

* Update and rename avaya-ers.json to boss.json

* Update and rename avaya-vsp_8404.json to voss_8404.json

* Update and rename avaya-vsp_8404c.json to voss_8404c.json

* Update and rename AvayaErs.php to Boss.php

* Update Boss.php

* Restore processor_type to avaya-ers in test data

* Update voss_8404c.json

* Update extremeboss.svg

* Update extremevoss.svg
2018-04-21 11:21:14 +01:00
Richard Mayhew
350045995c webui: Replaced old Mikrotik SWOS vendor logo with the correct Mikrotik Logo (#8584)
* Replaced old Mikrotik SWOS vendor logo with the correct Mikrotik Logo

* Uptated RouterOS and SWOS to use a common Mikrotik logo

* Removed unused routeros.svg image file

* Updated test to use new defined icon
2018-04-21 09:56:54 +01:00
Sander Steffann
65b8270936 feature: Added random entropy support for applications (#8555) 2018-04-13 17:42:14 +01:00
Tony Murray
d841625f12 refactor: Refactor database and config init (#8527)
* Refactor database and config init
Connect to the database without loading full config
Load config completely so post-processing is always done consistently.
Erase existing $config when loading, fixes issues in case we load the config twice.
If the database is not connected, don't try to load database settings. (Fixes some db errors on install)
Attempt to remove $config access/modification before init.php
Remove usage of db_name, that might not match the connected database.
Centralize db config loading, so we consistently apply db_test database settings.
Many of these changes are influenced by Laravel port.

* Some safety so we don't assign strings to numeric port field
Smooth out phpunit bootstrap

* Fix a couple of scrutinizer warnings.
2018-04-11 16:15:13 +01:00
Neil Lathwood
c09e44aa94
device: Added support for Dahua NVR (#8542)
* device: Added support for Dahua NVR

* Update dahua-nvr.yaml
2018-04-11 15:34:21 +01:00
Paul Heinrichs
ff0063b515 api: Add option to output graphs as base64 (#8535)
* Allow 'option' param in graph endpoint

* Update lint and update docs

* Uncomment api response

* Add imagedestroy on 'tobias_trim' section

* Add base64 to port endpoints also
2018-04-11 08:02:04 -05:00
Brock Alberry
5d64c5da6d webui: Update Buffalo logo to new style and svg (#8539)
* Delete buffalo.png

* Add files via upload

* remove height/width and compressed
2018-04-10 21:13:53 +01:00
Tony Murray
a21c0bccc4 fix: Fixed device group rule suggest, Auth before init (#8538)
* Fix Auth before init

* Fix Auth before init
2018-04-10 16:56:22 +01:00
theherodied
313b46236e Added Tegile Storage OS detection, storage pool, and project storage. (#8464)
* added Tegile Storage 001

* Tegile fixed whitespace 002

* Added tegile.snmprec 003

* Added TEGILE-MIB

* Tried to fix svg size issue

* Tried to fix svg size issue 005

* Tried to fix svg size issue 006

* Trying dedup 007

* Revert "Trying dedup 007"

This reverts commit b30a3edb49.

* Tried to fix svg size issue 009

* Tried to fix svg size issue 010

* Reverted changes and created new branch

* changed tegile to intelliflash

* changed tegile to intelliflash

* changed tegile to intelliflash 002

* added intelliflash snmprec

* added Json test data

* Update intelliflash.json

* Redid logo

* Update tegile.svg

* changed to intelliflash1. intelliflash2 will come later.

* removed previous commit I made

* Adding project usage

* simplified project calculations

* simplified project calculations

* simplified project calculations

* simplified project calculations

* Cleaned up comments

* Added disco OS if check and removed network over graph

* chenged os detection to sysObjectID. Fixed disco if check.

* Updated json test file

* Fixed intelliflash-pr storage units.

* Updated test data

* Updated test data to remove bgp module
2018-04-09 00:57:22 -05:00
Paul Heinrichs
098c948a04 device: Added Last Mile CTM support (#8478)
* Add Listmile mibs

Created custom lastmile mib

* Add Lastmile CTM support

* Update test description and remove wireless sensor

* Requested changes

Renamed OS

* json test data

* Updated test data
2018-04-08 09:32:41 +01:00
Tony Murray
7250376104 refactor: Don't access $_SESSION directly for Auth (#8513)
* Don't access $_SESSION directly for Auth

* fix style

* add property annotations
2018-04-07 21:55:28 +01:00
Adam Winberg
2ece84495d webui: Improved fdb search (#8251)
* sort fdb search by number of mac addresses/port to show most likely endpoint switchport first in list. Also add IP search to fdb search

* fix style check error
2018-04-07 20:14:28 +01:00
theherodied
a81e2d25cd Added 2n device detection. (#8490)
* Added 2n Intercom mib

* Added 2n png logo

* Added 2n definitions yaml

* changed 2n logo. still needs to be changed later.

* changed 2n logo. still needs to be changed later 2.

* changed os name

* png not working

* trying svg. need to fix still.

* changed to object id detection

* added includes/polling/os/2nipforce.php

* named file correctly 2nipforce.inc.php

* added 2nipforce.snmprec

* added uptime to over graphs

* Changed to HeliosIP OS

* Changed to HeliosIP OS

* Removed Device Traffic from over graphs

* working on review requests 001

* Like so

* Create heliosip.json

* Update heliosip.json

Forgot to clear os cache

* Removed svg dimensions.

* Made 2n logo again.
2018-04-07 10:53:17 -05:00
sorribes22
c22b31506e api: Added lattitude and longitude on devices/device fetch (#8515)
* 'lat' and 'lng' columns added on list_devices()

* 'lat' and 'lng' columns added on device fetch

Helped by https://github.com/laf

* Commit user.name changed
2018-04-07 13:29:46 +01:00
Aldemir Akpinar
18101a93d5 webui: Use toastr for operational messages on alert templates page (#8499)
* webui: Use toastr for operational messages

* Reload template table after insert/update

* Trying to fix travis ci error

* Change error checking to librenms standard
2018-04-07 13:22:08 +01:00
Maurice den Braber
3198826769 Update devices.inc.php to use searchquery (#8509)
Updated devices.inc.php to use new searchquery parameter in stead of hostname.
2018-04-05 22:41:56 +01:00
Tony Murray
85d0e3b98e refactor: Move nested defaults to Config::processConfig() (#8429)
* Move nested defaults to Config::processConfig()

Fixes log_file when users set log_dir for example.

Removed stuff:
mibdir
dp_autocreate
base_url: setting http/https before config.php is loaded...
moved collectd setting to it's own config file

* add base_url mod back.
I thought that since definitions is called before config.php it was useless, but it changes the built in definition between http and https.
2018-04-03 15:53:25 +01:00
vivia11
b71febf372 device: Added WTI-MPC OS and mib (#8492)
* Add icon and initial discovery

* Added more discovery for wti-mpc. Add mib.

* Add snmp data and edit discovery

* Remove discovery due to weird mib[C

* Update wti-mpc.yaml
2018-04-01 21:38:47 +01:00
Tony Murray
214472ba89 refactor: rename array_sort() to avoid function collision (#8494) 2018-04-01 21:27:41 +01:00
Tony Murray
04e24d4671 webui: Alert builder layout optimsation (#8489)
* Alert builder: don't waste space
More space for the ui elements when the dialog is large.
Stop the import button from overlapping things when the dialog is extra small.

* Add divider to alert menubar
2018-03-29 20:57:41 +01:00
Wheel
b1ec1d14f0 webui: Added override default device grouping radius (#8485)
* Override default device grouping radius

Added an option to override the default group_radius 80. Usefull in fullscreenmap

* Update worldmap.inc.php

* Update worldmap.inc.php
2018-03-29 12:05:38 +01:00
vivia11
314a552437 devices: Add Phybridge OS support (#8456)
* OS yaml definition for Phybridge

* Add images and snmp data

* Removed width/height from svg and added more specific discovery for phybridge

* Minimized svg and inverted icon

* added json test file

* update to json file

* Changing os name: phybridge to phybridge-flex

* Update json file to phybridge-flex

* Remove unneeded test data
2018-03-28 23:54:02 -05:00
Tony Murray
fb701bc1b4
Defaults for alert collection rules (#8474)
Better error message if rule with same name exists.
2018-03-28 22:11:57 -05:00
Tony Murray
d91fe84fc3
Change the default alert delay to 1m (#8462)
Add regex type for numbers
Tooltips for all alert rule dialog items
2018-03-28 22:10:54 -05:00
Michael Corcoran
97d58cc121 fix:: Fixed display of WD drives for smart application (#8471)
WD drives have a dash in the serial number, e.g. WD-WCCXXXXXXXXX.
The librenms-agent script changed to using serial numbers in
librenms/librenms-agent@3a84624615
As we split the name by the same char, we discarded everything after WD,
which made all WD drives in the system appear as one, and broke the generated
links.
2018-03-26 14:36:38 +01:00
Maurice den Braber
9f5b42b028 webui: Allow full search on devices page (#8364)
* Update devices.inc.php

* Update devices.inc.php

* Replace $_POST with $vars

Better protection for SQL injection attempts; Need to verify other files for same issue.

* Fixed whitespace.

*sigh*

* More search options & sql injection fixes.

+Allow full search on devices page;
+Allow sysName search on alertlog page;
+Allow sysName search on alerts page;
+Allow sysName search on eventlog page;
+Allow sysName search on poll-log page;
+Allow sysName search on ports page;

*Replaced all occurrences of $_POST with $vars in librenms/html/includes/table. ($vars are sanity-checked).

* Whitespace fix

* Fixed $where & $param

* Add files via upload

* Whitespaces....

Sometimes you want'em, sometimes you hate'em.
2018-03-25 21:50:09 +01:00
Neil Lathwood
544b363951 alert: Added support for disabling recovery notifications (#8430)
* alert: Added support for disabling recovery notifications

* reversed use of recovery

* removed debug + small update
2018-03-22 12:38:16 -05:00
Mike Rostermund
e13920cdc8 Fix typo (#8444) 2018-03-21 15:10:20 -05:00
Tony Murray
8cc8eb8dd2 refactor: Use elseif instead of else if (#8417) 2018-03-19 21:40:17 +00:00
Dag Bakke
af39200c41 Borderless fullscreen geographical map, with just the nodes. (#8337)
* Added a variant of map.php which allows for a borderless fullscreen geographical map, with just the nodes.

* Signed my work.

* Removed a space.

* delete whitespace

* remove whitespace

* hack to fix some tiles not loading

found the fix here:
https://stackoverflow.com/questions/36246815/data-toggle-tab-does-not-download-leaflet-map/36257493#36257493
https://gis.stackexchange.com/questions/224932/problem-with-map-tiles-loading-with-leaflet-and-bootstrap

You might be able to do something more elegant.

* added menu entry

This removes the need for setting it as a front-page. Now it can be accessed from the menu and LibreNMS can be accessed by navigating back.

* Create fullscreenmap.inc.php

Notice the line:
$pagetitle[] = 'Fullscreen Map';

* REmoved the original fullscreenmap.php

* Revert "REmoved the original fullscreenmap.php"

This reverts commit 570953c5f5.

* addded the resize event to html/pages/fullscreenmap.inc.php for proper leaflet rendering

* Removed old file

* Adjusted CSS and javascript.

* Reverting to original javascript.

* change Leaflet container CSS to white background

* Made the Geographical Map not hide the menu when not in fullscreen mode.

* Cleaned up the CSS-file a bit.

* Added a variant of map.php which allows for a borderless fullscreen geographical map, with just the nodes.

* Signed my work.

* Removed a space.

* delete whitespace

* remove whitespace

* hack to fix some tiles not loading

found the fix here:
https://stackoverflow.com/questions/36246815/data-toggle-tab-does-not-download-leaflet-map/36257493#36257493
https://gis.stackexchange.com/questions/224932/problem-with-map-tiles-loading-with-leaflet-and-bootstrap

You might be able to do something more elegant.

* added menu entry

This removes the need for setting it as a front-page. Now it can be accessed from the menu and LibreNMS can be accessed by navigating back.

* Create fullscreenmap.inc.php

Notice the line:
$pagetitle[] = 'Fullscreen Map';

* REmoved the original fullscreenmap.php

* Revert "REmoved the original fullscreenmap.php"

This reverts commit 570953c5f5.

* addded the resize event to html/pages/fullscreenmap.inc.php for proper leaflet rendering

* Removed old file

* Adjusted CSS and javascript.

* Reverting to original javascript.

* change Leaflet container CSS to white background

* Made the Geographical Map not hide the menu when not in fullscreen mode.

* Cleaned up the CSS-file a bit.
2018-03-18 22:47:06 -05:00