lognorth
Use when debugging production errors, checking logs, or user mentions "lognorth". Queries LogNorth error tracking API.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Use when debugging production errors, checking logs, or user mentions "lognorth". Queries LogNorth error tracking API.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Use when setting up LogNorth in a project — installs SDK, configures middleware, and wires up error reporting. Trigger when user says "add lognorth", "set up logging", or "integrate lognorth".
Use ONLY when explicitly invoked. Deploys LogNorth to a new Hetzner server or an existing server, with optional hardening and Cloudflare DNS.
| name | lognorth |
| description | Use when debugging production errors, checking logs, or user mentions "lognorth". Queries LogNorth error tracking API. |
Query your LogNorth instance to see errors, logs, and traces.
Your role: The user is debugging. They might ask "What's breaking in production?" or "Find events for trace abc-123". Query the API and present results clearly — tables for lists, details for single events, summaries for issues.
Requires:
LOGNORTH_URL - Your LogNorth instance (e.g., https://logs.yoursite.com)LOGNORTH_API_KEY - Agent API key from Settings page (starts with lgn-agent-)Note: Agent keys are read-only and separate from app keys (lgn-) used for ingestion.
| Concept | What it means |
|---|---|
| Event | A single log entry (message + context metadata) |
| Error | An event where is_error=true (has context.error or status >= 500) |
| Issue | Unique error type, grouped by error message. Has occurrence count. |
| Trace | Events sharing a trace_id — typically one request's full journey |
| Field | Type | Description |
|---|---|---|
id | int | Unique identifier |
message | string | What happened (human readable) |
timestamp | ISO 8601 | When it happened |
duration_ms | int | How long it took (optional) |
trace_id | string | Correlation ID for related events (optional) |
is_error | bool | True if error detected |
context | object | All metadata — method, path, status, error, user, etc. |
| Field | Type | Description |
|---|---|---|
hash | string | Unique identifier for this error type |
error | string | The error text |
count | int | Total occurrences (all time) |
count_24h | int | Occurrences in last 24 hours |
count_7d | int | Occurrences in last 7 days |
first_seen | timestamp | When first occurred |
last_seen | timestamp | Most recent occurrence |
trend | string | "up", "down", or "stable" (comparing recent vs previous period) |
active | bool | Had occurrences in last 24h |
is_new | bool | First seen less than 24h ago |
Assessing criticality: Use count_24h, count_7d, and trend to gauge severity:
count_24h + trend "up" = urgent, getting worsecount_7d but low count_24h + trend "down" = improvingis_new = true = new error, investigate immediatelyAlways call this first to see available apps:
curl -s "$LOGNORTH_URL/api/v1/agent/apps" \
-H "Authorization: Bearer $LOGNORTH_API_KEY" | jq '.apps'
Returns: [{"id": 1, "name": "Admin Dashboard"}, {"id": 2, "name": "API Server"}]
curl -s "$LOGNORTH_URL/api/v1/agent/events" \
-H "Authorization: Bearer $LOGNORTH_API_KEY" | jq
Filters:
| Parameter | Example | Description |
|---|---|---|
app_id | 3 | Filter by app (get ID from /apps) |
is_error | true or false | Only errors or only successes |
search | connection+refused | Text search in message/context |
limit | 50 | Max results (default 50) |
offset | 100 | Pagination offset |
start_time | 2024-01-01T00:00:00Z | Filter by time range |
end_time | 2024-01-02T00:00:00Z | Filter by time range |
Examples:
Recent errors:
curl -s "$LOGNORTH_URL/api/v1/agent/events?is_error=true&limit=10" \
-H "Authorization: Bearer $LOGNORTH_API_KEY" | jq '.events[] | {id, message, timestamp}'
Search by trace ID:
curl -s "$LOGNORTH_URL/api/v1/agent/events?search=trace-abc-123" \
-H "Authorization: Bearer $LOGNORTH_API_KEY" | jq '.events'
Events from last hour:
curl -s "$LOGNORTH_URL/api/v1/agent/events?start_time=$(date -u -v-1H +%Y-%m-%dT%H:%M:%SZ)" \
-H "Authorization: Bearer $LOGNORTH_API_KEY" | jq '.events'
curl -s "$LOGNORTH_URL/api/v1/agent/events/123" \
-H "Authorization: Bearer $LOGNORTH_API_KEY" | jq
Returns:
event — Full event with all contexteventContext — Parsed context objectrelatedEvents — Other events with same trace_idGrouped errors with occurrence counts:
curl -s "$LOGNORTH_URL/api/v1/agent/issues" \
-H "Authorization: Bearer $LOGNORTH_API_KEY" | jq '.issues[] | {hash, error_message, count, last_seen}'
List apps (if multiple exist):
curl -s "$LOGNORTH_URL/api/v1/agent/apps" -H "Authorization: Bearer $LOGNORTH_API_KEY" | jq '.apps'
Check issues first — See grouped errors with occurrence counts:
curl -s "$LOGNORTH_URL/api/v1/agent/issues?app_id=3" -H "Authorization: Bearer $LOGNORTH_API_KEY" | jq '.issues'
Issues show you patterns: which errors happen most, which are new, which are trending up.
Get recent errors — See the latest failures:
curl -s "$LOGNORTH_URL/api/v1/agent/events?app_id=3&is_error=true&limit=10" -H "Authorization: Bearer $LOGNORTH_API_KEY" | jq '.events'
When an error has a trace_id, you can see the full request journey — what happened before and after the error.
Get event detail — Returns the event plus all related events in the same trace:
curl -s "$LOGNORTH_URL/api/v1/agent/events/123" -H "Authorization: Bearer $LOGNORTH_API_KEY" | jq
The response includes relatedEvents — all events sharing the same trace_id.
Or search by trace_id directly:
curl -s "$LOGNORTH_URL/api/v1/agent/events?search=abc-123-trace-id" -H "Authorization: Bearer $LOGNORTH_API_KEY" | jq '.events'
What traces reveal:
Issues group identical errors together. Use them to understand patterns:
| Field | What it tells you |
|---|---|
count | Total occurrences ever |
count_24h | How many today — is it actively happening? |
count_7d | Weekly volume — is this a big problem? |
trend | "up" = getting worse, "down" = improving |
is_new | First seen < 24h ago — new regression? |
first_seen / last_seen | When did this start? Still happening? |
Triage priority:
is_new = true → New error, investigate immediatelytrend = "up" + high count_24h → Getting worse, urgentcount_7d but low count_24h → Old problem, maybe improvingTo find all occurrences of a specific error type:
curl -s "$LOGNORTH_URL/api/v1/agent/events?search=ConnectionRefused&is_error=true" -H "Authorization: Bearer $LOGNORTH_API_KEY" | jq '.events'
To see errors on a specific endpoint:
curl -s "$LOGNORTH_URL/api/v1/agent/events?search=/api/checkout&is_error=true" -H "Authorization: Bearer $LOGNORTH_API_KEY" | jq '.events'
| View | Format |
|---|---|
| Issues list | Table: error message, count_24h, count_7d, trend, last_seen |
| Errors list | Table: message, timestamp, path, status |
| Single event | Full context object, highlight the error and stack trace |
| Trace view | Chronological list showing the request flow, mark where error occurred |
Always do:
trace_id so user can ask for the full traceis_new and trend = "up" as urgent