summaryrefslogtreecommitdiff
path: root/docs/guides/data-formats.md
blob: 24d7755be8c7d69503efdd816446718fb2371e4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Data Formats

Epimetheus accepts CSV and JSON input for **auto mode** (and for **watch mode**, watch uses tabular CSV; see [CSV Format Flexibility](csv-format-flexibility.md)).

## Epimetheus CSV (auto mode)

Format: one metric per line with explicit metric name, labels, value, and optional timestamp.

```csv
# Format: metric_name,labels,value,timestamp_ms
# Labels: key1=value1;key2=value2
epimetheus_test_requests_total,instance=web1;env=prod,100,1767125148000
epimetheus_test_temperature_celsius,instance=web2,22.5,1767038748000

# Timestamp optional (uses "now" if omitted)
epimetheus_test_active_connections,instance=web3,42,
```

- **metric_name** – Prometheus metric name.
- **labels** – Semicolon-separated `key=value` pairs.
- **value** – Numeric value.
- **timestamp_ms** – Unix milliseconds. Omit or leave empty for "now".

## JSON (auto mode)

Array of objects with `metric`, `labels`, `value`, and optional `timestamp_ms`:

```json
[
  {
    "metric": "epimetheus_test_requests_total",
    "labels": {"instance": "web1", "env": "prod"},
    "value": 100,
    "timestamp_ms": 1767125148000
  },
  {
    "metric": "epimetheus_test_temperature_celsius",
    "labels": {"instance": "web2"},
    "value": 22.5,
    "timestamp_ms": 1767038748000
  }
]
```

Omit `timestamp_ms` for "now".

## Watch mode CSV

Watch mode uses **tabular CSV**: first row = headers, following rows = data. Numeric columns become metrics (with `-metric-name` as prefix), string columns become labels. See [CSV Format Flexibility](csv-format-flexibility.md).