Automation and testing
Simulate faults and notifications
Apply faults to a running agent. Each rule has a stable id and a kind. Replacing the REST rules array replaces all fault rules for that agent and restarts their random streams. An empty rules array clears them. In a scenario, applyFault adds or replaces its named rule and clearFault removes the rule named by faultId.
Kind | Important fields and behavior |
delay | delayMs, optionally maximumDelayMs. Adds one fixed or random-range delay to a response PDU. |
loss | probability from 0 to 1; burstLength defaults to 1. Discards responses after request evaluation. |
error | errorStatus and errorIndex; optional probability, oidPrefix, and numeric pduTypes filters. Returns a modeled SNMP error. |
outage | Positive durationMs. Discards incoming packets before decoding; suppressTraps optionally suppresses notifications. |
reboot | Positive durationMs. Stops transport, clears overrides, and restarts from baseline after the interval. |
{"rules":[
{"id":"slow-response", "kind":"delay", "delayMs":100},
{"id":"intermittent-loss", "kind":"loss",
"probability":0.1, "burstLength":3}
]}
durationMs is optional for delay, loss, and error rules; zero means no automatic expiry. Outage and reboot require a positive duration. Delay and duration values cannot exceed seven days. Rules are evaluated in outage/reboot, loss, error, then delay order. A loss or error decision ends the evaluation of that response. A probability of 0.1 models a 10 percent chance; it does not promise exactly 10 losses out of 100 requests.
Use the same scenario seed, agent IDs, rule IDs, and ordered traffic to reproduce modeled random decisions. Operating-system scheduling, external manager timing, manager retries, scripts that use their own clocks or random generators, and SNMPv3 security bytes can still differ between runs.
To send a named trap or INFORM, define the notification and its destinations in the existing recording/configuration format described later in this guide. Use sendTrap in a scenario or POST to the agent traps resource with {"trapName":"trap1"}. The name must exist in the recording. A locally transmitted UDP trap does not prove the receiver received it; an INFORM acknowledgement provides a stronger delivery check.