Package icon

Noundry.Sentinel.Cli 1.0.0

by Noundry

Sentinel CLI

A beautiful terminal-based dashboard (TUI) for Noundry Sentinel APM, inspired by btop.

Installation

Install the Sentinel CLI as a global .NET tool:

dotnet tool install -g Noundry.Sentinel.Cli

Or update to the latest version:

dotnet tool update -g Noundry.Sentinel.Cli

Configuration

Before using the CLI, configure your API key and tenant name:

# Set your API key
sentinel config set-key sk_live_xxxxxxxxxxxx

# Set your tenant name (subdomain)
sentinel config set-tenant mycompany

# (Optional) Set custom API host for self-hosted instances
sentinel config set-host https://api.sentinel.local

View current configuration:

sentinel config

Configuration is stored in ~/.sentinel/config.json.

Commands

Interactive Dashboard

Launch the btop-style interactive dashboard:

sentinel                    # Default command
sentinel dashboard          # Explicit command
sentinel dashboard -r 10    # Custom refresh interval (10 seconds)

Dashboard Features:

  • Real-time application status (online/offline)
  • Metrics overview (batches, logs, errors, warnings)
  • Recent logs with color-coded levels
  • Quota usage
  • Auto-refresh every 5 seconds (configurable)

Press Q or Escape to quit.

Search and view logs:

# Search logs
sentinel logs "connection error"
sentinel logs --level Error
sentinel logs --level Error --time 24h
sentinel logs --app 1 --source "MyService"

# Full options
sentinel logs search "query" \
  --level Error \
  --app 1 \
  --source "Controller" \
  --time 24h \
  --page 1 \
  --size 100

Time Range Options: 15m, 1h, 6h, 24h, 7d, 30d

Log Tail (Live)

Stream logs in real-time:

sentinel logs tail
sentinel logs tail --level Error
sentinel logs tail --app 1

Press Ctrl+C to stop.

Log Detail

View full details of a specific log entry:

sentinel logs show 12345

Applications

List all applications:

sentinel apps

View application details with metrics:

sentinel apps 1              # Show app ID 1
sentinel apps 1 --time 24h   # With 24h statistics

Output includes:

  • Application info (name, version, environment, hostname)
  • Performance statistics (CPU, memory, GC, threads)
  • CPU and memory sparkline charts
  • Metric counts

Exceptions

Search and view exceptions:

sentinel exceptions
sentinel exceptions "NullReference"
sentinel exceptions --severity Critical
sentinel exceptions --severity Error --time 7d
sentinel exceptions --app 1 --resolved

Options:

  • --severity: Info, Warning, Error, Critical
  • --time: Time range (default: 24h)
  • --resolved: Include resolved exceptions
  • --app: Filter by application ID

TUI Color Scheme

The CLI uses a carefully designed color palette inspired by btop:

Element Color
Headers, Borders Cyan
Success, Online Green
Warnings Yellow
Errors, Offline Red
Critical Magenta
Secondary text Grey
Highlights Yellow

Log Level Colors

Level Color Short
Trace Grey TRC
Debug Blue DBG
Information Green INF
Warning Yellow WRN
Error Red ERR
Critical Magenta CRT

API Endpoints Used

The CLI uses the Query API endpoints:

Endpoint Description
GET /api/query/stats Dashboard statistics
GET /api/query/applications List applications
GET /api/query/applications/{id} Application detail
GET /api/query/applications/{id}/snapshots System snapshots
GET /api/query/logs Search logs
GET /api/query/logs/{id} Single log entry
GET /api/query/logs/recent Recent logs for tail
GET /api/query/exceptions Search exceptions

Examples

Monitor Production Errors

# Watch production errors in real-time
sentinel logs tail --level Error

# Search for specific error patterns
sentinel logs "timeout" --level Error --time 1h

Check Application Health

# List all apps with status
sentinel apps

# Deep dive into specific app
sentinel apps 1 --time 24h

Investigate Exceptions

# View unresolved exceptions
sentinel exceptions --severity Critical

# Search for specific exception type
sentinel exceptions "NullReferenceException" --time 7d

Quick Dashboard Check

# Launch dashboard with fast refresh
sentinel -r 2

Troubleshooting

"Sentinel CLI is not configured"

Run the configuration commands:

sentinel config set-key YOUR_API_KEY
sentinel config set-tenant YOUR_TENANT_NAME

"API request failed"

  1. Check your API key is valid
  2. Verify the tenant name matches your Sentinel tenant
  3. Ensure you have network connectivity to the API host
  4. Check if the API host is correct: sentinel config

Reset Configuration

sentinel config clear

Building from Source

cd src/Noundry.Sentinel.Cli
dotnet build
dotnet run -- dashboard

Pack as NuGet Tool

dotnet pack -c Release
dotnet tool install --global --add-source ./bin/Release Noundry.Sentinel.Cli

This package has no dependencies.

Version Downloads Last Updated
1.0.0 Current 0 1/8/2026

Info

Statistics

Total Downloads
0
Current Version Downloads
0

Authors

Noundry