Skip to content

fcakyon/claude-codex-settings / plugins/openobserve-skills/skills/openobserve-api

openobserve-api

Unverified

This skill should be used when user asks to "query OpenObserve", "create OpenObserve dashboard", "edit OpenObserve panel", "fetch OpenObserve logs", "run OpenObserve search", "list OpenObserve streams", "ingest into OpenObserve", or works with OpenObserve Cloud / self-hosted via REST API. Covers auth, search/SQL, streams, dashboards (CRUD + per-panel ops), the v8 panel JSON schema, and known pitfalls (re-aggregation, hash concurrency, microsecond timestamps).

FileKindSize
SKILL.mdskill md16.1 KB
references/around.mdmarkdown2.5 KB
references/bulk.mdmarkdown7.0 KB
references/delete.mdmarkdown10.8 KB
references/index.mdmarkdown1.7 KB
references/json.mdmarkdown6.8 KB
references/list.mdmarkdown2.7 KB
references/loki.mdmarkdown2.8 KB
references/multi.mdmarkdown5.2 KB
references/otlp.mdmarkdown4.4 KB
references/recipes/build-dashboard.shexecutablescript1.5 KB
references/recipes/search-logs.shexecutablescript683 B
references/recipes/update-panel.shexecutablescript884 B
references/schema.mdmarkdown2.6 KB
references/search.mdmarkdown13.3 KB
references/setting.mdmarkdown5.8 KB
references/value.mdmarkdown1.9 KB

references/loki.md

View on GitHub
---
title: Loki
description: "Ingest logs through the Grafana Loki-compatible push API. Supports Loki stream labels, nanosecond timestamps, and structured metadata."
---

# Logs Ingestion - Loki

Endpoint: `POST /api/{organization}/loki/api/v1/push`

OpenObserve is compatible with the Grafana Loki push API. You can send logs using any Loki-compatible client (e.g. Promtail, Grafana Agent, Alloy) by pointing it at OpenObserve.

> we use the `o2_stream_name` label (or the legacy `stream_name` label) for custom stream name, default will push into `default` stream.

## Request

e.g. `POST /api/myorg/loki/api/v1/push`

Content-Type: `application/json`

```json
{
  "streams": [
    {
      "stream": {
        "o2_stream_name": "custom_stream",
        "kubernetes_namespace": "monitoring",
        "kubernetes_pod_name": "prometheus-k8s-1",
        "kubernetes_container_name": "prometheus"
      },
      "values": [
        [
          "1672149599212000000",
          "ts=2022-12-27T14:09:59.212Z caller=klog.go:108 level=warn component=k8s_client_runtime msg=\"failed to list *v1.Pod\""
        ],
        [
          "1672149600000000000",
          "ts=2022-12-27T14:10:00.000Z caller=klog.go:116 level=error component=k8s_client_runtime msg=\"Failed to watch *v1.Pod\""
        ]
      ]
    }
  ]
}
```

### Fields

| Field | Type | Description |
|-------|------|-------------|
| `streams` | array | List of log streams to push. |
| `streams[].stream` | object | Key-value label pairs that identify the stream. Labels are indexed and can be used for filtering. Use the `o2_stream_name` label (or the legacy `stream_name` label) to set a custom target stream; if neither is present, logs are pushed into the `default` stream. |
| `streams[].values` | array | List of log entries. Each entry is a two-element array: `[timestamp, line]`. |
| `streams[].values[][0]` | string | Unix timestamp in **nanoseconds** as a string. |
| `streams[].values[][1]` | string | Log line content. |

## Response

```json
{}
```

An empty JSON object `{}` with HTTP status `204 No Content` indicates success, matching the standard Loki push API behavior.

## Authentication

Pass your credentials using HTTP Basic Auth or via the `Authorization` header, the same as all other OpenObserve ingestion endpoints.

```
Authorization: Basic <base64(user:password)>
```

## Configuring Promtail

Point Promtail at OpenObserve by setting the Loki push URL in your `promtail.yaml`:

```yaml
clients:
  - url: https://<openobserve-host>/api/<organization>/loki/api/v1/push
    basic_auth:
      username: <user>
      password: <password>
```

## Configuring Grafana Alloy

```alloy
loki.write "openobserve" {
  endpoint {
    url = "https://<openobserve-host>/api/<organization>/loki/api/v1/push"
    basic_auth {
      username = "<user>"
      password = "<password>"
    }
  }
}
```
deprecation-and-migrationaddyosmani/agent-skillsManages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
performance-optimizationaddyosmani/agent-skillsOptimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
Agent Cost Reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json.Stars: 118kUpdated Claude CodeCodexVerifiedInstall
Agent Cost Reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json.Stars: 118kUpdated Claude CodeCodexVerifiedInstall