178 Commits

Author SHA1 Message Date
Aldemir Akpinar 56561aa4dc feature: Added support for Host dependencies (#7332)
* First draft of the modals and the config interfaces

* GUI part done

* Backend code and db schema addition

* Documentation added, fixed alerting bug

* Fix typos

* Do not try to push an older db_schame.yaml

* Small db fix

* More db fixes

* Travis CI fixes

* missed a line in the travis error

* Fixed dependency clearing bug, Manage Host dependencies button now shows current selections

* Removed unnecessary index

* Correct faulty query

* Fixed sql query as requested, and renamed sql file

* Added requested changes

* Removed debug code

* Renamed sql file

* More fixes as requested

* Trying to fix db_schema.yaml

* adding laf's diff

* Corrected a small bug

* Try to resolve scrutinizer issue

* Main page bootgrid ajax modifications

* Also corrected travis ci errors

* Added select2 for pull downs, removed a redundant debug output. Changed parent_id to text

* Add missing class in the device settings page

* Fix bug where a link wasn't added after save

* Better parent down detection

* Add missing comma

* Behold the multi-parent code

* Added lookup table

* Ready for testing

* Trying to fix documentation conflicts

* Fix copy paste errors, and possible sql injection

* indentation problems

* Modified db_schema.yaml as well

* Typos, typos

* This should correct alerts

* Try to fix travis ci error

* Fix the typo in index.php

* Changed to Tony's query

* function explanation text changed

* Updated db_schema.yaml

* Trying to make automated tests happy

* Changes as requested

* Added acknowledgment for select2

* Added laf's patch

* dbBulkInsert when adding parents
2017-12-20 14:17: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
Tony Murray 1c31b06768 webui: Don't disable the applications check boxes in settings if the discovery module is disabled. (#7615)
It disables the check boxes because it will automatically disabled/enabled based on data returned from the device.
2017-11-02 20:38:17 +00:00
Tony Murray 087dbbd173 webui: Hide rediscover button for ping only devices (#7594) 2017-10-31 19:48:15 +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
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
Neil Lathwood 4f4719b66a webui: Updated all tables to have the same set number of items showing (#6798) 2017-06-08 22:10:30 -05:00
Tony Murray 4c0412b14d feature: Wireless Sensors Overhaul (#6471)
* feature: Wireless Sensors
Includes client counts for ios and unifi
Graphing could use some improvement.
Alerting and threshold ui not implemented

WIP: starting OO based wireless sensors.

Class based functionality working
remove old functional files
add schema file

discovery needs to be enabled, not polling

fix up schema

fix Unifi discovery not returning an array

Add some debug when discovering a sensor.
Fix style.

Add missing semicolin

Add a null object (Generic) for OS.
Fill out some phpdocs

Re-organized code
Each sensor type now has it's own discovery and polling interface
Custom polling tested with Unifi CCQ

Left to do:
Implement UI (Graphs and Custom thresholds)
Alerting
Testing

Fix event message text

Remove runDiscovery and runPolling from OS, they are unused and don't belong there.

Cleanups/docs

Missed this file.

Remove the requirement to fetch the current value to check validity.
Do that automatically if current is not specified
A few cleanups here and there

First pass at graphing.
device_ and wireless_ graphs added.

Add RouterOS support

Singleton OS instance isn't required right now.
Remove that to allow some memory to be freed.

Add wireless to the device list metrics.
Make all metrics clickable

Tweak graphs a bit

Implement limit configuration page.
Use sensors page as common code instead of duplicating.
Clean up some javascript interactions:  Allow enter on values to save. Cancel if update is not needed. Enable the clear custom button after setting a custom value.
Add some wireless alert rules to the library.

Add documentation.

Add unifi client counts by ssid in addition to radio.
Optimize Sensor polling a bit.

Add HP MSM clients support (for full controller)
Fix function accessibility

Formalize the discovery and poller interfaces.

Add Xirrus clients and noise floor
move module interfaces to a more appropriate place.
push caching code up to os, unsure about this do to the limitations

No point in selectively enabling wireless discovery.  We only discover if the device supports something.

Add RSSI, Power, and Rate.
Add these sensors for Ubnt Airos.
Clean up some copyrights.

Reduce the amount of files need to add new types.
Leave graph files for consistency and to allow customization.

Remove the old wifi clients graph completely.
ciscowlc should have improved counts (total and per-ssid)

Schema didn't get added.

Impelement the rest of the AirOS sensors
Reformat and re-organize the Airos.php class.

Add several UBNT AirFiber sensors

A few fixes add links to the section headers

Add HP MSM mibs.

* Schema file got dropped in rebase.

* Add wireless menu to view sensors across all devices.
Icons in the menu need help :/

* Add HeliOS, Mimosa, and Siklu support
Sensors added SNR + Noise

* Add power and utilization to Unifi

* Update polling to prefetch all sensor data in a few snmp requests as possible

* Add Extendair: tx+rx power, aggregate rate, frequency

* Add a check for duplicate sensors in discovery.  Just print an error for now.

* Add Bit Error Ratio (named error-ratio to allow for bit error rate to be added if needed)
Fix an incorrect link in the wireless sensors table

* Add error rate and change all bps and Hz to use si units

* Fixes to limits and frequency display

* Fix overview graph frequency display
A few decimal place tweaks

* Don't allow switching sensor and wireless-sensor graphs, it doesn't work.
Change individual distance graphs to use si units

* Go through the OS and make sure I got all the sensors I can (probably missed some still)
Because pollWirelessChannelAsFrequency() is generic and a little complex, so pull it up to OS.
Message to help developers adding supports that don't return an array from discover functions.

* Fix some issues

* Remove noise and signal for now at least
A couple more fixes
Add a notification

* Oopsie

* Bonus AirFiber sensors
2017-05-01 23:49:11 -05:00
Tony Murray e7057ecea5 feature: Application auto discovery (#6143) 2017-03-22 14:59:39 +00:00
Robbie Penziol afb838bc10 webgui: Added ability to set warning percentage for CPU, mempools from device edit page (#5895) 2017-03-03 15:07:12 +00:00
Tony Murray 5637399b95 webui: fix device edit health update icons (#5996)
Allow 0 and "" for valid health update values.
2017-02-25 10:37:13 +00:00
Neil Lathwood cc51a68f85 feature: Optional partial port polling (#5805)
* feature: Added ability to switch port polling mode

* update, speed things up slightly by walking certain tables

* more fixes

* updates

* updates

* update to exclude ports that are down

* wrong variable used

* update to set previous port status when null

* small update to port disco
2017-02-14 17:26:07 -06:00
Neil Lathwood 32da1bceea fix: Changing device type now is persistant (#5529) 2017-01-22 09:49:13 +00:00
Tony Murray 20dbda0829 Update os icon the handling. Add title to the os image (#5424) 2017-01-14 22:14:33 +00:00
Neil Lathwood d5296319fb refactor: MySQL strict and query fixes (#5338)
* refactor: MySQL strict and query fixes

* moved sql file
2017-01-13 06:47:16 -06:00
Neil Lathwood f0fefcfe4f bug: fix editing device no longer attempts renaming if name not changed #5123 (#5125) 2016-12-07 22:16:05 -06:00
Vitali Kari 8841eece94 feature: Adds support for enabling / disabling modules per OS (#4963)
* fixes #4946
first try, should be checked first
only discovery first

* add OS modules status indication

* add debug output
add os poller module support

* fix some whitespaces

* fix missing semicolon

* fix some whitespaces

* Modify the modules page

It now shows unset for unset device settings.
Also, `$os_module_status = $config['os'][$device['os']]['poller_modules'][$module];` doesn't work like you would expect. Fix that behavior.

* Fix mangled tabs

* optimize debug output
add docs

* text highlighting

* Streamline docs #1
* Update docs
* Spell out Global, OS, Device.
2016-11-13 13:46:05 -06:00
jonathon-k 0955d0271e webui: Allow admin users to modify hostnames in web UI #3445 2016-11-13 00:19:22 +00:00
Neil Lathwood d5b20dbd1f webui: Added support for skipping snmp check on edit snmp page for devices (#4896) 2016-11-01 17:58:55 +00:00
Neil Lathwood a2f2ccfd2c security: Fix some reported security issues (#4807) 2016-10-15 20:45:18 +01:00
Neil Lathwood 6c324cd03e refactor: Improve sensors polling for performance increase (#4725)
refactor: Improve sensors polling for performance increase
2016-10-11 19:34:09 +03:00
Neil Lathwood f4bbba1b7d fix: Updated edit snmp to set default poller_group (#4694) 2016-10-02 07:28:22 +00:00
Bennett Blodinger 07574b27d8 Move to Font Awesome
Keeps the look more in line with the navigation bar icons.
In the future with Bootstrap 4, Glyphicons will not be included, so this
starts the transistions away.
2016-09-22 10:44:17 -04:00
Tony Murray 8c639aa5a4 PSR2 Cleanup: /html edition
Travis tests for code conformance. Ignore warnings for now.
Fixed all errors, left most warnings.
2016-08-18 21:29:30 -05:00
Tony Murray ccf5b993b5 Use nicecase on device apps page
Add powerdns-recursor
Indentation
2016-08-04 13:24:59 -05:00
Neil Lathwood 42a8c27237 Merge pull request #3821 from adaniels21487/issue-3272-1
Component Update - Status
2016-07-25 20:13:25 +01:00
Aaron Daniels 52455e1128 Component Update - Status
- Align the component status field with the Nagios standard
  0=ok, 1=warning, 2=critical
- Modify existing modules to report these status' (Cisco-OTV)
- Add/Modify Alerting Macros to use these status'
- Add the a component status widget
- update edit page to report these status'
2016-07-11 16:51:01 +10:00
laf 8239109f78 Added support for setting max-repeaters per device 2016-07-06 14:45:23 +01:00
laf 7f8e587eaa fix js error 2016-07-01 18:01:24 +01:00
laf 3d77d1b77c fix js error 2016-07-01 18:00:07 +01:00
laf 2bffc5c1b7 updates as per comments from murrant 2016-07-01 10:27:15 +01:00
laf 6690e31f9d Added ability to manually set ifSpeed 2016-06-30 09:49:30 +01:00
laf 0eb35c0c88 Initial setup for customising ifSpeed on devices 2016-06-24 14:10:09 +01:00
laf e3db9c8561 Fixed ajax_* calls for use with base_url 2016-06-15 12:58:23 +00:00
Tony Murray 173336c76b Only display when it is not set to the default setting. 2016-06-12 21:36:04 -05:00
Tony Murray 55f8576973 Fix custom port not showing on the device edit page 2016-06-12 21:23:21 -05:00
Tony Murray 9f94b278d3 Sort poller/discovery modules without affecting the $config order 2016-06-08 23:29:33 -05:00
Tony Murray a68687de5e Alphabetize the apps list 2016-06-03 21:05:09 -05:00
Tony Murray 4920c39dfd List service plugins alphabetically. 2016-05-19 14:20:42 -05:00
Aaron Daniels 854812a457 - added rrd_pipes to check script
- renamed service_* to *_service
2016-03-22 16:40:51 +10:00
Aaron Daniels 3e1d40fd7c - Added $vars to ajax_forms
- replaced all instances of $_POST with $vars
2016-03-16 08:37:15 +10:00
Aaron Daniels 0d6cfec589 Nagios Services
- Moved check-services.php to a poller module
    - Added performance data collection to the poller
    - Centralised DB functions to includes/services.inc.php
    - Created add/edit/delete functions off the device, services page
    - Removed legacy edit/delete interfaces.
    - Moved and modified check.inc scripts
    - Documentation Updates
    - Modified services table
2016-03-15 22:23:14 +10:00
David Bell a33d16dafa Corrected inserting ' into overide syslocation string 2016-03-08 11:18:33 +00:00
Harm van Tilborg 09f03c0e52 Adapted device edit form to include larger purpose field 2016-02-24 13:36:42 +01:00
ohrensessel b016763007 Fix usage of single quotes, double quotes needed 2016-02-09 13:27:10 +01:00
Maximilian Wilhelm 8c704f7bdf Allow editing port association mode of a device.
Add a select box to the device SNMP edit page in the WebUI to update
  the port association mode of a device.

Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
2016-01-26 13:50:00 +01:00
Aaron Daniels 6492b887e9 Merge branch 'master' of https://github.com/adaniels21487/librenms into issue-1650 2016-01-14 06:10:31 +10:00
Arjit Chaudhary 68a4acd717 Update device.inc.php 2016-01-10 19:01:59 +05:30
Arjit Chaudhary 3b09f8b955 Update ports.inc.php 2016-01-10 19:01:42 +05:30
Arjit Chaudhary 03051d455f Update apps.inc.php 2016-01-10 19:01:24 +05:30