blob: 42478a2b51cbfe9b5e6f29cbcd23bbffe538a847 (
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
|
# DNS Resolution (Watch Mode)
In watch mode, Epimetheus can resolve IP addresses in label values to hostnames. This improves readability in Grafana and other tools that display label values.
## Default Behaviour
- The label **`ip`** is always resolved by default (when present).
- Resolution is done via reverse DNS. The result is used as the label value (e.g. `10.50.52.61` → `foo.example.lan`).
- Failed lookups leave the original IP unchanged.
- Results are cached in memory to avoid repeated DNS lookups.
## Additional Labels
To resolve other IP-carrying labels, use `-resolve-ip-labels` with a comma-separated list of label names:
```bash
./epimetheus -mode=watch \
-file=network.csv \
-metric-name=network \
-resolve-ip-labels=source_ip,dest_ip
```
This resolves:
- `ip` (always, if present)
- `source_ip`
- `dest_ip`
Duplicate or empty entries (e.g. listing `ip` again) are ignored.
## Example
- **Input label:** `ip="10.50.52.61"`
- **After resolution:** `ip="foo.example.lan"` (if reverse DNS returns that name)
- **If resolution fails:** `ip="10.50.52.61"` (unchanged)
## When to Use
- CSV columns that contain IPs and are used as labels (e.g. `ip`, `host`, `source_ip`, `dest_ip`).
- When you want dashboards to show hostnames instead of raw IPs.
DNS resolution only applies in **watch mode**. Other modes do not use this feature. See [Operating Modes](modes.md) and [CLI Reference](../reference/cli.md) for full options.
|