원클릭으로
grafana-analyze
Analyze a Grafana dashboard URL for a specific concern (IO, CPU, memory, network, etc.)
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Analyze a Grafana dashboard URL for a specific concern (IO, CPU, memory, network, etc.)
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
Add or remove movies/shows from a named Plex collection — search library by title, resolve ratingKey, PUT into collection by name
Find a good torrent for a specific movie and add it to Radarr — search releases, evaluate seeds/quality, confirm with user, grab
Find a good torrent for a specific TV series/season and add it to Sonarr — search Prowlarr, evaluate seeds/quality, confirm with user, enable monitoring, grab
Debug why Sonarr/Radarr can't find sources — check indexer backoffs, search results, Prowlarr health
Upload a Coder template via API — pack tar, upload file, create version with variable overrides, publish or create workspace
Debug a failing Coder workspace build — check HelmRelease, pod state, and build logs via API
SOC 직업 분류 기준
| name | grafana-analyze |
| description | Analyze a Grafana dashboard URL for a specific concern (IO, CPU, memory, network, etc.) |
User will provide a Grafana dashboard URL and a concern. Follow these steps exactly.
Extract from query params:
var-namespace → namespacevar-pod → pod namevar-cluster → cluster (may be empty)from / to → time range (e.g. now-1h / now)/d/<UID>/Convert from/to to epoch seconds for Prometheus range queries:
NOW=$(date +%s)
# now-1h → $((NOW - 3600)), now-3h → $((NOW - 10800)), now-6h → $((NOW - 21600)), now-24h → $((NOW - 86400))
| URL pattern | Instance | Base URL |
|---|---|---|
grafana.local.abbottland.io | prod | https://grafana.local.abbottland.io |
grafana.local.non-prod.abbottland.io | non-prod | https://grafana.local.non-prod.abbottland.io |
Auth: admin:admin (basic auth via -u "admin:admin")
Datasource UID for Prometheus: prometheus (verified on both instances)
Use this shell function pattern — run all queries in one Bash call:
POD="<pod>"
NS="<namespace>"
NOW=$(date +%s)
START=$((NOW - 3600)) # adjust per time range
BASE="https://grafana.local.abbottland.io" # or non-prod
qrange() {
local label="$1" query="$2" divisor="${3:-1}" unit="${4:-}"
curl -sk -u "admin:admin" \
"$BASE/api/datasources/proxy/uid/prometheus/api/v1/query_range" \
--data-urlencode "query=$query" \
--data-urlencode "start=$START" \
--data-urlencode "end=$NOW" \
--data-urlencode "step=60" \
| python3 -c "
import json,sys
d=json.load(sys.stdin)
results=d.get('data',{}).get('result',[])
if not results:
print('$label: No data')
else:
for r in results:
vals=[float(v[1]) for v in r['values']]
div=$divisor
print(f'$label: min={min(vals)/div:.2f} avg={sum(vals)/len(vals)/div:.2f} max={max(vals)/div:.2f} $unit (n={len(vals)})')
"
}
qrange "Disk R KB/s" "sum(irate(container_fs_reads_bytes_total{namespace=\"$NS\",pod=\"$POD\"}[5m])) by (pod)" 1024 "KB/s"
qrange "Disk W KB/s" "sum(irate(container_fs_writes_bytes_total{namespace=\"$NS\",pod=\"$POD\"}[5m])) by (pod)" 1024 "KB/s"
qrange "Net RX KB/s" "sum(irate(container_network_receive_bytes_total{namespace=\"$NS\",pod=\"$POD\"}[5m])) by (pod)" 1024 "KB/s"
qrange "Net TX KB/s" "sum(irate(container_network_transmit_bytes_total{namespace=\"$NS\",pod=\"$POD\"}[5m])) by (pod)" 1024 "KB/s"
qrange "CPU cores" "sum(irate(container_cpu_usage_seconds_total{namespace=\"$NS\",pod=\"$POD\",container!=\"\"}[5m])) by (pod)" 1 "cores"
qrange "CPU throttle" "sum(irate(container_cpu_cfs_throttled_seconds_total{namespace=\"$NS\",pod=\"$POD\",container!=\"\"}[5m])) / sum(irate(container_cpu_cfs_periods_total{namespace=\"$NS\",pod=\"$POD\",container!=\"\"}[5m])) * 100" 1 "%"
# Get CPU limit for context
qrange "CPU limit" "sum(kube_pod_container_resource_limits{namespace=\"$NS\",pod=\"$POD\",resource=\"cpu\"}) by (pod)" 1 "cores"
qrange "Mem WS MiB" "sum(container_memory_working_set_bytes{namespace=\"$NS\",pod=\"$POD\",container!=\"\"}) by (pod)" 1048576 "MiB"
qrange "Mem RSS MiB" "sum(container_memory_rss{namespace=\"$NS\",pod=\"$POD\",container!=\"\"}) by (pod)" 1048576 "MiB"
qrange "Mem limit MiB" "sum(kube_pod_container_resource_limits{namespace=\"$NS\",pod=\"$POD\",resource=\"memory\"}) by (pod)" 1048576 "MiB"
Run IO + CPU + Memory query sets above.
# Instant query for current limits
curl -sk -u "admin:admin" \
"$BASE/api/datasources/proxy/uid/prometheus/api/v1/query" \
--data-urlencode "query=kube_pod_container_resource_limits{namespace=\"$NS\",pod=\"$POD\"}" \
--data-urlencode "time=$NOW" \
| python3 -c "
import json,sys
d=json.load(sys.stdin)
for r in d.get('data',{}).get('result',[]):
m=r['metric']; print(m.get('container'), m.get('resource'), r['value'][1])
"
Present as markdown table + narrative. Always include:
container!="" filter excludes pause/infra containersn is expectedstep=60 gives 1-min resolution; use step=300 for 24h+ windows to avoid huge result sets