* Device Groups rewrite
Updated web ui
Static or dynamic groups allowed
Alert rule query builder
Translation support
Permissions support
* cleanup, make relationship save, and validate it
* builder WIP
* rules builder and rules saving/loading
* Parse query builder to Laravel Fluent query
* Upgrade existing groups when editing.
Properly update only dynamic groups when polling.
* remove unused old code
Update API and other places to use Eloquent
* debug output in poller restored
* Fix up some things
creating static
improved validation
fix js error on creation
Fix static groups in polling
* hide pattern for static group
* Implement authorization
Use in the menu too
* update schema
* fix rollback
* Don't abort on invalid queries
* fixes to query builder
* add test data, looks like macros aren't handled (omitted them because groups don't use them generally)
* Add macro support for QueryBuilderFluentParser
* add test for macro that accepts value
* More space in forms
Retain rules when converted to static
no duplicate names allowed
* Better error feedback
Update related devices on save
* Add button icon
* format
* update docs
* fix tests
* Fix some QueryBuilderFluentParser issues with OR
updated/more test data
* Show device groups runtime
fix querybuilder.json format
* Store table joins in the rules to minimize polling time
Update group joins in daily.sh (and when they are saved)
* Update daily.php
* Add units to time
* Migration script and data feeding
* Adding the columns in the GUI
* build schema
* update FDB test data
* Use of timestamps()
* ignore created_at and updated_at in tests, and regenerate test impacted
* daily.sh does the cleaning
* space cleaning codeclimate
* Use carbon instead of str-val
* handle when $fdb_entry->updated_at and created at are null
* handle when $fdb_entry->updated_at and created at are null (force travis rerun)
* Doc update
* Doc update
Most were fine as they hardcoded the in into the query.
Change them all to use PDO properly.
Did not fix IRCBot, they are are all hardcoded.
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`
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`
* 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.
* 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.
* 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.
* 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)
* 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
* 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
* 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
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]>