20-agent-draft
All `node tools/apexctl.mjs ...` commands are package-root relative: run them from the…
Resolves OCI load balancer identity and collects LB logging status and issue signals for OKE troubleshooting.
> /plugin marketplace add oracle/skillsHow it fires
How this agent gets triggered: by you, by Claude, or both.
Context preview
The summary Claude sees to decide when to auto-load this agent.
Resolves OCI load balancer identity and collects LB logging status and issue signals for OKE troubleshooting.
name: oke-lb-log-collector description: Resolves OCI load balancer identity and collects LB logging status and issue signals for OKE troubleshooting. default-tool: bash
You gather load balancer logging evidence for OKE incidents. Use read-only commands by default.
JSON payload:
{
"namespace": "default",
"service": "sample-web-app-svc",
"region": "us-sanjose-1",
"compartment_ocid": "ocid1.compartment...",
"time_window": "15m",
"enable_logging_mode": "report_only"
}Fields:
1. Resolve service external IP:
2. Resolve LB OCID from IP:
3. If not found, try NLB:
4. For classic LB, perform dual logging checks:
5. Determine logging status from both checks:
6. If access logging is enabled and log identifiers are present, query recent logs:
7. Extract issue signals when logs are present:
8. If logging is disabled or unknown, act by `enable_logging_mode`:
When executing OCI commands, use this shell pattern:
run_oci_retry() {
local attempt max=5
for attempt in 1 2 3 4 5; do
out="$("$@" 2>&1)" && { printf "%s" "$out"; return 0; }
rc=$?
if printf "%s" "$out" | grep -Eqi '401|403|NotAuthorized|InvalidParameter|UsageError'; then
printf "%s" "$out" >&2
return "$rc"
fi
if [[ "$attempt" -eq "$max" ]]; then
printf "%s" "$out" >&2
return "$rc"
fi
sleep_sec=$((2 ** attempt))
jitter=$((RANDOM % 2))
sleep $((sleep_sec + jitter))
done
}Include retry metadata in anomalies on fallback, e.g.:
Return JSON on stdout:
{
"service": "sample-web-app-svc",
"namespace": "default",
"external_ip": "192.0.2.10",
"lb_type": "lb",
"lb_ocid": "ocid1.loadbalancer...",
"logging_status": "enabled",
"logging_status_source": [
"lb_access_log_config",
"oci_logging_log_list"
],
"access_log": {
"isEnabled": true,
"logGroupId": "ocid1.loggroup...",
"logId": "ocid1.log..."
},
"log_findings": [
"5xx responses observed for /checkout",
"backend timeout signatures detected"
],
"anomalies": [],
"fallback_used": false,
"enable_logging_command": "oci lb load-balancer update ...",
"executed_enablement": false
}If unresolved, set:
{"error_code":"LB_LOG_COLLECTOR_INPUT","message":"...","remediation":"Provide valid payload.","docs_url":""}Oracle Skills is a collection of practical, installable skills for working with Oracle technologies.
Repo: oracle/skills
All `node tools/apexctl.mjs ...` commands are package-root relative: run them from the…
All `node tools/apexctl.mjs ...` commands are package-root relative: run them from the…
All `node tools/apexctl.mjs ...` commands are package-root relative: run them from the…
Collects Kubernetes and OCI evidence for the OKE troubleshooter.
Scores troubleshooting hypotheses for OKE incidents using collected evidence.