summaryrefslogtreecommitdiff
path: root/docs/reference/cli.md
blob: 83d02b0fc6efeaa4bc0aaaed6b0302739c9bbf70 (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
50
51
52
53
54
55
56
57
# CLI Reference

All flags and defaults. Modes: `realtime`, `historic`, `backfill`, `auto`, `watch`.

## Global

| Flag | Default | Description |
|------|---------|-------------|
| `-version` | — | Print version and exit |
| `-mode` | `realtime` | Mode: realtime, historic, backfill, auto, or watch |

## Realtime

| Flag | Default | Description |
|------|---------|-------------|
| `-pushgateway` | `http://localhost:9091` | Pushgateway URL |
| `-job` | `example_metrics_pusher` | Job name for metrics |
| `-continuous` | `false` | Push every 15s |

## Historic

| Flag | Default | Description |
|------|---------|-------------|
| `-prometheus` | `http://localhost:9090/api/v1/write` | Prometheus Remote Write URL |
| `-hours-ago` | `24` | Hours in the past (single datapoint) |

## Backfill

| Flag | Default | Description |
|------|---------|-------------|
| `-prometheus` | `http://localhost:9090/api/v1/write` | Prometheus Remote Write URL |
| `-start-hours` | `48` | Start time in hours ago |
| `-end-hours` | `0` | End time in hours ago (0 = now) |
| `-interval` | `1` | Interval between points in hours |

## Auto

| Flag | Default | Description |
|------|---------|-------------|
| `-file` | — | Input file path (required) |
| `-format` | `csv` | Input format: csv or json |
| `-pushgateway` | `http://localhost:9091` | Pushgateway URL |
| `-prometheus` | `http://localhost:9090/api/v1/write` | Prometheus Remote Write URL |

## Watch

| Flag | Default | Description |
|------|---------|-------------|
| `-file` | — | CSV file(s) to watch (comma-separated for multiple); required |
| `-metric-name` | — | Base metric name (e.g. myapp, food); required |
| `-prometheus` | `http://localhost:9090/api/v1/write` | Prometheus Remote Write URL (set to empty to disable) |
| `-clickhouse` | — | ClickHouse HTTP URL (e.g. http://localhost:8123) |
| `-clickhouse-table` | `epimetheus_metrics` | ClickHouse table name |
| `-job` | `example_metrics_pusher` | Job name for metrics |
| `-resolve-ip-labels` | (ip only) | Comma-separated additional IP labels to resolve via DNS |

Watch mode requires at least one of `-prometheus` or `-clickhouse`. Use `-prometheus=` to ingest only to ClickHouse.