skillZs
★ LIVE SKILL TAGS ★
>>> LIVE SKILLS INDEX <<<
* OPEN SOURCE *
NO LOGIN, NO TRACKING
※ REAL INSTALL DATA ※
← back to all skills
oodle-ai/agent-skills97 installs

oodle-log-metrics

Create and manage Oodle log-based metric rules — extract metrics from log streams using filter expressions and groupBy labels.

How do I install this agent skill?

npx skills add https://github.com/oodle-ai/agent-skills --skill oodle-log-metrics
view source ↗

Is this agent skill safe to install?

  • Gen Agent Trust Hubpass

    The skill provides instructions for managing log-based metrics using the Oodle CLI. All external references and installation steps point to official resources from the vendor (oodle-ai). No security risks were identified.

  • Socketpass

    No alerts

  • Snykpass

    Risk: LOW · No issues

What does this agent skill do?

Oodle Log Metrics — Rules and Cardinality

This skill teaches the agent to convert log streams into metrics safely: validate the filter, narrow the groupBy, and avoid creating high-cardinality time series.

Prerequisites

brew install oodle-ai/oodle/oodle
oodle configure

Confirm the log-metrics endpoint works:

oodle log-metrics list -o json | jq 'length'

Command Execution Order

Before running any oodle command:

  1. Check whether the rule's filter and groupBy are already in context.
  2. If not, run a sample log query (e.g. oodle traces list ... or the log explorer) to verify the filter actually matches logs.
  3. Estimate cardinality: groupBy count × distinct values per label.
  4. Run oodle log-metrics create -f rule.json only after the filter is validated.
  5. Do not run update without first running get to capture the existing rule.

Quick Reference

TaskCommand
List rulesoodle log-metrics list -o json
Get ruleoodle log-metrics get <id> -o json
Create ruleoodle log-metrics create -f rule.json
Update ruleoodle log-metrics update <id> -f rule.json
Delete ruleoodle log-metrics delete <id> --force

Common Operations

Rule schema

{
  "name": "http_errors_from_logs",
  "filter": "level=error AND service=api",
  "groupBy": ["service", "env"],
  "metricName": "oodle.log.http_errors"
}

Field meaning:

FieldMeaning
nameHuman identifier for the rule
filterBoolean expression over log fields (AND/OR/NOT, =, !=, contains)
groupByLabels promoted from log fields onto the emitted metric
metricNameThe Prometheus-style metric name to emit

Creating a rule

# ✅ CORRECT — validate filter first, then create
# (preview with the log explorer or `oodle traces list` if traces and logs share the same backend)
oodle log-metrics create -f rule.json

# ❌ WRONG — creating with an untested filter; the resulting metric is silently empty
oodle log-metrics create -f <(echo '{"name":"x","filter":"levl=eror","groupBy":[],"metricName":"x"}')

Updating a rule

# ✅ CORRECT — get → edit → update
oodle log-metrics get lm_123 -o json > rule.json
jq '.groupBy = ["service","env"]' rule.json > rule.new.json
oodle log-metrics update lm_123 -f rule.new.json

# ❌ WRONG — partial payload removes existing fields
oodle log-metrics update lm_123 -f <(echo '{"groupBy":["service"]}')

Deleting a rule

# ✅ CORRECT — verify and delete
oodle log-metrics get lm_123 -o json > /dev/null
oodle log-metrics delete lm_123 --force

# ❌ WRONG — speculative delete by name match
oodle log-metrics delete "$(oodle log-metrics list | grep errors | awk '{print $1}')" --force

Best Practices

Validate the filter against real log volume before creating the rule

A typo in the filter (levl=eror) creates a rule that silently emits zero data points.

# ✅ CORRECT — preview matching log volume in the log explorer first;
# only then run `oodle log-metrics create`
# (or temporarily create a synthetic monitor that hits the matching logs and confirm count > 0)

# ❌ WRONG — create the rule, then notice the dashboard panel is empty next week
oodle log-metrics create -f rule.json

Keep groupBy to 2–3 low-cardinality labels

Each label multiplies the time-series count. Avoid request_id, user_id, trace_id, path (with IDs).

# ✅ CORRECT — bounded labels
"groupBy": ["service", "env"]

# ❌ WRONG — `user_id` blows up cardinality (one series per user)
"groupBy": ["service", "env", "user_id"]

Always get before update to preserve fields

update replaces the document. Sending a single field nulls everything else.

# ✅ CORRECT
oodle log-metrics get lm_123 -o json > rule.json
jq '.filter = "level=error AND service=api AND status=5xx"' rule.json > rule.new.json
oodle log-metrics update lm_123 -f rule.new.json

# ❌ WRONG — clobbers groupBy and metricName
oodle log-metrics update lm_123 -f <(echo '{"filter":"level=error"}')

Use a stable, namespaced metricName

oodle.log.<domain>.<measurement> makes the metric easy to find in dashboards and drop rules.

# ✅ CORRECT
"metricName": "oodle.log.http_errors"

# ❌ WRONG — generic name collides with other rules
"metricName": "errors"

Failure Handling

ErrorCauseFix
401 UnauthorizedInvalid or missing API keyRun oodle configure or set OODLE_API_KEY
404 Not FoundLog-metric rule ID does not existVerify with oodle log-metrics list -o json
connection refusedWrong OODLE_DEPLOYMENT URLCheck OODLE_DEPLOYMENT env var
invalid filter expressionFilter has a syntax errorUse field=value (no spaces around =); combine with AND/OR/NOT
Metric exists but has no data pointsFilter doesn't match any logsRe-test the filter in the log explorer; check label names match the log schema
Cardinality alarm in the UIgroupBy includes a high-cardinality fieldEdit the rule to drop that field; old series age out at the regular retention
429 Too Many RequestsBulk rule creationAdd --retries 3, throttle to <10 creates per second

References

Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.

<a href="https://skillzs.dev/skills/oodle-ai/agent-skills/oodle-log-metrics">View oodle-log-metrics on skillZs</a>