Commit Graph

51 Commits

Author SHA1 Message Date
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
Neil Lathwood
d9ceaf7830 Added support for auto purging deleted ports (#8861) 2018-07-03 08:27:20 -05:00
Neil Lathwood
03076c4025
feature: Added new alert rule builder UI and rule mapping UI (#8293)
* feature: Added new alert rule builder UI

* Updated to export sql queries

* More updates

* more changes

* removed debug

* fix scrut

* Updated to include import options + various other fixes

* fix rule

* Populate name from collection rules.

* Fix default rule import
Allow new and old style rules in the collection.
Don't add new yet as I'm not sure GenSQL() is working.

* Fix GenSQL call

* Extract filter building to class so it is nicely contained in one place

* moved schema

* some fixes and tweaks

* travis fixes

* Some more features / updates

* Fix up my mistakes when adding default rules

* Use a modal for new alert (Incomplete)
Larger dialog!!
Remove page loading stuff.

Working:
Loading rules, resetting dialog, importing from collection.

Not working yet:
select width
device limited rule access? don't know what this is...

Lots of unused stuff to delete...

* reload "table" after save

* fixed editing rule

* Auto select2 width

* Reload window on save

* Restore per-device alert. Remove debug.

* Small cleanups. Rule Name first.

* Restore button to button type. Rename schema.

* Fixes: wrong command to reload window, remove extra attributes, rule is never passed

* Fixed old rule editing

* some small updates for old imports

* travis update to use trusty

* maybe travis fix

* Ability to set alert rule mappings on the rule edit screen

* pip installs one line, no quiet for deploy

* update schema def

* Fix style and some copyright headers

* fix docs missing file

* Allow new versions of snmpsim and libraries

* Parser WIP

* Fix default rules insert

* reorganize

* Legacy import first draft done

* Implement saving
Skip translation to sql for now

* Working on glues

* small rule collection fix

* Working on glues

* Working on glues

* Docs updates + small UI changes

* Parser WIP

* reorganize

* Legacy import first draft done

* Implement saving
Skip translation to sql for now

* Working on glues

* Working on glues

* Working on glues

* Add table mapping, should move to it's own class

* WIP

* Glue working!!

* Extract Schema class

* Some final touches.
revert alerts_rules.json for now.

* Finish up initial implementation
Needs more tests

* Fix a few places

* small doc updates

* Fix finding tables in grouped rules.

* remove unused code

* code format fixes

* Some quick tests for Schema
Simplified output for findRelationshipPath. Always includes start and target in the result.
This simplifies a lot of code in QueryBuilderParser.php
This also always loads the target table data now (which we want)

* Make bill_id the PRIMARY index for the bills table

* Load macros from a json file in misc instead of the database.

* Fix whitespace and wrong key for collection.

* Handle IN properly when generating SQL

* Fix glue (devices.device_id = ports.port_id) is incorrect :D
Show ALL tables we can resolve relationships for in the query builder filter.

* Remove all macros from the database
Remove insert statements, leave updates to update user's existing rules.
2018-03-14 20:25:19 +00:00
Neil Lathwood
c14efbf904
Updated email subject for failed updates to include hostname (#8258) 2018-02-16 10:08:26 +00:00
Tony Murray
d515f5043e refactor: Move install to php53 branch if running an unsupported version of PHP (#8042)
* Move install to php53 branch if running an unsupport version of PHP

* Update validate

* Move PHP version check after update check.  This will prevent us from moving no update users to the php53 branch.

Hopefully if daily.php -f update fails it returns a non-zero and we can move them to the php53 branch still.

* Wiggle things around more.

* Also, send release installs to the php53 branch.

* Set notification error for old PHP version.
2018-01-10 14:40:58 +00:00
Tony Murray
2e73b75297 fix: Use memcached to lock daily processes on Distributed Pollers (#7735)
* fix: use memcached to lock daily processes on Distributed Pollers

* All the locks!
2017-11-24 09:37:52 +00:00
Tony Murray
54b476c769
fix: devices detected as ibmtl or generic (#7618)
* fix: devices detected as ibmtl
Guess at the sysObjectID, please report if you have devices that should be ibmtl and are no longer detected.
Add output of os in discovery.

* Always load all os for discovery.  Should be cached most of the time.
2017-11-03 16:10:24 -05:00
Tony Murray
8a051aa295 fix: Fix a couple of OS cache invalidation issues (#7567)
* fix: fix a couple of OS cache invalidation issues
Fixes issues where we might be using outdated os definitions.

* use Config and fix style issue

* only pull in settings from config.php (otherwise will possibly contain populated os config)
2017-10-27 21:03:58 +01:00
Tony Murray
1cd4fcb8b1 feature: issue warning notification if php version is less than 5.6.4 (#7418)
* feature: issue warning notification if php version is less than 5.6.4
rename set_notification function in daily.sh to set_notifiable_result
print output when a daily.sh process fails

* further notifiable clarification

* Update the notification message.

* make sure to remove the notification when updates are disabled
move the notification code into the php check
2017-10-22 19:30:31 +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
5f5dc2a854 feature: Peeringdb integration to show the Exchanges and peers for your AS' (#6178) 2017-03-22 10:17:13 +00:00
Tony Murray
370e368ffe fix: msyql errors bgp-peers, daily, callback (#5425)
* fix: msyql errors bgp-peers, daily, callback

* select cell instead of an row
2017-01-13 22:21:29 +00:00
Neil Lathwood
63fc4679db feature: Added support for sending email notifications to default_contact if updating fails (#5026) 2016-12-12 14:26:17 +00:00
Tony Murray
9a33464c52 refactor: Centralize includes and initialization (#4991) 2016-11-21 20:12:59 +00:00
Neil Lathwood
e1fac851f9 refactor: Update alert rules to generate sql query and store in db (#4748) 2016-10-15 00:29:55 +01:00
Tony Murray
d2193f76ca feature: allow scripts to be run from any working directory (#4437)
* feature: allow validate.php to be run from any working directory

* remove redundant realpath() call

* re-add realpath() to remove symbolic links

* realpath() isn't needed...

* chdir() in all php scripts in ./ and ./scripts/

* update-sql.php clearly is not used, as it was broken.

* Change some scripts to executable
Remove extra chdir() call in snmp-scan.php

* Missed console-ui.php
Kind of fixed console-ui.php help output

* Re-add newline
2016-09-14 16:53:04 +01:00
Tony Murray
abc6a5b799 PSR-2 Final cleanup (#4247)
refactor: Final PSR2 cleanup
2016-08-28 23:32:55 +01:00
Tony Murray
218c4e6b52 Do not delete directories, only files. 2016-08-01 13:24:25 -05:00
laf
b0d05ad149 Added -print to find + description of why we have deleted files 2016-08-01 18:31:19 +01:00
laf
f73385999e Updated rrd_purge to echo removed files/folders 2016-08-01 15:08:57 +01:00
laf
5a7a606abd Updated as per pr comments 2016-07-31 23:39:45 +01:00
laf
318c9cd2b0 Added cleanup for old RRD files 2016-07-30 16:57:09 +01:00
laf
c14577db34 Added alert log purge setting - defaults to 365 2016-05-02 19:06:51 +00:00
Neil Lathwood
5566163eeb Merge pull request #3156 from richardlawley/billing-perf-2 2016-03-15 21:00:44 +00:00
Richard
dc0f695796 Add optional cleanup task for old bill_data 2016-03-07 18:31:12 +00:00
laf
d85a9f688f Removed innodb check from daily and updated validate to warn 2016-03-03 20:52:23 +00:00
Christopher Smith
73c409dcdc check if auto-updates are enabled before checking innodb settings (if they are disabled, this would still throw an alert to say innodb needs adjusting even though they arent wanted) 2016-02-23 09:10:56 +11:00
Daniel Preussker
c11cf53658 Merge pull request #2815 from laf/notifications-update
Added local rss file + tidied up locations of notifications and callback
2016-01-20 20:01:07 +00:00
laf
a45259377b Added local rss file + tidied up locations of notifications and callback 2016-01-19 21:50:00 +00:00
laf
57c802cd4e Updated active directory auth to support dashboards 2016-01-17 15:26:35 +00:00
Eldon Koyle
ceb3c2264c Fix daily.php not deleting device_perf entries
Add -d option to daily.php to show SQL and fix bug where daily.php does
not delete device_perf entries because a unix timestamp (integer) can't
be cast to a datetime.

MariaDB [librenms]> select * from device_perf where timestamp < UNIX_TIMESTAMP(DATE_SUB(NOW(),INTERVAL '7' DAY));
Empty set, 1 warning (1.20 sec)

MariaDB [librenms]> show warnings;
+---------+------+----------------------------------------+
| Level   | Code | Message                                |
+---------+------+----------------------------------------+
| Warning | 1292 | Incorrect datetime value: '1451944875' |
+---------+------+----------------------------------------+
1 row in set (0.00 sec)

MariaDB [librenms]>
2016-01-11 14:58:40 -07:00
laf
58d585e6fe Updated daily.sh/daily.php to support removing users that have not logged in for X days - Radius only for now 2015-12-13 16:16:39 +00:00
Daniel Preussker
b2034cb329
Added master and release update-channels 2015-11-22 17:06:21 +00:00
Neil Lathwood
47e035d4fd Merge pull request #2004 from QuxLabs/qux-issue-5
Added notification system
2015-11-21 14:24:42 +00:00
Daniel Preussker
0ff693bd0e
Added notifications poller,page,schema,display 2015-11-21 11:22:59 +00:00
laf
2e791308f1 Centralised innodb buffer check and added to validate 2015-11-19 10:20:56 +00:00
Rosiak
3065781118 Add innodb config example to daily
Fix issue-2400
2015-11-06 17:48:50 +01:00
f0o
c83b9a374e
Fix and reformat daily.{sh,php} 2015-08-03 17:14:33 +00:00
laf
36f0ca84c1 And G 2015-07-29 22:08:52 +00:00
laf
ee22c6606a Added missing 1024! 2015-07-29 22:08:09 +00:00
laf
03f0de5d76 Added ability to detect if innodb buffers are overused 2015-07-29 22:03:25 +00:00
Job Snijders
d8693f05ae Fix coding style part 2 2015-07-15 11:04:22 +02:00
laf
eee2ae5be1 Added support for logging packet loss and min/max/avg response times on fping 2015-06-22 21:55:31 +01:00
laf
7a302c2763 Some last minute changes 2015-04-06 20:47:28 +01:00
Toni Cunyat
5b6ae9f988 Add option to clean old perf_times table entries #341 2014-11-03 18:25:45 +01:00
Paul Gear
70bb420fe7 Use consistent spacing 2014-10-25 08:40:42 +10:00
Neil Lathwood
6ccc951480 Update daily.php 2014-10-11 09:32:37 +01:00
Neil Lathwood
cdf199a2dd Updated the syslog loop to break when no more data can be deleted 2014-10-07 19:28:18 +00:00
laf
8e00599d2a Added authlog purge + improved efficiency of clearing out large syslog tables 2014-10-02 01:37:43 +01:00
laf
630023aef3 Updated dail schedule to remove old syslog and eventlog entries 2014-03-18 14:13:27 +00:00