89 Commits

Author SHA1 Message Date
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
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
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
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
701fbbc29b feature: Add a new locking framework that uses flock. (#6858)
Change locks to use flock, as pid checking is not
sufficient when PID Namespaces are involved.
2017-07-02 23:44:36 -05:00
0338734fe7 feature: Added script (scripts/test-template.php) to test alert templates (#6631)
* feature: Added script (scripts/test-template.php) to test alert templates

* moved remaining functions, fixed php 5.3 and include dir

* added docs on use for test-template script
2017-05-13 06:46:08 -05:00
41e7689c77 refactor: DB Updates will now file level lock to stop duplicate updates (#6469)
* refactor: DB Updates will now file level lock to stop duplicate updates

* scrut fixes

* renamed function from clear_lock() to release_lock()
2017-05-03 14:48:23 +01:00
af2930e0d9 fix: Clear out stale alerts (#6268) 2017-03-25 21:02:21 +00:00
b30161b80c fix: Correct the use of GetContacts() #5012 (#6059)
* fix: Correct the use of GetContacts() #5012

* small update

* array set

* Properly check the results
2017-03-07 22:14:51 -06:00
5bfd23e7eb webui: New eventlog severity classification (#5830)
* New event log severity model

* Revert "New event log severity model"

This reverts commit 0783527af8ca492a562cc9a60e3887c24599000d.

* New event log severity model

* Fixed spaces vs tabs

* Learning the format requirements

* Learning the format requirements

* Moved the colours in to the stylesheet

* change SQL file to stop conflicting

* refactor log_event so severity isn't last, but reference is.

* keep having to move the file due to new PR conflicts

* Revert "keep having to move the file due to new PR conflicts"

This reverts commit f3030e7218f3403664616fde655e4d35c134516a.

* extended support to dashboard and eventlog page

* formatting
2017-02-12 22:41:05 +00:00
8352a3a000 fix: update any IP fields using inet6_ntop() #5207 2016-12-29 23:50:22 +00:00
9a33464c52 refactor: Centralize includes and initialization (#4991) 2016-11-21 20:12:59 +00:00
e934e306fc feature: Added formatted uptime value for alert templates #4983
feature: Added formatted uptime value for alert templates #4983
2016-11-15 22:11:12 +02:00
e1fac851f9 refactor: Update alert rules to generate sql query and store in db (#4748) 2016-10-15 00:29:55 +01:00
32ae45640e feature: Added support for show faults array in recovery alerts (#4708) 2016-10-04 06:53:08 +00:00
3680849206 feature: Add description and notes to be used in alerts templates (#4706) 2016-10-03 20:31:50 +01:00
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
abc6a5b799 PSR-2 Final cleanup (#4247)
refactor: Final PSR2 cleanup
2016-08-28 23:32:55 +01:00
laf
9f130d53cf Added ability to use uptime in alerts template 2016-07-28 21:04:00 +01:00
laf
ea5512ffe6 Added location to be available in alerts template 2016-06-13 22:03:17 +00:00
laf
55063b8f8d Added ability to use sysName in templates 2016-05-02 19:15:58 +00:00
59ad5d06c4 Catch failed transports that don't return 'false'. Pass error message into event log. 2016-03-23 16:57:15 +00:00
b8cdadaf04 Merge pull request #3148 from ekoyle/alert_template_transport
Alert template transport
2016-03-17 20:58:43 +00:00
47b87e959e Merge pull request #3138 from f0o/minor-alerting-addons
Minor alerting addons
2016-03-08 21:00:37 +00:00
94a182a396 Revert "Don't escape single quotes in alert templates so that we can compare strings in if statements"
This reverts commit 124afc2054529b080abd0b9629b0673edad279e9.
2016-03-07 16:12:57 -07:00
46bee4021f Changed else if to elseif 2016-03-04 16:25:51 +00:00
29eea12b08 Scrut fixes 2016-03-04 14:36:47 +00:00
9773b3bade Tabs to spaces 2016-03-04 11:30:11 +01:00
124afc2054 Don't escape single quotes in alert templates so that we can compare strings in if statements 2016-03-03 11:02:17 -07:00
f0o
1dc99b83c5 Added %diff as placeholder for changed objects between worsens/betters
Added %elapsed in all cases
2016-03-02 16:53:53 +00:00
f0o
34e0146d8e Added {calc} operation to produce inline calculations in templates 2016-03-02 16:33:46 +00:00
b34ee3932f Add transport to alert_template vars 2016-03-01 15:33:34 -07:00
731e43bc66 Revert "[WIP] Sanity!" 2016-02-17 13:59:58 +00:00
f0o
21e94b3e3a Sanity! 2016-02-10 15:21:31 +00:00
laf
0558275414 Added verbose debugging, normal debugging will now try and mask certain information 2016-01-17 14:39:17 +00:00
f0o
bb112a97b0 HotFix remove empty transports with keys 2015-11-23 15:57:43 +00:00
laf
64180fa9a8 Added ability to globally disable sending alerts 2015-11-04 20:29:02 +00:00
f0o
38bd3cf763 fix a typo 2015-09-03 15:15:17 +01:00
04bb652e06 Merge pull request #1817 from f0o/issue-1770
Only process followups if there are any results
2015-09-01 09:38:55 +01:00
f0o
a833d46d4d Add placehoders to custom titles 2015-08-30 18:02:29 +01:00
f0o
9057d48273 Fix default template assignment 2015-08-30 17:07:02 +01:00
f0o
ac7d0c9420 Added user defined titles for alert templates 2015-08-30 16:53:34 +01:00
f0o
867c83e9ac Fix Alert-Test Object. 2015-08-27 16:03:31 +01:00
f0o
f28103173b Only process followups if there are any results 2015-08-27 14:05:47 +01:00
f0o
ec6dc0fb40 Reformated eventlog messages to represent the state of the trigger 2015-08-13 20:37:05 +00:00
d8693f05ae Fix coding style part 2 2015-07-15 11:04:22 +02:00
8226e8b447 Merge pull request #1096 from laf/issue-1095-web
Added support for interval for alerting for WebUI
2015-06-20 01:56:08 +01:00
laf
1e34fb0753 Added f0os patch for using interval on alerts 2015-06-20 01:49:03 +01:00
f0o
b54dc288c3 Replace Alert-ID with Alert-Name/Rule in titles 2015-06-19 16:53:31 +00:00
f0o
b8666cb886 Log success or failure of an alert-transport 2015-06-15 18:14:12 +00:00