Agent skill
dagster-remote
Manage remote Dagster server on dns-analy4 - start, stop, restart, check status, sync code, and view logs. Use when user wants to manage the remote Dagster deployment.
Install this agent skill to your Project
npx add-skill https://github.com/goodluckz/claude-code-config/tree/main/skills/dagster-remote
SKILL.md
Remote Dagster Server Manager
Manage the Dagster pipeline server running on dns-analy4 for the scan-analysis-prod project.
Environment
| Property | Value |
|---|---|
| Remote Host | dns-analy4 |
| Project Dir | /home/zhaoliang/Projects/scan-analysis-prod |
| Local Project | /Users/zhaoliang/Projects/scan-analysis-prod |
| Dagster Port | 3000 |
| Arkime Port | 8042 (direct localhost on dns-analy4) |
| DAGSTER_HOME | .dagster_home_remote |
| Config | .env.remote → .env |
| tmux Session | dagster |
| Startup Script | scripts/dagster-remote.sh |
| Setup Script | scripts/setup-remote.sh (run from local) |
Operations
Check Status
# Check if tmux session exists and services are running
ssh dns-analy4 "tmux has-session -t dagster 2>&1 && echo 'tmux: running' || echo 'tmux: not running'"
# View recent log output
ssh dns-analy4 "tmux capture-pane -t dagster -p | tail -20"
# Check processes directly
ssh dns-analy4 "pgrep -fa 'dagster' | grep -v grep"
Start Server
# Start in tmux (recommended)
ssh dns-analy4 "cd /home/zhaoliang/Projects/scan-analysis-prod && tmux new-session -d -s dagster 'bash scripts/dagster-remote.sh'"
Stop Server
# Send Ctrl-C to tmux session (graceful shutdown)
ssh dns-analy4 "tmux send-keys -t dagster C-c"
# Or kill the tmux session
ssh dns-analy4 "tmux kill-session -t dagster"
# Force kill if needed
ssh dns-analy4 "pkill -f 'dagster-webserver|dagster-daemon'"
Restart Server
# Kill existing session, then start fresh
ssh dns-analy4 "tmux kill-session -t dagster 2>/dev/null; cd /home/zhaoliang/Projects/scan-analysis-prod && tmux new-session -d -s dagster 'bash scripts/dagster-remote.sh'"
Sync Code (Local → Remote)
Run the setup script from local machine to sync code and dependencies:
bash scripts/setup-remote.sh
This script:
- Installs/updates
uvon dns-analy4 - Rsyncs project files (excludes
.venv, data, results,.git) - Runs
uv syncfor dependencies - Copies
.env.remoteand symlinks as.env - Copies GeoIP database if missing
- Initializes
DAGSTER_HOME
After syncing, restart the server to pick up code changes.
Sync Results (Remote → Local)
# Sync results (figures, tables)
rsync -avz dns-analy4:/home/zhaoliang/Projects/scan-analysis-prod/result/ ./result/
# Sync partitioned data
rsync -avz dns-analy4:/home/zhaoliang/Projects/scan-analysis-prod/data/partitions/ ./data/partitions/
# Sync non-partitioned assets
rsync -avz dns-analy4:/home/zhaoliang/Projects/scan-analysis-prod/data/assets/ ./data/assets/
Access Dagster UI from Local
# SSH tunnel for web UI
ssh -L 3000:localhost:3000 dns-analy4
# Then open http://localhost:3000
View Logs
# Live tmux output
ssh dns-analy4 "tmux capture-pane -t dagster -p -S -100"
# Check active/queued runs
ssh dns-analy4 "cd /home/zhaoliang/Projects/scan-analysis-prod && ~/.local/bin/uv run dagster run list -m awsntpdagster.definitions --limit 5"
Configuration
Dagster Config (config/prod.yaml → DAGSTER_HOME/dagster.yaml)
Key settings:
run_queue.max_concurrent_runs: 10concurrency.default_op_concurrency_limit: 10run_retries.enabled: true (max 2 retries)
Environment Variables (.env.remote)
ENVIRONMENT=remoteARKIME_PORT=8042DAGSTER_WEBSERVER_PORT=3000SKIP_EXTRACTION=0(queries Arkime directly)GEOIP_ASN_DB_PATHpoints to local copy on dns-analy4
Troubleshooting
tmux "no server running"
The tmux server isn't running. Just start a new session:
ssh dns-analy4 "cd /home/zhaoliang/Projects/scan-analysis-prod && tmux new-session -d -s dagster 'bash scripts/dagster-remote.sh'"
"uv not found" in dagster-remote.sh
The script adds ~/.local/bin to PATH. If uv was installed elsewhere, check:
ssh dns-analy4 "which uv"
Database Lock Error
If daemon and webserver both try to access SQLite simultaneously, the startup script has a 5-second delay between daemon and webserver starts. If it persists, restart.
Redis Unavailable Warning
Expected — Redis is not installed on dns-analy4. The pipeline runs without caching (direct Arkime requests each time). This is a warning, not an error.
Port Already in Use
ssh dns-analy4 "lsof -i :3000"
# Kill stale process if needed
ssh dns-analy4 "pkill -f 'dagster-webserver'"
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
amend-staged
Amend the last commit with staged changes only
test00-check
Check test00 honeynet production server status - pcap files, tcpdump processes, containers, and Google Drive sync. Use when user wants to check test00 data or server health.
commit-staged
Git commit commands for staged-only commits
git-submodule
Add a directory as a git submodule with its own remote repository. Use when user wants to track a directory with separate git history.
arkime-tag-manager
Manage Arkime session tags (add/remove) using API
arkime-data-manager
Manage Arkime data (wipe database, import PCAPs)
Didn't find tool you were looking for?