Commit Graph

2738 Commits

Author SHA1 Message Date
mcq8
5ff03d5942 refactor: Refactor alert transports to classes (#7844)
* Refactor alert transports to classes

* Fix linting

* Make Slack alert transport php 5.3 compatible

* Rename call method to deliverAlert for alert transport
2017-12-10 20:20:28 +00:00
Neil Lathwood
9d66d7c897 fix: Fixed api call to get_bill (#7875) 2017-12-07 22:56:31 +00:00
Neil Lathwood
daa0773f48 api: Added support for wireless sensors (#7846)
* api: Added support for wireless sensors

* Added docs for new api calls
2017-12-06 22:27:30 +00:00
Paul Heinrichs
0dd3ec25d3 device: Update Cambium devices to the new wireless sensors (#7703)
* Inital cambium refactor

* Refactored tests

* Remove CMM from pmp group

* Add sensors / Give CMM individual OS

* Fix linting

* More Sensors / states and Revised Headers

* Added old graphs / more sensors

* Add modulation rate to sensor

* Fix Hardware detection bug

* Further hardware detection refinments

* Modify pmp hardware detection

* New Wireless Metric - SSR

* SSR Sensor Graph

* Migrate SSR to metric

* Added last metric file

* Add master check to isAp method

* Fix variables in epmp

* CMM Discovery and state addition

* Add another test for cmm
2017-12-06 21:36:01 +00:00
Neil Lathwood
782dee60fe fix: Some graphs broke due to stacked graphs, remove that change (#7848) 2017-12-04 08:12:24 +00:00
crcro
0cb3470be0 webui: Timezone support for graylog (#7799)
* added timezone support for graylog

* using default user timezone if none is configured

* newline fix, added copyrights

* copyright correction

* copyright correction

* copyright fix
2017-12-04 07:56:13 +00:00
Tony Murray
0728652d9d bug: Actually honour disabled api tokens (#7833) 2017-12-02 22:53:45 +00:00
crcro
995b7069eb webui: Added support for stacked graphs (#7725)
* initial release

* newline fix

* missed some graphs in edit

* style fixes

* revert custom function, use Config

* unified config option
added webui graph config entry
added sql entry for webui config

* removed config_id from sql file

* remove graph stack from defaults

* moved transparency and stacked option to functions.php

* style fixes

* style fixes

* changes in code
added docs about stacked graphs

* return keyed array

* new colors and transparency

* sql rename
2017-12-02 20:28:03 +00:00
Lee Spottiswood
e3082873f6 api: Added retrieve BGP sessions by ID (#7825)
* add support for retrieving BGP sessions via id

* fix syntax, use router params

* use count properly

* add get_bgp docs

* streamlined get_bgp sql query
2017-11-30 22:51:20 +00:00
Neil Lathwood
5871ee1c67 fixed get_all_ports() for api (#7829) 2017-11-30 21:29:36 +00:00
Richard Lawley
f0a908cfb1 api: Add Permission checks to API (#7710)
* Add Permission checks to API

* Consistent API Returns and SQL restrictions on list_devices, list_bills

* Scrut fixes

* Restore global  for graph functions

* Minor fixes following review
2017-11-29 09:42:52 +00:00
Tony Murray
d6db01abb5 refactor: Refactor fix php codesniffer 3.x issues (#7816)
We cannot use 3.x because it  requires php 5.4, so update to 2.9.1 or newer 2.x release.
2017-11-29 08:23:19 +00:00
Søren Rosiak
461b39e989 webui: Add ability to mark all notifications as read (#7489)
* feature: Add ability to mark all notifications as read

fixes:
https://community.librenms.org/t/ability-to-mark-all-notifications-as-re
ad/2368/1

* Do not add multiple read notifications_attribs

* not archive, yes non-admin

* Oops, hardcoded user_id
2017-11-28 21:22:53 -06:00
Adam Bishop
1c6b7a967f Single Sign-On Authentication Mechanism (#7601)
* Allow the URL a user is sent to after logging out to be customised
This is required for any authentication system that has a magic URL for logging out (e.g. /Shibboleth.sso/Logout).

* Allow auth plugins to return a username

This is a bit cleaner than the current auth flow, which special cases e.g. http authentication

* Add some tests, defaults and documentation

* Add single sign-on authentication mechanism

* Make HTTPAuth use the authExternal/getExternalUsername methods

* Add to acknowledgements

* Add reset method to Auth
2017-11-28 20:40:17 -06:00
Tony Murray
ea684c3543 webui: Allow deletion of dead poller nodes (#7721)
* webui: allow deletion of dead poller nodes

* improve messages
2017-11-22 07:50:29 +00:00
Richard Lawley
c56f04e1e2 fix: Set API log start at 0 rather than 1(#7772) 2017-11-20 15:31:21 +00:00
Tony Murray
1cc0e7cd6d fix: Fixed empty group query for devices (#7760)
* fix: empty device group query

* fix: empty device group query
Optimize it a bit to use the relationship.
2017-11-19 21:54:09 +00:00
mcq8
c9728a1f71 refactor: Refactored authorizers to classes (#7497)
* Refactored authorizers to classes

* Merge changes for #7335

* ! fix php 5.3 incompatibility

* Update ADAuthorizationAuthorizer.php

* Fix get_user -> getUser

* Rename AuthorizerFactory to Auth, fix interface missing functions

* Add phpdocs to all interface methods and normalize the names a bit.

* Re-work auth_test.php AD bind tests to work properly with the new class.
Reflection is not the nicest tool, but I think it is appropriate here.
Handle exceptions more nicely in auth_test.php

* Restore AD getUseList fix

Not sure how it got removed

* fix auth_test.php style
2017-11-18 10:33:03 +00:00
Tony Murray
de35e6e3a5 fix: notification read count doesn't decrement in menu bar (#7750)
* fix: notification read count doesn't decrement in menu bar

* also remove red color if we reach 0
2017-11-16 20:10:20 -06:00
Neil Lathwood
c6a0c9d124 api: Added support for Oxidized asking for a single host (#7705) 2017-11-16 21:21:52 +00:00
Richard Lawley
00fc5bf0e8 API: Validate columns parameter against fields in table (#7717)
* Validate columns parameter against fields in table

* Removed unused return var

* Replace schema check from DB with yaml

* Style fixes
2017-11-14 09:15:12 -06:00
Neil Lathwood
4e59dd47c9 webui: Expose pollers link to show total poll time for all devices per poller (#7699)
* webui: Expose pollers link to show total poll time for all devices per poller

* Update pollers.inc.php
2017-11-13 12:18:07 -06:00
Neil Lathwood
75ee23c6b3 webui: Updated poll-log page to honour force_ip_to_sysname (#7712) 2017-11-13 08:06:48 -06:00
Tony Murray
8b3bd57303 fix: Number comparisons in alerts and device groups (#7695)
Remove quotes so if the field we are comparing against is a string type, we still do a number comparison.
2017-11-09 20:37:45 +00:00
deepseth
ea646bae2c Trailing slash in multi_data graphs removed (#7673) 2017-11-08 14:32:46 +00:00
Tony Murray
4dd56bc72e refactor: Wifi cleanup (#7607)
* refactor: remove duplicated data collection in old wifi module
Still a bit more work before we can fully remove it

* remove unused graphs
update overview graphs for some wireless os
2017-11-02 21:07:58 +00:00
Robert (KHobbits)
ea477e1b28 Add support for a wider range of link speeds when mapping links. (#7533)
Use a formula to work out link speed on network map, rather than using defined speeds.
2017-11-01 23:14:03 -05:00
Neil Lathwood
f00e896e93 webui: Added toner support in health metrics list (#7595) 2017-10-31 20:31:56 +00:00
Zmegolaz
03820d3bd8 Fix: availability-map showed ping devices as warning. (#7592) 2017-10-31 08:15:23 -05:00
Tony Murray
9d73cd401a feature: LDAP auth update: alerts, api, remember me (#7335)
* feature: LDAP auth update: alerts, api, remember me
Defer ldap connection until it is needed (saves connections from pollers)
Add ability to use a bind account if the server does not allow anonymous bind.
If the server does allow anonymous bind, no config change is needed.
Use Config class

FYI, I have no way to test this.

TODO: update/validate docs

* prevent duplicate users in get_userlist()

* fix bug in Config get for auth_ldap_uid_attribute, `.` should have been `,`
Change case of uidNumber to match common configs (should be case insensitive anyway)

* revert uidnumber case changes and fix up user supplied ones as it is unintuitive that they need to be lowercase.
Add auth_ldap_binddn setting to allow more a more specific way to enter the bind user.
2017-10-30 19:28:40 +00:00
Zmegolaz
f8d7ccfe0d feature: Support for up/down detection of ping only devices.
* Added support for ping only devices.

* Renamed sql-schema/206 to 207.

* Discovery tried to detect the OS when it shouldn't.

* Updated db_schema.yaml

* Added ping icon.

* Don't show unused graphs and tabs when SNMP is disabled.

* Allow the user to specify OS of ping only devices.

* Removing custom OS now changes it to 'ping'.

* Removed unnecessary use of mres().

* UI select box for SNMP enable/disable.

* Hide device_ping_perf if ping is disable on device.

* Fixed SNMP settings update status messages.

* Added functionality to add ping only devices via the web ui.

* Added ping only option to addhost.php

* Added ping only support to snmp-scan.py

* Moved sql 208 to 211

* Fixed scrutinizer issues.

* Fixed broken ossearch.

* Added ping only support to the API.

* Updated API doc.

* Added (optional) to OS and hardware description. Hid Port Settings, Applications, Modules, Storage, Processors, Memory and Components from the edit menu

* Style fix.

* Updated ping icon.

* clean() instead of mres(). More escaping. Better help in snmp-scan.py and addhost.php

* Fixed scrutinizer issue.

* Always try SNMP in snmp-scan.py, new option for it in addhost.php. Slice instead of chunk in ajax_ossuggest.php. Other minor style changes.

* Updated sql modifications to insert the new column in the same place as in db_schema.yaml.
2017-10-27 22:59:25 -05:00
Joel Kociolek
bc3d1ed47e feature: Improve Freeswitch agent: add ability to get data via snmp and graph more data (#7549)
* Add ability to get Freeswitch application data via snmp

On your Freeswitch server install the script from
https://github.com/librenms/librenms-agent/blob/master/agent-local/freeswitch
into /etc/snmp, make it executable and adjust it to your installation.
Configure your snmpd to use the sript as an extension. For example on Debian
add the following line to your /etc/snmp/snmpd.conf:

extend freeswitch /etc/snmp/freeswitch

Activate the Freeswitch application for your server on your LibreNMS server.
it should now start to receive data from your Freeswitch server via snmp.

* Graph "Calls" and "Channels" of Freeswitch agent

The Freeswitch agent sends Calls and Channels count and they weren't graphed
up to now.  This is especially useful in settings where the Freeswitch
server does not act as a Gateway and thus the agent does not sent
Incoming and Outgoing Call numbers.

* Cleanup commented code and add myself to authors
2017-10-26 11:27:11 +01:00
Tony Murray
51ba934e11 feature: Added web validation (#7474)
* refactor: convert validations to modules to prep for gui integration

* accidentally dropped, schema update

* fix accidental output to webui

* mention discovery-wrapper.py and re-arrange.

* refine some fix statements

* rename the Config validation group to Configuration.

* fix some scrutinizer issues
remove as many local functions from validator.php as possible
move extensions from pre-check
remove duplicate timezone check
looks like there is some db schema differences between mariadb 10.1 and 10.2, investigating

* mariadb version diff take2

* Check schema version first for database.
Remove stop to go back to command line for install docs.
Add helpful link when there is no devices added to /addhost

* fix incorrect validation for empty string defaults

* Fix style

* Add additional file permissions checks

* catch exception and fail for invalid timezone
Change visuals a bit.

* add php version warning

* fix space
2017-10-26 07:56:09 +01:00
Neil Lathwood
e751206f74 newdevice: Added more detection for IgniteNet FusionSwitch (#7384)
* newdevice: Added more detection for IgniteNet FusionSwitch

* fixed current graphs descr

* small updates

* small updates recommended by murrant
2017-10-25 08:10:02 -05:00
Florian Beer
ab1658e90a webui: Show only authorized services in availability map (#7498)
* Show only authorized services in availability map

Up until now, normal users could see all configured services in availability map. This PR checks for permissions first, before displaying the items. I haven't looked at the dashboard widget yet, maybe it needs similar changes.

* Update to use userlevel helper function
2017-10-19 07:49:07 +01:00
FTBZ
89ff05ebea newdevice: Added firewall graphs for Palo Alto Networks firewall (#7483)
* Features: Add firewall graphs for Palo Alto Networks firewall

* Features: Add firewall graphs for Palo Alto Networks firewall

* Update db_schema.yaml
2017-10-17 12:42:13 +01:00
Tony Murray
96ccc49026 security: Escape sql credentials during install (#7494) 2017-10-17 11:49:56 +01:00
Ryan Medlyn
62867a6661 webui: Allow user to display ok/warning/critical alerts only (#7484)
* Allow user to display ok/warning/critical alerts only

* Update alerts.inc.php

* Update alerts.inc.php
2017-10-15 19:50:55 +01:00
Mihai Petracovici
348f5012b1 api: Added sysname as filtering group for oxidized (#7485)
* Add sysname as filtering group for oxidized

* Updated Oxidized docs with new filtering option
2017-10-15 19:37:20 +01:00
Søren Rosiak
a9ab96e83f feature: Improve Device Neighbour WebUI (#7487) 2017-10-15 09:26:01 -05:00
Yunchih Chen
82fb20cc19 feature: Configurable 95th percentile (#7442)
See issue #7406 for detail.
2017-10-11 13:21:11 +01:00
Tony Murray
503500f978 feature: AD now supports nested groups (resubmit #7175) (#7259)
* feature: AD support nested groups (resubmit #7175)
Don't let groups with periods in the name cause issues.

* Merge #7245 into this PR

* Capture Exceptions in get_userlevel()

* Throw generic error if auth_ad_debug is not enabled to prevent information leak.
2017-10-04 21:31:17 +01:00
Neil Lathwood
592e8aca4c newdevice: Added sensor detection for APC In Row RD devices (#7385)
* newdevice: Added sensor detection for APC In Row RD devices

* Update apc.yaml

* Update apc.yaml

* Update cooling.inc.php

* Update pressure.inc.php
2017-09-29 21:13:27 +01:00
Neil Lathwood
98e509c27c webui: Updated alert rule collection to be table (#7371) 2017-09-29 21:12:22 +01:00
Neil Lathwood
30318b7427 webui: Show how long a device has been down if it is down (#7336) 2017-09-29 21:05:51 +01:00
Neil Lathwood
0376f92cc3 webui: Added device description to overview page (#7328) 2017-09-13 19:46:16 -05:00
Paul Heinrichs
9f553af71e newdevice: Added DHCP Leases Graph for Mikrotik (#7333) 2017-09-13 19:49:41 +01:00
Neil Lathwood
f97b0b87a3 refactor: Updated ldap auth to allow configurable uidnumber field (#7302) 2017-09-08 12:04:59 -05:00
Thom Seddon
20aa23508f api: Added simple OSPF API route 2017-09-07 20:04:36 +01:00
Zmegolaz
5441bafc81 fix: Fixed IPv6 host renaming (#7275)
* Fixed IPv6 host renaming

* Added get_rrd_dir() and modified other files to use it where appropriate.

* rrd_name() now uses the new function get_rrd_dir(), to make it simpler to modify the escaping in the future.

* Wrong function name in rrdstep.php
2017-09-02 13:45:31 -05:00