Commit Graph

500 Commits

Author SHA1 Message Date
Kevin Krumm
597af28093 alerts: Added in dell server sensors alert rules to the collection (#7647)
* alert rules: alert rules for dell servers

added in dell alert rules to the collection.

* Update alert_rules.json

fixed the ,

* Update alert_rules.json

fixed the "rule":

* Update alert_rules.json

minor fixes and added in MAC address alert. This could be useful when searching for missing devices or rogue devices on your network.

* Update alert_rules.json

removed mac address rule.
2017-11-07 20:21:37 +00:00
FTBZ
aef1a5f28a newdevice: Added state sensors for Palo Alto Networks firewall (#7482)
* Features: Add state sensors for Palo Alto Networks firewall

* Removed the MIBs files

* fix: Removing echo

* Migrate to YAML

* Migrate to YAML

* Change passive to unknow
2017-11-02 21:41:51 +00:00
Neil Lathwood
cb333071c8
fix: Added primary key to perf_times to improve DELETE performance on replicas using ROW based replication (#7493)
* fix: Added primary key to perf_times to improve DELETE performance on replicas using ROW based replication

* moved sql file

* moved sql file

* Rebased

* fixed schema

* moved sql file
2017-10-31 21:08:16 +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
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
9774acd055 fix: Fixed clickatell alert transport (#7446)
* fix: Fixed clickatell alert transport

* Set a default value for two config columns to ensure mysql strict

* fixed schema

* fixed schema
2017-10-15 23:49:51 -05:00
FTBZ
2e849e1b02 feature: Added more rules for the alert collection (#7430) 2017-10-04 21:02:17 +01:00
kkrumm1
01a48496c8 features: Added HP iLo and OS-updates rules to the rule collection (#7423)
* features: added even more rules to the collection

Added in,
HPE iLo Server drive degraded/failure
HPE iLo Server Power Supply degraded/failure
HPE iLo Server fan degraded/failure
HPE iLo Server CPU degraded/failure
HPE iLo Server Memory degraded/failure
Applications OS-Updates, New Updates Available

* Update alert_rules.json

* fixed some line issues and spaces

* fixed syntax error

* Update alert_rules.json

fixed a ,

* Update alert_rules.json

fixed mistake with {

* Update alert_rules.json

fixed typo at the end
2017-10-04 08:21:16 +01:00
Tony Murray
c0b267b49c refactor: Discovery protocols re-write (#7380)
* refactor: discovery protocols re-write
extract more code to make it easier to read
use snmpwalk_group
walk lldpRemTable instead of lldpRemoteSystemsData
Optimize discover_device to reduce dns lookups of bad dns names
Make discovery_by_ip behavior consistent between cdp and lldp
move can_skip_discovery to discovery functions

Tested lldp, cdp, and ospf.

* always discover links even if the remote device isn't in system
Fix discover_link always updating

* fix style

* fix update, not fetching id

* increase platform length.  Most devices use sysDescr here, which is max length 255

* remove orphaned links

* update db_schema.yaml
2017-10-04 08:16:23 +01:00
FTBZ
e16900456c feature: Added alert rules for RFC1628 UPS to the rule collection (#7415) 2017-10-03 21:34:12 +01:00
Parth Laxmikant Kolekar
101e7426f8 Extend username to varchar(255) (#7395)
* Extend username to varchar(255)

* Updated DB Schema by running build-schema script

* Updated session.session_username to be varchar(255) too
2017-09-29 20:15:48 +01:00
kkrumm1
777eb1f823 feature: Added more rules to the collection of alert rules (#7363)
* Features: Updated collection of alert rules

Added in the following to the Alerts Collection,

Syslog, received Alert Priority Message
Syslog, received Emergency Priority Message
APC UPS Battery Needs Replacement
APC UPS Switched to Battery Power
APC UPS in Hardware Failure Bypass Mode
APC UPS in Emergency Static Bypass Mode

* Update alert_rules.json

* Update alert_rules.json

fixed changes per request.

* Update alert_rules.json

fixed "white spaces and spaces"

* Update alert_rules.json

Fixed spaces and tabs... rookie mistake.
2017-09-20 22:58:24 +01:00
Neil Lathwood
aef79535f4 newdevice: Added support for A10 ACOS devices (#7327)
* newdevice: Added support for A10 ACOS devices
2017-09-17 21:33:09 +02:00
Neil Lathwood
c16ca70c71 fix: Updated graph_types table so graph_subtype has no default value (#7285)
* fix: Updated graph_types table so graph_subtype has no default value

* added schema update
2017-09-04 23:04:33 -05:00
Neil Lathwood
edae33507a feature: Added script to generate config for new OS (#7161)
* feature: Added script to generate config for new OS

* scrut fixes
2017-09-04 21:38:09 +01:00
Tony Murray
0def643e09 feature: Notify about failed updates, block detectable bad updates (#7188)
* Feature: Notify about failed updates, block detectable bad updates
Ability to post notifications when the update fails.
Detect and roll back updates that will cause broken installs. (Needs testing)
Add severity to notifications, critical (2) notifications will display a toast.

This will be used for removing in-tree dependencies and raising the minimum php version.

* Improve naming a bit add phpdoc to new_notification
In case multiple notifications are created, remove them all.

* Remove notifications when update is disabled.

* update travis to use db testing

* added missing index
2017-08-26 21:35:39 +01:00
Neil Lathwood
932b05c38c fix: Updated dump_db_schema() to use default 0 if available (#7225)
* fix: Updated dump_db_schema() to use default 0 if available

* added removed column for testing
2017-08-26 20:23:30 +01:00
Aldemir Akpinar
f6fe6f748b feature: sysV init script for the IRC bot (#7170) 2017-08-20 08:38:24 +01:00
Neil Lathwood
ad6e82b3c7 fix: Fixed dump_db_schema / validate to work with newer versions of MariaDB (#7162)
* fix: Fixed dump_db_schema / validate to work with newer versions of MariaDB

* removed debug
2017-08-17 08:25:45 +01:00
allano337
5dfff2207b feature: Create librenms-irc.service (#7087)
* Create librenms-irc.service

basic systemd start up script goes in /etc/systemd/system/librenms-irc.service it is set to start at boot, but it can be stopped or started just like any other systemd script ie. systemctl start librenms-irc.service

* Small changes
2017-08-16 13:59:02 -05:00
Søren Rosiak
5ed7003b43 fix: Fixed issue with column size of ifTrunk (#7125)
* fix: Fix potential issue with column size of ifTrunk

* renemed sql file

* updated db_schema.yaml
2017-08-12 21:03:17 +01:00
Neil Lathwood
707b6c6954 feature: Added support to cisco sensors to link them to ports + macro/docs for alerting (#6959)
* feature: Added support to cisco sensors to link them to ports + macro/docs for alerting

* renamed sql
2017-08-04 19:37:50 +01:00
Etz
115515f966 fix: Service warning/critical alert rules (#7105)
Name and rule statements were swapped.
2017-08-02 09:20:45 -05:00
Tony Murray
b56c6b6adf fix: fdb tables multiple IPs and IPs from other devices adding extra rows (#6930)
Fix missing IPs because the ARP entries are on different port_id
Update arp discovery to use snmpwalk_group() additional fix in that function
Fix removal of arp entries
Fix a debug output type in fdb discovery
2017-07-04 22:27:43 +01:00
Tony Murray
e8dd72e8db feature: Support fdb table on generic devices (#6902)
* feature: support fdb table on generic devices
refactored code to use snmpwalk_group
refactored ajax table code to use joins and reduce extra queries
add indexes for device_id and port_id, drop primary index
Make all columns sortable
Fix a few other small issues

* Add index for vlan_id since that field can be searched by the user

* fix whitespace

* Rename 197.sql to 198.sql

* set row count for table
2017-06-29 21:03:56 +01:00
Tony Murray
bf0df7266a feature: Added fdb discovery module (#6887)
revert the context_name changes to snmp.inc.php and use the same method as other parts of the code
2017-06-26 13:58:17 +01:00
Neil Lathwood
54365985a6 Revert "feature: fdb tables (#6616)" (#6886)
This reverts commit 81ddab86af.
2017-06-25 07:04:04 +01:00
Lorenzo Zafra
81ddab86af feature: fdb tables (#6616)
* feature: FDB TABLES for ios and timos

* Fixed coding style issues

* renamed fdb.sql to 191.sql

* fixed travisCI issue

* FDB table discovery working on IOS

* Fixed bug: failing to insert fdb entries into database

* Fix phpcbf issue

* moved sql schema

* rename sql schema

* Add (tentative) FDB support for HP Comware switches

* build schema

* schema changes

* run build schema.......

* FBD Table discovery working on HP ComWare

* FBD Table discovery working on HP ComWare

* Add FDB support for HP Comware

* Discovery regex fix, tested and works for cisco 3750, 2960, 6509

* Use vlan_id instead of raw vlan. Remove Nokia implementation as vlans are not being discovered for it at the moment.

* Use vlan_id instead of vlan.

* Add debug messages, comware support

* Sorry.. phpunit isnt working for me

* Use a file structure instead of if statement per OS

* Make inserts to vlan table if entry does not exist.

* Rename sql schema file

* Use existing context name

Improve output and database synchronization

Remove chromephp and if ios

rename sqlfile

add comware back

update schema

* Delete TIMETRA-CHASSIS-MIB

* Delete TIMETRA-FILTER-MIB

* change index to bigint to be safe
2017-06-24 22:07:31 -05:00
kkrumm1
09103b2067 feature: Added syslog auth failure to alert_rules.json (#6847)
feature: Added syslog auth failure to alert_rules.json (#6847)
2017-06-17 15:03:18 +01:00
Neil Lathwood
f72e2ce4b1 fix: Updated sysObjectId column in devices table to varchar(128) (#6832)
* fix: Updated sysObjectId column in devices table to varchar(128)

* correct db_schema
2017-06-13 18:37:21 -05:00
Florian Beer
7442f8d40d feature: Added service alert rules (#6772)
* Add service alert rules

https://community.librenms.org/t/configuring-alerting-via-nagios-plugins/1389/5?u=florianbeer

* Fix escaping

* Update alert_rules.json
2017-06-02 19:51:45 +01:00
Neil Lathwood
895801d855 newdevice: Added more health information for APC units (#6619)
* fix: Fixed apc state support emsOutput

* newdevice: Added more health information for APC devices

* update schema file

* schema file renamed
2017-05-17 22:41:53 +01:00
Neil Lathwood
612186dabf alerting: Added option to enable/disable option for sending alerts to normal users (#6590)
* alerting: Added option to enable/disable option for sending alerts to normal users

* Update notifications.rss

* added missing sql

* Fix schema

* Update notifications.rss
2017-05-15 23:35:26 +01:00
Tony Murray
2dd44fdfdf refactor: move default alert rules into the collection (#6621)
* refactor: move default alert rules into the collection
Also adds the wireless rules to the default set.

* Added additional defaults to extra

* Fix up the extra value
Also, missed `rule` column when creating default rules
2017-05-13 09:24:47 +01:00
Tony Murray
422b2c8ae1 fix: issue with wireless sensors when there are too many oids (#6578)
fixes: 6560
2017-05-04 19:56:25 +01:00
Tim Stallard
6b2ae00e27 fix: Increased speed of loading syslog pages. (#6433)
* Increased speed of loading syslog pages.
I agree to the conditions of the Contributor Agreement contained in doc/General/Contributing.md.

* moved schema 186->189
2017-05-03 22:41:55 +01: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
Aldemir Akpinar
450c980cc1 Fix: Service filenames are snipped when longer than 16 characters (#6459)
* Do not show unintended debug messages

* Fix the silly mistake

* Change Cisco UCM category from tele to telephony

* Added telephony definitions

* Changed the category to collaboration as agreed

* Fix snipped service filenames

* rebased

* rebased + fixed schema
2017-04-19 11:52:13 +01:00
Xavier Beaudouin
4b0972628f Coriant Network Hardware Page. (#6187)
* Fix the definition. Should be mef instead of mef-evc

* Added Coriant TNMS Hardware page.

* Polling and discovery modules for TNMS Network Equipements.

* SQL in one line.

* Only show when OS is coriant

* Fix conflict file

* Conflict file

* Added missing COLLATE

* Refactor poller code for more data to be inserted into DB in the future.
Removed the discovery module and merged it into poller code.

* Removed tnms-nbi discovery also in the yaml

* Removing debug

* Code updates and fixes + schema rename

* bootstrapify the code.
Renamed the sql file

* Bloody tabs !

* Add db_schema.yaml update.
2017-04-12 10:39:02 +01:00
Tony Murray
55162129ff Update schema manually (#6362)
Allow build-schema.php to be run by hand more easily.
2017-04-05 09:06:11 -05:00
Neil Lathwood
03deb6434a feature: Added ability to validate database schema (#6303)
* feature: Added ability to validate database schema

* small scrut fixes

* Check for extra tables and columns
Print 30 items of schema updates, easier to copy paste sql

* Now supports detections and suggested fix for:
tables: missing, extra
columns: missing, extra, incorrect
indexes: missing, extra, incorrect

* final changes + hook into travis
2017-04-05 09:00:28 +01:00
towster
fea705b7f5 alerts: Added new alert rules to collection (#6166)
Added Interface Errors Rate greater than 100
Added Device discovered within the last 60 minutes
2017-03-15 15:41:12 +00:00
Todd Eddy
a8c04460f4 docs: Add logrotate config and update install docs (#5520) 2017-01-21 11:11:22 +00:00
laf
0bd08690f3 Updated alert_rules.json with more examples 2016-11-03 07:52:05 +00:00
laf
8a142aa53f feature: Added the option to select alert rules from a collection 2016-10-29 10:56:59 +00:00
Tony Murray
122aae85bf webui: Relocate Alerts menu
Plugins menu is moved to the Overview menu (this is basically just weathermap anyway)
2016-09-11 23:41:41 -05:00
laf
c14577db34 Added alert log purge setting - defaults to 365 2016-05-02 19:06:51 +00:00
Richard Lawley
2455feb1c9 Scrut fix + Notification 2016-03-07 18:41:51 +00:00
Tony Murray
2af1b517e5 Notifcation and tab->spaces fix. 2016-03-03 06:46:39 -06:00
laf
a45259377b Added local rss file + tidied up locations of notifications and callback 2016-01-19 21:50:00 +00:00