Skip to content

Health Status

Understand and monitor the health status of your targets.

Targets can be in one of three health states:

StateIconDescription
OnlineTarget is connected and responding
StaleTarget missed recent heartbeat
OfflineTarget is not connected

A target is Online when:

  • Tarsus agent is running
  • The agent’s connection to Mandible is active
  • Heartbeats are received by Mandible within threshold
┌─────────────────────────────────────────────────────────────┐
│ Target: web-prod-01 │
├─────────────────────────────────────────────────────────────┤
│ │
│ Status: ● Online │
│ Last Seen: Just now │
│ Mode: Listen │
│ Uptime: 5 days, 14 hours │
│ │
│ ✓ Ready to receive deployments │
│ │
└─────────────────────────────────────────────────────────────┘
IndicatorValue
Last seenWithin heartbeat interval
ConnectionActive
DeployableYes

A target becomes Stale when:

  • Heartbeat not received within threshold (default: 90 seconds)
  • Connection may be intermittent
  • Target might be under heavy load
┌─────────────────────────────────────────────────────────────┐
│ Target: web-prod-03 │
├─────────────────────────────────────────────────────────────┤
│ │
│ Status: ◐ Stale │
│ Last Seen: 5 minutes ago │
│ Mode: Listen │
│ │
│ ⚠ Target may be experiencing issues │
│ │
└─────────────────────────────────────────────────────────────┘
IndicatorValue
Last seen> heartbeat threshold
ConnectionUnknown/Intermittent
DeployableYes (with warning)
CauseResolution
Network congestionWait for recovery
High CPU loadInvestigate target performance
Tarsus overloadedCheck Tarsus logs
Firewall issuesVerify connectivity

A target is Offline when:

  • No heartbeat for extended period (default: 5 minutes)
  • Connection is confirmed lost
  • Tarsus agent may not be running
┌─────────────────────────────────────────────────────────────┐
│ Target: worker-01 │
├─────────────────────────────────────────────────────────────┤
│ │
│ Status: ○ Offline │
│ Last Seen: 2 hours ago │
│ Mode: Listen │
│ │
│ ✗ Target is not available for deployments │
│ │
└─────────────────────────────────────────────────────────────┘
IndicatorValue
Last seen> offline threshold
ConnectionDisconnected
DeployableNo
CauseResolution
Server powered offPower on the server
Tarsus not runningStart Tarsus service
Network unreachableFix network connectivity
Certificate expiredRenew certificates
┌─────────────────────────────────────────────────────────────┐
│ Target Health Summary │
├─────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Online │ │ Stale │ │ Offline │ │
│ │ 10 │ │ 1 │ │ 1 │ │
│ │ (83%) │ │ (8%) │ │ (8%) │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
│ │
│ Total Targets: 12 │
│ │
└─────────────────────────────────────────────────────────────┘

Per-target health-alert configuration (notification rules that fire when a specific target changes state) is not yet available (planned — not yet available). Today you monitor health state from the dashboard and target detail views.

View historical health data:

┌─────────────────────────────────────────────────────────────┐
│ Health History: web-prod-03 │
├─────────────────────────────────────────────────────────────┤
│ │
│ ┌───────────────┬──────────┬──────────┬────────────────┐ │
│ │ Time │ From │ To │ Duration │ │
│ ├───────────────┼──────────┼──────────┼────────────────┤ │
│ │ Today 14:30 │ Stale │ Online │ - │ │
│ │ Today 14:25 │ Online │ Stale │ 5 min │ │
│ │ Yesterday │ Offline │ Online │ 2 hours │ │
│ │ 3 days ago │ Online │ Offline │ - │ │
│ └───────────────┴──────────┴──────────┴────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────┘

In both Listen and Poll mode, the Tarsus agent sends heartbeats directly to Mandible, which tracks target liveness and updates the health status. The connection mode only affects how commands are delivered for execution, not how health is tracked.

The stale and offline thresholds below are configured server-side in Thorax’s [session] block (thorax.toml); Tarsus itself does not expose stale/offline threshold settings.

In Listen mode, Tarsus sends heartbeats to Mandible while a Thorax instance connects inbound to deliver commands:

SettingDefaultDescription
Heartbeat interval30 secondsHow often Tarsus reports to Mandible
Stale threshold90 secondsWhen to mark stale (heartbeat_timeout_secs)
Offline threshold5 minutesWhen to mark offline (stale_timeout_secs)

In Poll mode, Tarsus also heartbeats directly to Mandible, separately from polling its assigned Thorax for commands:

SettingDefaultDescription
Heartbeat interval30 secondsHow often Tarsus reports to Mandible
Stale threshold90 secondsWhen to mark stale (heartbeat_timeout_secs)
Offline threshold5 minutesWhen to mark offline (stale_timeout_secs)

Mantis performs automatic health checks:

CheckDescriptionFrequency
ConnectivityTCP connection testPer heartbeat
TLSCertificate validationPer connection
ResponseResponse timePer heartbeat

Define custom health checks in actions:

health-check.sh
#!/bin/bash
# Check application is running
if ! pgrep -x "myapp" > /dev/null; then
echo "Application not running"
exit 1
fi
# Check port is listening
if ! nc -z localhost 8080; then
echo "Port 8080 not listening"
exit 1
fi
# Check disk space
DISK_USAGE=$(df -h / | awk 'NR==2 {print $5}' | tr -d '%')
if [ "$DISK_USAGE" -gt 90 ]; then
echo "Disk usage critical: ${DISK_USAGE}%"
exit 1
fi
echo "All health checks passed"
exit 0
Target StateDeployment Action
OnlineProceeds normally
StaleWarning shown, user decides
OfflineSkipped or blocked

Configuring Deployment Health Requirements

Section titled “Configuring Deployment Health Requirements”
┌─────────────────────────────────────────────────────────────┐
│ Deployment Health Settings │
├─────────────────────────────────────────────────────────────┤
│ │
│ Include targets with status: │
│ [✓] Online │
│ [ ] Stale - deployment may fail │
│ [ ] Offline - will definitely fail │
│ │
│ [ ] Wait for stale targets to recover (timeout: 5 min) │
│ │
└─────────────────────────────────────────────────────────────┘

Symptoms:

  • Target shows Stale for extended periods
  • Never transitions to Offline or Online

Diagnosis:

  1. Check network latency
  2. Verify Tarsus logs
  3. Check system resources

Resolution:

  • Restart Tarsus if needed
  • Fix network issues
  • Increase heartbeat thresholds if appropriate

Symptoms:

  • Target flaps between Online and Stale
  • Health history shows many transitions

Diagnosis:

  1. Check network stability
  2. Look for resource contention
  3. Review system logs

Resolution:

  • Fix underlying network issues
  • Increase threshold values
  • Investigate root cause

Symptoms:

  • Target remains Offline
  • Tarsus appears to be running

Diagnosis:

  1. Verify Tarsus is listening (Listen mode)
  2. Check firewall rules
  3. Validate certificates
  4. Test network connectivity

Resolution:

Terminal window
# Check Tarsus status
systemctl status tarsus
# Test connectivity (Listen mode)
nc -zv target-hostname 9342
# Check certificates
openssl s_client -connect target-hostname:9342
# View Tarsus logs
journalctl -u tarsus -f
  • Review dashboard regularly
  • Set up alerts for offline targets
  • Investigate stale targets promptly
EnvironmentStale ThresholdOffline Threshold
Low-latency60 seconds3 minutes
Standard90 seconds5 minutes
High-latency5 minutes15 minutes

Track and document recurring health issues:

TargetIssueFrequencyResolution
web-03Network flappingWeeklyISP issue
db-01High load staleMonthlyScale resources
  • Have procedures for offline targets
  • Don’t deploy to offline targets in production
  • Investigate offline targets before deploying