20 Commits

Author SHA1 Message Date
vivia11
e1118b628a Added Alert Transports Mapping (#8660)
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`
2018-07-21 20:34:59 +01:00
Hans Erasmus
8ce423dd2d Expand the description of Application support (#8619)
* Expand the description of Application support

I was not aware that the applications can also be auto-discovered. I discovered it by chance, and when I mentioned it in discord channel, it seemed blatantly obvious to everyone else. Thought editing the docs might help future users.

* Update Applications.md

Changed a lot of instructions to make it more structured.

* Add files via upload

Addedimages to help with application extensions how-to.

* Update Applications.md

Added the file locations into master file.
2018-05-08 19:15:58 -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
FTBZ
dd8849d265 device: Added Rittal IT Chiller / Carel pCOweb card (#7826)
* 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
2017-12-30 12:08:04 +00:00
Kevin Krumm
c6501a3dda docs: Update World Map doc (#7858)
* docs: Update World Map Doc

Updated Doc and removed old Globe Map info.

* image for world map settings

* Update mkdocs.yml
2017-12-07 08:08:31 -06:00
Tony Murray
3bd9920e38 docs: Continue to reorganize docs (#7762)
* 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.
2017-11-19 01:19:18 +00:00
Kevin Krumm
aad821c207 docs: Added alert rule mapping doc (#7748)
* doc: create rule mapping doc

* Update mkdocs.yml

* Add files via upload

* Update Rule-Mapping.md
2017-11-16 19:58:58 +00:00
Kevin Krumm
133313020f docs: Added how to add graph ports to dashboards (#7749)
* docs: added how to graph interface

added to the dashboard doc

* images for port graph

* Update Dashboards.md
2017-11-16 19:56:31 +00:00
Kevin Krumm
d4dab47c75 docs: Create new docs on using dashboards (#7688)
* docs: create new dashboards doc

* docs: added new dashboard doc

* docs: images for dashboard doc

* Update Dashboards.md

* docs: dashboard minor changes

spelling changes.
2017-11-09 12:00:49 +00:00
Kevin Krumm
1aa971375c docs: added Ping Only Device (#7687)
* docs: Adding Device - Ping Only Device

* image for adding ping only device

* Update Adding-a-Device.md

* Update Adding-a-Device.md

* Update Adding-a-Device.md
2017-11-08 16:57:23 -06:00
Kevin Krumm
c7430dc970 docs: alert rules update info (#7681)
* docs: testing alert rule link

added link to the device troubleshooting page.

* Update Rules.md

fix link

* Update Testing.md

fix link

* Update Rules.md

removed link - not useful for this part.

* image for alert rules collection

* image for alert rules collection

added image alert rules collection
2017-11-08 13:21:47 -06:00
Kevin Krumm
e7d4716996 docs: Added device-troubleshooting page (#7638)
* docs: create device-troubleshooting page

using the capture debug info page.

* Update device-troubleshooting.md

* capture debug info images

* Update and rename device-troubleshooting.md to Device-Troubleshooting.md

* added Device-Troubleshooting.md

* Update Device-Troubleshooting.md
2017-11-06 21:52:32 +00:00
Kevin Krumm
00470df10e docs: Added WebUI to Validate docs (#7635)
* docs: Validate to the Web UI

* Add files via upload

images for web ui validate.
2017-11-05 20:25:26 +00:00
Kevin Krumm
532bb60052 docs: Added example on how to add Weathermaps to Dashboards (#7636)
* docs: How to add Weathermaps to Dashboards

* image for weathermap dashboard
2017-11-05 20:24:49 +00:00
Kevin Krumm
d4b2f6ee91 docs: Weathermaps minor fix to the steps (#7557)
* docs: Weathermaps minor fix to the steps

minor fix to the steps cut down to 5 steps. and added in example pic.

* network weather map

example network weather map picture

* Update Weathermap.md

added pic to .md

* Delete network-weather-map.PNG

* network weather map example pic

example pic.

* changes to steps

* Update Weathermap.md

added or to user

* Update Weathermap.md

* Update Weathermap.md

* Update Weathermap.md

fixes for grammar and spelling.

* Update Weathermap.md
2017-10-26 21:35:03 +01:00
Kevin Krumm
017e3cd7ca docs: Update network map.md (#7554)
* docs: Update network map.md

* networkmap

network map example picture.

* Update Network-Map.md

added in the example network map picture.

* Update Network-Map.md

* Delete networkmap.PNG

* networkmap

example network map

* Update Network-Map.md

* Update Network-Map.md

* Update Network-Map.md

* Update Network-Map.md
2017-10-26 21:34:36 +01:00
Søren Rosiak
a31eaa9839 docs: Added HipChat V2 WebUI Config Example (#7486) 2017-10-15 21:02:10 +01:00
Neil Lathwood
f1b50737bb Docs refactor (#7389)
* docs: Refactored docs for new layout

* some more changes

* more doc updates

* More doc updates

* small update

* small update
2017-10-02 21:36:22 +01:00
f0o
22f4221df7 Fixed images in docs 2015-10-13 14:27:55 +00:00
RobsanInc
e916145122 Update Varnish Docs 2015-10-12 16:32:56 -04:00