Loading...
Loading...
Core Oodle CLI usage — auth, output formats, time flags, file input, and common patterns for all oodle commands.
npx skill4agent add oodle-ai/agent-skills oodle-clioodle# Install via Homebrew (macOS / Linux)
brew install oodle-ai/oodle/oodle
# Or via Go (any platform with Go 1.21+)
go install github.com/oodle-ai/oodle-cli@latest
# Configure auth (interactive — writes ~/.oodle/config.yaml)
oodle configure
# Or set env vars (preferred for CI / containers)
export OODLE_API_KEY=<your-api-key>
export OODLE_INSTANCE=<your-instance-id>
export OODLE_DEPLOYMENT=<your-deployment-url> # e.g. https://app.oodle.aioodle version
oodle monitors list -o json | headoodle <resource> list -o jsondeleteget| Command | Purpose |
|---|---|
| Manage metric monitors |
| Manage dashboards |
| Manage dashboard folders |
| Manage notification channels |
| Manage routing of alerts to notifiers |
| Silence alerts during maintenance |
| Run PromQL instant query |
| Run PromQL range query |
| List available log index patterns |
| Search logs using OpenSearch Query DSL |
| Query metric names, labels, label values |
| Search and fetch traces |
| Manage log-derived metric rules |
| Manage HTTP/TCP synthetic checks |
| Manage metric drop / sample rules |
| Manage API keys |
| Manage users |
| Interactive auth setup |
| Install and manage agent skills (this repo) |
-otablejson# ✅ CORRECT — JSON for scripting; jq can parse it
oodle monitors list -o json | jq '.[].id'
# ✅ CORRECT — table for humans skimming a list
oodle monitors list -o table
# ✅ CORRECT — yaml when round-tripping into a `-f` input file
oodle monitors get mon_123 -o yaml > monitor.yaml
# ✅ CORRECT — csv for spreadsheets / quick grep
oodle metrics list --match http_ -o csv
# ❌ WRONG — parsing the default table format with awk/grep is fragile
oodle monitors list | awk '{print $1}'# ✅ CORRECT — --force skips destructive-action confirmation in CI
oodle monitors delete mon_123 --force
# ❌ WRONG — running a destructive command without --force in a non-TTY pipeline
oodle monitors delete mon_123# ✅ CORRECT — retry transient 5xx / network errors up to 3 times
oodle monitors list -o json --retries 3
# ❌ WRONG — wrapping the command in a custom shell loop instead of using --retries
until oodle monitors list -o json; do sleep 5; done--from--to| Format | Example | Meaning |
|---|---|---|
| Epoch seconds | | absolute unix timestamp |
| | current server time |
| Relative duration | | now minus the duration |
# ✅ CORRECT — relative duration is timezone-safe and readable
oodle traces list --service api --from -1h --to now -o json
# ✅ CORRECT — epoch when the caller has an exact timestamp
oodle traces list --service api --from 1731628800 --to 1731632400 -o json
# ❌ WRONG — human strings are not parsed
oodle traces list --service api --from "1 hour ago"-fcreateupdate-f <file># ✅ CORRECT — JSON file
oodle monitors create -f monitor.json
# ✅ CORRECT — YAML file
oodle monitors create -f monitor.yaml
# ✅ CORRECT — round-trip through yaml for in-place edits
oodle monitors get mon_123 -o yaml > monitor.yaml
$EDITOR monitor.yaml
oodle monitors update mon_123 -f monitor.yaml
# ❌ WRONG — passing JSON inline as a flag value (no -f)
oodle monitors create --body '{"name":"x"}'-o jsonjqoodle# ✅ CORRECT
ID=$(oodle monitors list -o json | jq -r '.[] | select(.name=="High CPU") | .id')
# ❌ WRONG — column positions in table output can change between releases
ID=$(oodle monitors list | grep "High CPU" | awk '{print $1}')--force--forceget# ✅ CORRECT — in CI: confirm the resource exists, then delete
oodle monitors get mon_123 -o json > /dev/null && oodle monitors delete mon_123 --force
# ❌ WRONG — blanket --force on a name match without verifying the ID
oodle monitors delete $(oodle monitors list | grep CPU | head -1 | awk '{print $1}') --force# ✅ CORRECT — credentials come from the CI secret store
export OODLE_API_KEY="$CI_OODLE_API_KEY"
export OODLE_INSTANCE="$CI_OODLE_INSTANCE"
oodle monitors list -o json
# ❌ WRONG — credential in plain text on the command line
OODLE_API_KEY=sk_live_abc123 oodle monitors list -o json# ✅ CORRECT
ID=$(oodle monitors list -o json | jq -r '.[] | select(.name=="High CPU") | .id')
oodle monitors get "$ID" -o json
oodle monitors update "$ID" -f monitor.json
# ❌ WRONG — re-resolving the name on every step (race conditions, extra latency)
oodle monitors get $(oodle monitors list -o json | jq -r '.[] | select(.name=="High CPU") | .id')
oodle monitors update $(oodle monitors list -o json | jq -r '.[] | select(.name=="High CPU") | .id') -f monitor.json| Error | Cause | Fix |
|---|---|---|
| 401 Unauthorized | Invalid or missing API key | Run |
| 404 Not Found | Resource ID does not exist | Verify with |
| connection refused | Wrong | Check |
| 429 Too Many Requests | Rate limited | Add |
| CLI version too old | Upgrade with |
| File is not valid JSON/YAML | Validate with |