Prometheus Unix Socket Scraping (3.15): 6 Easy Tests, Errors
Prometheus 3.15.0 can scrape a target over a Unix domain socket. Set the special label __unix_socket__ to the socket path, either in static_configs labels or with relabel_configs , and Prometheus connects to that file instead of a host and port. A Prometheus Unix socket scrape lets you monitor an exporter that has no TCP port at all. Older versions accept the same config file without error but ignore the label and try to resolve the target name with DNS. Every Prometheus Unix socket example below was tested on 2026-10-19 with the official images prom/prometheus:v3.15.0 and v3.13.4 , node_exporter v1.12.1 and socat 1.8.0.3 in rootless podman containers. All output is copied from the lab. Contents What changed in Prometheus 3.15.0 Prometheus Unix socket lab: an exporter without a network Prometheus Unix socket scrape with static_configs Same file on Prometheus 3.13.4 Many sockets with file_sd and relabel_configs Expose your own app metrics on a Unix socket Prometheus Unix socket e...