ARMARA Course 03

Course 03 / Module 06

TRACK B: react instead of poll

Create one bounded internal-event trigger with shell-correct JSON, verify its row, and restore the empty inventory.

Level
Intermediate
Time
16 minutes
Commands
4
Finish
A bounded trigger round trip

Video / coming soon

The written lesson is complete now.

Quote native JSON for your shell

The same pattern needs backslash-escaped inner quotes in Windows PowerShell on this system. Both forms are shown at the creation beat.

PowerShell
armaraos trigger create <UUID> '{\"agent_spawned\":{\"name_pattern\":\"*\"}}' --prompt 'Course event: {{event}}' --max-fires 1
01

Place the third automation mechanism

MechanismIt starts when
CronA clock reaches the schedule.
WebhookA registered callback mechanism sends or receives HTTP according to its verified contract.
TriggerAn event occurs inside ArmaraOS.
02

Inventory globally and by owner

Run in your terminal
armaraos trigger list
Run in your terminal
armaraos trigger list --agent-id <UUID>

This family has no JSON flag. The filtered form requires the owner UUID.

03

Choose the Track B fork

Track A may stop here.

Later courses do not require creating this trigger. Continue only if inline JSON and internal event automation are useful to you.

04

Read the unlimited default

Real trigger create help showing owner UUID, prompt template, and max-fires default zero
Fresh live help / zero means unlimited

The default prompt uses {{event}}. A max of zero means unlimited. Your first trigger always gets a small explicit positive limit.

05

Create with shell-correct JSON

Run in your terminal
armaraos trigger create <UUID> '{\"agent_spawned\":{\"name_pattern\":\"*\"}}' --prompt 'Course event: {{{{event}}}}' --max-fires 1

The JSON meaning is identical. The native argument quoting differs. A parse error may be your shell changing the string before ArmaraOS receives it.

06

Verify the bounded row

Real created trigger row with owner UUID, enabled true, zero fires, and agent-spawned pattern
Fresh live output / max fires bounded at creation

The course did not spawn another agent merely to make the trigger fire. Zero fires is the expected safe observation.

07

Delete the exact trigger

Run in your terminal
armaraos trigger delete <TRIGGER_ID>
Run in your terminal
armaraos trigger list
Real trigger deletion followed by an empty inventory
Fresh live output / empty inventory restored

Check it / prove cleanup

Explain the bounded default.

Run in your terminal
armaraos trigger list

Confirm the course trigger is absent and explain why max fires 1 is safer than the default 0.

Safety note

An unlimited trigger on a frequent internal event is an unbounded spending loop. Set a small max during first verification, then delete the exact trigger when finished.

Troubleshooting for this sitting
What you seeLikely causeWhat to do
JSON key must be a stringPowerShell removed inner quotes.Use the escaped Windows form.
Lifecycle pattern is invalidThat example is rejected here.Use the verified agent-spawned pattern.
Trigger is unlimitedMax was omitted or zero.Delete and recreate with a small positive value.
Filter shows nothingThe owner UUID differs.List globally and match the owner.

Back to Module 3.5

Next / Module 3.7

Which one do I reach for?

Lesson ready