* API: get poller group
* missed string in doc
* return all poller groups if name/id aren't specified
* add missing doc link
* style fixes
* more style
---------
Co-authored-by: Tony Murray <murraytony@gmail.com>
* initial work on add the ability to save/fetch app data
* update to use get_app_data for ZFS
* update the poller for the new app_data stuff
* ZFS now logs changes to pools
* add schema update for app_data stuff
* small formatting fix
* add a missing \
* now adds a column
* sql-schema is no longer used, so remove the file that was added here
* misc cleanups
* rename the method in database/migrations/2022_07_03_1947_add_app_data.php
* hopefully fix the migration bit
* add the column to misc/db_schema.yaml
* more misc small DB fixes
* update the test as the json column uses collat of utf8mb4_bin
* revert the last change and try manually setting it to what is expected
* remove a extra ;
* update suricata as well
* correct the instance -> instances in one location to prevent the old instance list from being stomped
* remove a extra ;
* update fail2ban to use it as well
* remove two unused functions as suricata and fail2ban no longer use components
* style cleanup
* postgres poller updated to use it
* update html side of the postgres bits
* chronyd now uses app data bits now as well
* portactivity now uses it as well
* style fix
* sort the returned arrays from app_data
* correct log message for port activity
* collocation change
* try re-ordering it
* add in the new data column to the tests
* remove a extra ,
* hmm... ->collate('utf8mb4_unicode_ci') is not usable as apparently collate does not exist
* change the column type from json to longtext
* mv chronyd stuff while I sort out the rest of the tests... damn thing is always buggy
* hmm... fix a missing line then likely move stuff back
* style fix
* add fillable
* add the expexcted data for fail2ban json
* escape a " I missed
* add data for portactivity
* add suricata app data
* add app data to zfs legacy test
* put the moved tests back into place and update zfs-v1 test
* add app data for chronyd test
* add app data for fail2ban legacy test
* update zfs v1 app data
* add some notes on application dev work
* add Developing/Application-Notes.md to mkdocs.yml
* add data column to it
* added various suggestions from bennet-esyoil
* convert from isset to sizeof
* type fix
* fully remove the old save app data function and move it into a helper function... the other still needs cleaned up prior to removal
* update docs
* get_app_data is fully removed now as well
* a few style fixes
* add $casts
* update chronyd test
* attempt to fix the data
* more doc cleanup and try changing the cast
* style fix
* revert the changes to the chronyd test
* apply a few of murrant's suggestions
* document working with ->data as json and non-josn
* remove two no-longer used in this PR exceptions
* ->data now operates transparently
* style fix
* update data tests
* fix json
* test fix
* update the app notes to reflect how app data now works
* app test fix
* app data fix for linux_lsi
* json fix
* minor doc cleanup
* remove duplicate querty and use json_decode instead
* style fix
* modelize the app poller
* use a anon func instead of foreach
* test update
* style cleanup
* style cleanup
* another test cleanup
* more test cleanup
* reverse the test changes and add in some more glue code
* revert one of the test changes
* another small test fix
* Make things use models
Left some array access, but those will still work just fine.
* missed chronyd and portactivity
* rename poll to avoid make it any confusion
* Remove extra save and fix timestamp
* save any changes made to app->data
* nope, that was not it
* What are magic methods and how do they work?
* fix two typos
* update linux_lsi test
* change quote type
Co-authored-by: Tony Murray <murraytony@gmail.com>
* Implement OAuth and SAML2 support via Socialite
* Add socialite docs
* fixes
* Additional information added
* wip
* 22.3.0 targeted version
* Allow mysql auth as long as there is a password saved
Co-authored-by: laf <gh+n@laf.io>
Co-authored-by: Tony Murray <murraytony@gmail.com>
* Define Port Groups
* .
* .
* .
* API Calls
* .
* .
* .
* minor changes
* .
* update forms
* remove link
* .
* change column settings
* change migration
* change update position
* db migration fix
* .
* .
* .
* add missing doc reference
* update test data
* update test data
* update test data
* .
* .
* .
* .
* .
* .
* .
* .
* port group association in seperate table
* .
* .
* show all found groups on port
* select multiple Portgroups per Port
* change on migration file
* change query to eloquent
* Code changes
* move port group menu to ports main menu
* port group update to eloquent
* .
* .
* update to new setting way
* add missing merge parameter
* Use select2 and port some things to Laravel
some fixes, hopefully no new added bugs
* schema
* don't use on update restrict unfortunately
* remove unused import and revert changes
Co-authored-by: Tony Murray <murraytony@gmail.com>
* removing $graphs global
* remove unused things
* fix some additional graphs
* Fix graphs persisting too soon
* correct name for poller module performance graph
* only one type of graph is used here
* Refactor LibreNMS service
add ping
* services ported
remote legacy stats collection
* alerting
* implement unique queues
* update discovery queue manager
* remove message
* more cleanup
* Don't shuffle queue
* clean up imports
* don't try to discover ping only devices
* Fix for discovery not running timer
* Update docs a bit and and add some additional config options.
Intentionally undocumented.
* Wait until the device is marked up by the poller before discovering
* Handle loosing connection to db gracefully
* Attempt to release master after 5 db failures
* Sleep to give other nodes a chance to acquire
* Update docs and rename the doc to Dispatcher Service to more accurately reflect its function.
* add local notification
* Remove legacy index php file
* fix routing page missing data
* WIP
* fix $navbar global usage
* remove global use of $locations
* ObjectCache again...
* move vars.inc.php to init.php for legacy ajax
* navbar is more local than I thought before. Fix it.
* Fix some sensors tables escaping
* restore custom menu functionality, but with blade
and docs
* cleanup
* tidy menu @if checks
* Fix up the rest of the global variables and remove print-menubar.php
* consolidate some counting in the menu
* filter out empty custom port descr types
* Fix up custom port groups
* Fix up apps menu
* Fix services menu when all are ok
* Limit cached data to the user it is for
* Fix style
* A few clean ups
* fix pseudowire bug
* Allow trusted proxy via APP_TRUSTED_PROXIES
Set to '*' by default to emulate legacy behavior.
Set up doc describing environment variables
* Create helper to parse environment variables into arrays properly.
* Update doc blocks
* Create Installation-Ubuntu-1804-Nginx.md
A few tweaks are required to the Ubuntu 16.04 instructions to install on the newly released 18.04 version mostly relating to php being bumped to 7.2 from 7.0 and no mcrypt module for this php version in the distro repository.
* Create Installation-Ubuntu-1804-Apache.md
Used instructions from 1604 Apache as template and updated to work on Bionic (18.04).
* Update Installation-Ubuntu-1804-Nginx.md
Removed instructions for installing mcrypt module as I confirmed it works without it and it was mentioned it was no longer needed.
* Update Installation-Ubuntu-1804-Apache.md
The 1604 directions had a mixture of vi and vim for editing files. Since this is ubuntu and we want the instructions to be as easy as possible, I updated editor to be nano. I have no personal preference and can make it whatever we prefer, just figured it should be consistent between the two guides.
* Update mkdocs.yml
Added Ubuntu 18.04 instruction pages
* Update Installation-Ubuntu-1804-Apache.md
Corrected to libapache2-mod-php7.2 from libapache2-mod-php7.0
* Updated Ubuntu install docs
* Added missing mbstring + curl packages
* Updates to snmptrap handling
fix a bug in findDeviceByIP. Add more tests for that.
Move handle outside of the Trap class, it doesn't fit.
Add developer docs.
* fix tests copy paste issue.
* Fix findByIp when port may not exist.
* Logging: Output context (and extra) if they exist
* Generic trap event logging and new config setting.
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`
Hello all,
I guess this is the second version of a more fully fleshed out alert contact mapping feature. The old one was GH-8507
Transports to convert:
- [x] API
- [x] Cisco Spark
- [x] Elasticsearch
- [x] GitLab
- [x] Philips Hue
- [x] Jira
- [x] Mail
- [ ] ~~PagerDuty~~ - Requires a callback so leaving for now
- [x] Nagios
- [x] IRC
- [x] Discord
- [x] Rocket.chat
- [x] Hipchat
- [x] Pushover
- [x] Boxcar
- [x] Telegram
- [x] Pushbullet
- [x] VictorOps
- [x] OpsGenie
- [x] Clickatell
- [x] PlaySMS
- [x] Canopsis
- [x] osTicket
- [x] Microsoft Teams
- [x] SMSEagle
- [x] Syslog
- [x] Slack
The intention is for this feature to have three different levels to it:
1. Alert rule to an alert contact mapping (where the code is at now)
2. Alert rule to an alert group (made up of alert contacts) mapping
3. Alert contact mapping to different transport configurations.
There will be three transport configuration types.
1. Default (the configuration that is held in the configs table)
2. None (no transport configuration - will explain later)
3. Other (a configuration that will be defined in a different able)
Take Mail transport for example. It can either be of a "default" or "other" configuration. The hope is that in the future, users can send mail from different mail servers if they wish.
However, for ciscospark which requires a room ID and an api-token, I've decided that it has no transport configuration. Most likely, every alert contact will contain a different room-id and an api-token - which is why it has the transport config of "none".
For other transports : I am not familiar with them, so hopefully the community can add support for these. I can definitely help!
To add support for each transport will require several things:
- addition to the UI
- addition to forms/alert-contacts.inc.php
- modifications to its object class
Screenshots
![image](https://user-images.githubusercontent.com/28970851/39594533-2092ce9e-4eca-11e8-9c5d-cd002ece1425.png)
![image](https://user-images.githubusercontent.com/28970851/39594544-276e9856-4eca-11e8-80cc-82789ee0b2b2.png)
![image](https://user-images.githubusercontent.com/28970851/39594553-2fdf528c-4eca-11e8-8a40-4f149e767054.png)
I'm not sure if this is the best way to do things, so please let me know if there's a better way to structure the code! Any comments on code/db schema,/UI etc is welcome and encouraged!
The UI is heavily based on alert rules (front end is not my strong suit). And parts of the code are based on the code that was written for alert rules.
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`
* 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