Port 9090 is the Prometheus time-series metrics server port. Prometheus scrapes metrics from targets and exposes a query API and web UI on port 9090. Like many monitoring tools, Prometheus has no authentication by default. Publicly exposed Prometheus instances leak infrastructure topology, service names, resource utilization, and potentially secrets in metric labels.
Port Number
9090
Protocol
TCP
Service
Prometheus Metrics Server
Range
IANA Registered (1024–49151)
Count how many scrape targets are UP
curl -s http://localhost:9090/api/v1/query?query=up | jq '.data.result | length'Show all DOWN scrape targets with last error
curl -s http://localhost:9090/api/v1/targets | jq '.data.activeTargets[] | select(.health=="down")'Dump current Prometheus config (check if admin API is enabled)
curl -s http://localhost:9090/api/v1/status/config | jq .data.yaml | head -50Validate Prometheus configuration file syntax
promtool check config /etc/prometheus/prometheus.ymlcurl http://localhost:9090/api/v1/query?query=up
curl http://localhost:9090/metrics
promtool query instant http://localhost:9090 'rate(http_requests_total[5m])'Prometheus was created at SoundCloud in 2012 by Matt Proud and Julius Volz, inspired by Google's Borgmon. Open-sourced in 2015, it became the second CNCF project (after Kubernetes) in 2016 and graduated in 2018. Port 9090 was chosen as a common development port. PromQL became the de facto metrics query language. Prometheus 2.0 (2017) introduced the TSDB rewrite with dramatically better performance.
How do I add authentication to Prometheus?
Since Prometheus 2.24, native basic auth and TLS are supported via web.yml (--web.config.file). Create web.yml with basic_auth_users and tls_server_config sections. For OAuth2/OIDC, use a reverse proxy (nginx, oauth2-proxy, or Pomerium). Thanos and Mimir add multi-tenant auth natively.
Prometheus vs VictoriaMetrics?
Both use port 9090 and support PromQL. VictoriaMetrics offers better compression (10x), native long-term storage, native clustering, and higher ingestion throughput. Prometheus is simpler operationally (single binary) and has the larger ecosystem. VictoriaMetrics is the common choice when Prometheus hits storage or cardinality limits.
Why are my Prometheus metrics showing gaps?
Gaps usually mean: (1) scrape target was down during that interval, (2) Prometheus itself restarted (check --storage.tsdb.retention.time), (3) target's /metrics took longer than scrape_timeout (default 10s), or (4) head compaction dropped samples from a crash. Check up{} metric for the target during the gap period.