* 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



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
* 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.
* Create Gateone.md
Doc for Gateone integration.
Credit to davama who wrote most of this.
f6a7e5973f
* Update Gateone.md
* Update mkdocs.yml
added gateone.md
* Test docs before deploying
fix issue with docs
* Actually check the result of the doc build
add error for testing
* Fix up docs
* use original logic
* only deploy docs if build succeeds.
Make pip quiet
* device: Rittal IT Chiller / Carel pCOweb
* doc: more documentation about the pcoweb card
* Update Carel-pCOweb-Devices.md
* change the limit for sensors and small changes
* fixed db_schema
* doc updates and sql fix
* doc update
* remove the eer graph to create a sensor
* First draft of the modals and the config interfaces
* GUI part done
* Backend code and db schema addition
* Documentation added, fixed alerting bug
* Fix typos
* Do not try to push an older db_schame.yaml
* Small db fix
* More db fixes
* Travis CI fixes
* missed a line in the travis error
* Fixed dependency clearing bug, Manage Host dependencies button now shows current selections
* Removed unnecessary index
* Correct faulty query
* Fixed sql query as requested, and renamed sql file
* Added requested changes
* Removed debug code
* Renamed sql file
* More fixes as requested
* Trying to fix db_schema.yaml
* adding laf's diff
* Corrected a small bug
* Try to resolve scrutinizer issue
* Main page bootgrid ajax modifications
* Also corrected travis ci errors
* Added select2 for pull downs, removed a redundant debug output. Changed parent_id to text
* Add missing class in the device settings page
* Fix bug where a link wasn't added after save
* Better parent down detection
* Add missing comma
* Behold the multi-parent code
* Added lookup table
* Ready for testing
* Trying to fix documentation conflicts
* Fix copy paste errors, and possible sql injection
* indentation problems
* Modified db_schema.yaml as well
* Typos, typos
* This should correct alerts
* Try to fix travis ci error
* Fix the typo in index.php
* Changed to Tony's query
* function explanation text changed
* Updated db_schema.yaml
* Trying to make automated tests happy
* Changes as requested
* Added acknowledgment for select2
* Added laf's patch
* dbBulkInsert when adding parents
* doc: create device sensor help doc.
this should help users that get confused when receiving alerts for sensors.
* Update mkdocs.yml
* Update Device-Sensors.md
* Update Device-Sensors.md
* Update Device-Sensors.md
changes requested
* docs: Continue to reorganize things
Make landing pages for /Installation, /API, etc.
Split API out into multiple docs
Properly use multi-level navigation
Add lower nav buttons (tops are bug so disable for now)
Add logo for fanciness
Refine index page a bit
* Improve API TOC layout
* Couple of fixes.
* Fix API/API-Docs, assumed it was at the right url.
* Add purge-port scipt to allow deleting of ports from the CLI.
This script allows deleting single ports by their port_id or a list
of ports read from a file or STDIN.
LibreNMS Port purge tool
-p <port_id> Purge single port by it's port-id
-f <file> Purge a list of ports, read port-ids from <file>, one on each line.
A filename of - means reading from STDIN.
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
* Update CLI-Tools.md
* feature: Allow ignore_mount, ignore_mount_string, ignore_mount_regex at OS level
* Change the storage settings to override global instead of merge.
Add documentation
* Ignore docs/
* Fix indenentation
YAML's pretty strict
* Remove static anchor names
Markdown does this automatically for us
* Tabelize entities
* Remove tildes
They don't do anything
* Renamed to index.md
* Remove backticks for headings
* Switch output format
text -> json
* renamed to index.md
* Removed `top` links
Cause TOC generation problems. A theme-wide `top` button would be more
appropriate
* Use [TOC]
Automatically generates everything
* Wrapped routes in backticks
* Moved logs around a bit
* Revert already pulled commits
* Ignore docs/
* Fix indenentation
YAML's pretty strict
* Remove static anchor names
Markdown does this automatically for us
* Tabelize entities
* Remove tildes
They don't do anything
* SSL config docs
Moving from https://github.com/librenms/librenms/pull/6932 to a new file
* rename to match other docs
* tidying the formatting
* update to add SSL-configuration
* tidied up docs a little
* remove small typo
* alphabatize index
* sort everything
* Move agent back down to the bottom
And add a separator.
* Fix my mess up
* Create Agent-Setup.md
* Update Applications.md
* Update mkdocs.yml
* Remove agent setup content from this page.