localhost:9090: Prometheus or Cockpit

On a developer laptop, localhost:9090 is usually Prometheus, the metrics server, whose expression browser and API live there. On Fedora, RHEL and other Linux servers it is often Cockpit, the web admin console, which needs https://localhost:9090 and a system login. Which one you get depends on what is installed.

Two common owners of 9090
ProgramAddressReady check
Prometheushttp://localhost:9090/-/ready returns 200
Cockpithttps://localhost:9090systemctl status cockpit.socket

Updated

Prometheus and Cockpit cannot both have 9090, and Cockpit starts on demand through a systemd socket, so it may claim the port quietly before Prometheus starts. A Prometheus that exits with 'address already in use' on a Linux server is often meeting Cockpit.

Run and check Prometheus

Docker run and readiness

Mount your own prometheus.yml to add scrape targets.

docker run -d -p 9090:9090 \
  -v "$PWD/prometheus.yml:/etc/prometheus/prometheus.yml" prom/prometheus
curl -i http://localhost:9090/-/ready

Checking Prometheus quickly

Query up in the expression browser: each target shows 1 when scraped and 0 when not. A missing target means it is absent from prometheus.yml or the file was not reloaded.

Uptime of a marketing site is handled for you on We.Inc, so there is no Prometheus to run for it.

How it works

  1. Decide which program you expect at 9090.
  2. For Prometheus, check its startup log for 'Server is ready to receive web requests'.
  3. For Cockpit, enable cockpit.socket and use https.
  4. Move Prometheus with --web.listen-address if Cockpit owns the port.

Tips

  • Prometheus's Targets page under Status shows whether each scrape target is up, which is the first stop when graphs are empty.
  • In Docker Compose, Grafana should reach Prometheus at http://prometheus:9090, not localhost.
  • Cockpit uses a self-signed certificate, so expect a browser warning on first visit.
  • Port 9090 is also used by some Java and WebSphere tools, so check the process name before killing it.

Frequently asked questions

What is localhost:9090?

Usually the Prometheus web interface, or Cockpit on Linux servers. Both choose 9090 by default.

Why does Prometheus fail with 'bind: address already in use'?

Another program, often Cockpit, has 9090. Stop it or run Prometheus with --web.listen-address=:9091.

How do I log in to Cockpit on 9090?

Open https://localhost:9090 and sign in with a Linux user account on that machine. Accounts with sudo rights can manage the system.

Why can Grafana not reach localhost:9090 in Docker?

Inside a container, localhost is the container itself. Use the Prometheus service name as the host, such as prometheus:9090.

Related: localhost:9000, localhost:3000, Docker Compose env files, localhost:8088.

Start for free or see all free tools. We.Inc is free to start, with no card needed. AI building is on paid plans from $20 a month.

More in Guides

Product

Who It's For

Features

Resources

Company

View Sitemap