Managing Targets
This guide covers day-to-day target management operations in Mantis.
Viewing Targets
Section titled “Viewing Targets”Target List
Section titled “Target List”Navigate to Targets in the sidebar to see all registered targets:
┌─────────────────────────────────────────────────────────┐│ Targets [New Target] │├─────────────────────────────────────────────┬───────────┤│ Filter: [All ▼] Search: [ ] │ 12 total │├─────────────────────────────────────────────┴───────────┤│ ││ ┌─────────────────┬────────┬──────────┬────────────┐ ││ │ Name │ Status │ Mode │ Last Seen │ ││ ├─────────────────┼────────┼──────────┼────────────┤ ││ │ web-prod-01 │ ● Online│ Listen │ Just now │ ││ │ web-prod-02 │ ● Online│ Listen │ 2 min ago │ ││ │ web-prod-03 │ ◐ Stale │ Listen │ 15 min ago │ ││ │ db-prod-01 │ ● Online│ Poll │ 30 sec ago │ ││ │ worker-01 │ ○ Offline│ Listen │ 2 hours ago│ ││ └─────────────────┴────────┴──────────┴────────────┘ ││ │└─────────────────────────────────────────────────────────┘Filtering
Section titled “Filtering”Filter targets by:
| Filter | Options |
|---|---|
| Status | All, Online, Stale, Offline |
Search
Section titled “Search”Search by:
- Target name
- Hostname
Target Details
Section titled “Target Details”Click a target to view details:
┌─────────────────────────────────────────────────────────┐│ Target: web-prod-01 │├─────────────────────────────────────────────────────────┤│ ││ Status: ● Online ││ Mode: Listen ││ Hostname: web-prod-01.company.com ││ Port: 9342 ││ Last Seen: Just now ││ ││ ───────────────────────────────────────────────────── ││ ││ (No environment section — environment membership is ││ managed on the environment's own Targets tab, ││ /environments/{id}/targets, not here.) ││ ││ Tags: ││ role: web ││ region: us-east-1 ││ tier: frontend ││ ││ ───────────────────────────────────────────────────── ││ ││ [Edit] [Delete] ││ │└─────────────────────────────────────────────────────────┘Creating Targets
Section titled “Creating Targets”Targets are typically created automatically when Tarsus agents register. To create manually:
Manual Creation
Section titled “Manual Creation”- Click New Target
- Enter target details:
┌─────────────────────────────────────────────────────────┐│ Create Target │├─────────────────────────────────────────────────────────┤│ ││ Name: [web-staging-01 ] ││ Hostname: [web-staging-01.company.com ] ││ Port: [9342 ] ││ ││ Mode: ● Listen ○ Poll ││ ││ [Cancel] [Create] │└─────────────────────────────────────────────────────────┘From Registration
Section titled “From Registration”When a Tarsus agent registers:
- Check Registrations page
- Review pending registrations
- Click Approve. This marks the registration approved; the target is created on the agent’s next registration, not by the click itself.
Editing Targets
Section titled “Editing Targets”Editable Properties
Section titled “Editable Properties”| Property | Can Edit | Notes |
|---|---|---|
| Name | Yes | Display name (not enforced unique) |
| Hostname | Yes | Update if IP changes |
| Port | Yes | Match Tarsus config |
| Mode | Yes | May require Tarsus restart |
Update Process
Section titled “Update Process”- Open target details
- Click Edit
- Modify properties
- Click Save
Environment Assignment
Section titled “Environment Assignment”Adding to Environment
Section titled “Adding to Environment”- Open target details
- Or open environment details
- Click Add to Environment
- Select environment
- Set priority
- Save
┌─────────────────────────────────────────────────────────┐│ Add to Environment │├─────────────────────────────────────────────────────────┤│ ││ Target: web-staging-01 ││ ││ Environment: [Staging ▼] ││ Priority: [1 ] ││ ││ ┌───────────────────────────────────────────────────┐ ││ │ Priority determines deployment order. │ ││ │ Higher values deploy first. │ ││ └───────────────────────────────────────────────────┘ ││ ││ [Cancel] [Add] │└─────────────────────────────────────────────────────────┘Removing from Environment
Section titled “Removing from Environment”- Open target or environment details
- Click Remove next to the assignment
- Confirm removal
Priority Management
Section titled “Priority Management”Higher priority values deploy first (range -100 to 100, default 50):
| Target | Priority | Order |
|---|---|---|
| db-01 | 100 | First |
| web-01 | 50 | After db-01 |
| web-02 | 50 | After db-01 (tied) |
| web-03 | 10 | Last |
Tag Management
Section titled “Tag Management”Adding Tags
Section titled “Adding Tags”- Open the target detail page
- Click Attach Tags
- Select one or more existing tags from the list
- Click Attach
New tags must first be created on the Tags page.
Common Tag Patterns
Section titled “Common Tag Patterns”| Key | Example Values | Purpose |
|---|---|---|
role | web, api, worker, db | Server role |
region | us-east, eu-west | Geographic location |
tier | frontend, backend | Application tier |
team | platform, payments | Owning team |
environment | production, staging | Legacy env tracking |
Deleting Targets
Section titled “Deleting Targets”Delete
Section titled “Delete”Permanently removes the target:
- Open target details
- Click Delete
- Confirm deletion
Deleted targets:
- Are removed from all environments
- No longer receive deployments
What Happens to the Agent
Section titled “What Happens to the Agent”After target deletion:
- Tarsus agent continues running.
- The agent re-registers on restart. Because the approved
client_registrationhas no FK to the target, it survives the delete, so the agent re-registers as already-approved and the target is recreated immediately — it does not return to pending. Revoke the registration if you want it gone for good.
Monitoring Target Health
Section titled “Monitoring Target Health”Health Dashboard
Section titled “Health Dashboard”The dashboard shows overall health:
┌─────────────────────────────────────────────────────────┐│ Target Health │├─────────────────────────────────────────────────────────┤│ ││ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ││ │ Online │ │ Stale │ │ Offline │ ││ │ 10 │ │ 1 │ │ 1 │ ││ │ (83%) │ │ (8%) │ │ (8%) │ ││ └─────────────┘ └─────────────┘ └─────────────┘ ││ │└─────────────────────────────────────────────────────────┘Status Transitions
Section titled “Status Transitions”Troubleshooting
Section titled “Troubleshooting”Target Shows Offline
Section titled “Target Shows Offline”- Check Tarsus agent is running on the machine
- Verify network connectivity
- Check firewall rules
- Review Tarsus logs
Target Shows Stale
Section titled “Target Shows Stale”- Usually temporary during network issues
- Will return to Online when heartbeat received
- If persistent, investigate network path
Cannot Delete Target
Section titled “Cannot Delete Target”Cause: Insufficient permission (targets:delete) or wrong tenant scope — an
active deployment does not block deletion (every FK to targets is
ON DELETE CASCADE/SET NULL).
Solution: Use a token with targets:delete scoped to the target’s tenant.
Tags Not Saving
Section titled “Tags Not Saving”Cause: There is no character/case validation (keys/values are validated
only for length 1–255). A save failure is instead a 404 (the tag or target is
not adopted by the caller’s tenant) or a 403 (missing targets:update).
Solution: Confirm the tag and target belong to your tenant and that your token
has targets:update.
Best Practices
Section titled “Best Practices”1. Consistent Naming
Section titled “1. Consistent Naming”Use a naming convention:
{role}-{environment}-{number}web-prod-01db-staging-01worker-dev-012. Tag Everything
Section titled “2. Tag Everything”Apply tags systematically for filtering:
role: webregion: us-east-1team: platformtier: frontend3. Regular Health Checks
Section titled “3. Regular Health Checks”Monitor target health:
- Review offline targets daily
- Investigate stale targets
- Clean up unused targets
4. Document Environment Assignments
Section titled “4. Document Environment Assignments”Track which targets belong where:
| Target | Development | Staging | Production |
|---|---|---|---|
| web-01 | - | - | Priority 1 |
| web-02 | - | - | Priority 2 |
| web-staging | - | Priority 1 | - |
| web-dev | Priority 1 | - | - |
Next Steps
Section titled “Next Steps”- Listen vs Poll Mode - Connection modes
- Health Status - Understanding target health
- Tagging - Tag strategies
- Overview - Return to targets overview
