mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* clean up all but header incrementing in Creating-Transport.md * make Device-Dependencies.md mdl happy * make Entities.md as mdl happy as possible... one long table line left * make mdl as happy as possible for index.md * clean up Introduction.md as much as possible * minor formatting cleanup... move each icon onto its own row * make ack and notes the same style * clean Macros.md up * clean Rules.md up as much as possible * tweak one line a bit to get it to format a bit nicer * a bit more format tweaking, making sure it does not sure with > * clean up as much as possible for Templates.md * make Testing.md as mdl happy as possibly * clean Transports.md up as much as possible * clean as many issues as possible for Alerts.md * clean up as much of ARP.md as possible * clean up as much as possible for Bills.md * make DeviceGroups.md as mdl happy as possible * cleanup Devices.md * make as mdl happy as possible Inventory.md and index.md * mdl cleanup for Logs.md and PortGroups.md * make Ports.md and Routing.md as happy as possible * clean up Services.md, Switching.md, and Systems.md as much as possible * more markup cleanup * lots more md cleanup udner Devloping/ * reapply bits from #10343 that accidentally got removed when merging
41 lines
1.3 KiB
Markdown
41 lines
1.3 KiB
Markdown
source: Alerting/Testing.md
|
|
path: blob/master/doc/
|
|
|
|
### 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.
|
|
|
|
See [Device Troubleshooting](../Support/Device-Troubleshooting.md)
|
|
|
|
---
|
|
|
|
### 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.
|