Docs refactor (#7389)

* docs: Refactored docs for new layout

* some more changes

* more doc updates

* More doc updates

* small update

* small update
This commit is contained in:
Neil Lathwood
2017-10-02 21:36:22 +01:00
committed by GitHub
co-authored by GitHub
parent 738067e622
commit f1b50737bb
28 changed files with 266 additions and 361 deletions
-6
View File
@@ -61,9 +61,3 @@ Alert when:
## Procedure
You can associate a rule to a procedure by giving the URL of the procedure when creating the rule. Only links like "http://" are supported, otherwise an error will be returned. Once configured, procedure can be opened from the Alert widget through the "Open" button, which can be shown/hidden from the widget configuration box.
## Testing alerts
You can test your transports by forcing an actual active alert to run regardless of the interval or delay values.
`./scripts/test-alert.php`. This script accepts -r for the rule id, -h for the device id or hostname and -d for debug.
-12
View File
@@ -58,18 +58,6 @@ Limit: %value.sensor_limit_low / %value.sensor_limit
The Default Template is a 'one-size-fit-all'. We highly recommend defining your own templates for your rules to include more specific information.
## Testing
It's possible to test your new template before assigning it to a rule. To do so you can run `./scripts/test-template.php`. The script will provide the help
info when ran without any parameters.
As an example, if you wanted to test template ID 10 against localhost running rule ID 2 then you would run:
`./scripts/test-template.php -t 10 -d -h localhost -r 2`
If the rule is currently alerting for localhost then you will get the full template as expected to see on email, if it's not then you will just see the
template without any fault information.
## Examples
Default Template:
+31
View File
@@ -0,0 +1,31 @@
source: Alerting/Testing.md
### Rules
The simplest way of testing if an alert rule will match a device is by going to the device, clicking edit (the cog),
select Capture. From this new screen choose Alerts and click run.
The output will cycle through all alerts applicable to this device and show you the Rule name, rule,
MySQL query and if the rule matches.
---
### Transports
You can test your transports by forcing an actual active alert to run regardless of the interval or delay values.
`./scripts/test-alert.php`. This script accepts -r for the rule id, -h for the device id or hostname and -d for debug.
---
### Templates
It's possible to test your new template before assigning it to a rule. To do so you can run `./scripts/test-template.php`. The script will provide the help
info when ran without any parameters.
As an example, if you wanted to test template ID 10 against localhost running rule ID 2 then you would run:
`./scripts/test-template.php -t 10 -d -h localhost -r 2`
If the rule is currently alerting for localhost then you will get the full template as expected to see on email, if it's not then you will just see the
template without any fault information.