Starting Prometheus

Start Prometheus with your newly created configuration file:

./prometheus

It should log a number of startup messages and then start serving on port 9090:

time=2026-09-04T13:10:35.063Z level=INFO source=main.go:1736 msg="updated GOGC" old=100 new=75
time=2026-09-04T13:10:35.067Z level=INFO source=main.go:795 msg="Leaving GOMAXPROCS=2: CPU quota undefined" component=automaxprocs
time=2026-09-04T13:10:35.067Z level=INFO source=memlimit.go:198 msg="GOMEMLIMIT is updated" component=automemlimit package=github.com/KimMachineGun/automemlimit/memlimit GOMEMLIMIT=7496467660 previous=9223372036854775807
time=2026-09-04T13:10:35.067Z level=INFO source=main.go:902 msg="Starting Prometheus Server" mode=server version="(version=3.14.0, branch=HEAD, revision=d7598b7141418fa35be2b5ec5d0fefb634199610)"
time=2026-09-04T13:10:35.067Z level=INFO source=main.go:907 msg="operational information" build_context="(go=go1.26.6, platform=linux/amd64, user=root@f423027f4410, date=20260817-16:49:19, tags=netgo,builtinassets)" host_details="(Linux 6.8.0-1052-azure #58~22.04.1-Ubuntu SMP Thu Mar 26 05:02:21 UTC 2026 x86_64 codespaces-784154 (none))" fd_limits="(soft=524288, hard=524288)" vm_limits="(soft=unlimited, hard=unlimited)"
time=2026-09-04T13:10:35.324Z level=INFO source=web.go:727 msg="Start listening for connections" component=web address=0.0.0.0:9090
time=2026-09-04T13:10:35.324Z level=INFO source=main.go:1468 msg="Starting TSDB ..."
time=2026-09-04T13:10:35.326Z level=INFO source=tls_config.go:372 msg="Listening on" component=web address=[::]:9090
time=2026-09-04T13:10:35.326Z level=INFO source=tls_config.go:375 msg="TLS is disabled." component=web http2=false address=[::]:9090
time=2026-09-04T13:10:35.327Z level=INFO source=head.go:738 msg="Replaying on-disk memory mappable chunks if any" component=tsdb
time=2026-09-04T13:10:35.327Z level=INFO source=head.go:824 msg="On-disk memory mappable chunks replay completed" component=tsdb duration=1.817µs
time=2026-09-04T13:10:35.328Z level=INFO source=head.go:832 msg="Replaying WAL, this may take a while" component=tsdb
time=2026-09-04T13:10:35.328Z level=INFO source=head.go:927 msg="WAL segment loaded" component=tsdb segment=0 maxSegment=0 duration=157.351µs
time=2026-09-04T13:10:35.328Z level=INFO source=head.go:964 msg="WAL replay completed" component=tsdb checkpoint_replay_duration=46.572µs wal_replay_duration=178.468µs wbl_replay_duration=158ns chunk_snapshot_load_duration=0s mmap_chunk_replay_duration=1.817µs total_replay_duration=327.858µs
time=2026-09-04T13:10:35.329Z level=INFO source=main.go:1489 msg="filesystem information" fs_type=EXT4_SUPER_MAGIC
time=2026-09-04T13:10:35.329Z level=INFO source=main.go:1492 msg="TSDB started"
time=2026-09-04T13:10:35.330Z level=INFO source=main.go:1690 msg="Loading configuration file" filename=prometheus.yml
time=2026-09-04T13:10:35.330Z level=INFO source=main.go:1106 msg="TSDB retention updated" duration=15d size=0B percentage=0
time=2026-09-04T13:10:35.330Z level=INFO source=main.go:1729 msg="Completed loading of configuration file" db_storage=33.87µs remote_storage=2.057µs web_handler=378ns query_engine=614ns scrape=221.265µs scrape_sd=20.507µs notify=1.756µs notify_sd=771ns rules=1.772µs tracing=6.491µs filename=prometheus.yml totalDuration=543.334µs
time=2026-09-04T13:10:35.330Z level=INFO source=main.go:1453 msg="Server is ready to receive web requests."
time=2026-09-04T13:10:35.330Z level=INFO source=manager.go:211 msg="Starting rule manager..." component="rule manager"

By default, Prometheus:

  • Reads its configuration from the file prometheus.yml. You can configure this using the --config.file command-line flag.
  • Stores its database in the ./data directory. You can configure this using the --storage.tsdb.path command-line flag.

NOTE: Any settings configured in the configuration file are reloadable during runtime (by sending a HUP signal or by triggering a reload via the HTTP API), while any changes to flag-based settings require a full server restart to take effect.

You should now be able to reach the Prometheus server's query page at http://<machine-ip>:9090/:

Prometheus query page

Give the server a couple of seconds to collect data about itself from its own HTTP metrics endpoint.

You can also verify that Prometheus is serving metrics about itself by navigating to its metrics endpoint: http://<machine-ip>:9090/metrics

This should show a long list of metrics looking something like this:

# HELP go_gc_cleanups_executed_cleanups_total Approximate total count of cleanup functions (created by runtime.AddCleanup) executed by the runtime. Subtract /gc/cleanups/queued:cleanups to approximate cleanup queue length. Useful for detecting slow cleanups holding up the queue. Sourced from /gc/cleanups/executed:cleanups.
# TYPE go_gc_cleanups_executed_cleanups_total counter
go_gc_cleanups_executed_cleanups_total 0
# HELP go_gc_cleanups_queued_cleanups_total Approximate total count of cleanup functions (created by runtime.AddCleanup) queued by the runtime for execution. Subtract from /gc/cleanups/executed:cleanups to approximate cleanup queue length. Useful for detecting slow cleanups holding up the queue. Sourced from /gc/cleanups/queued:cleanups.
# TYPE go_gc_cleanups_queued_cleanups_total counter
go_gc_cleanups_queued_cleanups_total 0
# HELP go_gc_cycles_automatic_gc_cycles_total Count of completed GC cycles generated by the Go runtime. Sourced from /gc/cycles/automatic:gc-cycles.
# TYPE go_gc_cycles_automatic_gc_cycles_total counter
go_gc_cycles_automatic_gc_cycles_total 16
# HELP go_gc_cycles_forced_gc_cycles_total Count of completed GC cycles forced by the application. Sourced from /gc/cycles/forced:gc-cycles.
# TYPE go_gc_cycles_forced_gc_cycles_total counter
go_gc_cycles_forced_gc_cycles_total 0
# HELP go_gc_cycles_total_gc_cycles_total Count of all completed GC cycles. Sourced from /gc/cycles/total:gc-cycles.
# TYPE go_gc_cycles_total_gc_cycles_total counter
go_gc_cycles_total_gc_cycles_total 16
# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.
# TYPE go_gc_duration_seconds summary
go_gc_duration_seconds{quantile="0"} 3.0599e-05
go_gc_duration_seconds{quantile="0.25"} 4.848e-05
go_gc_duration_seconds{quantile="0.5"} 0.000235774
go_gc_duration_seconds{quantile="0.75"} 0.001436067
go_gc_duration_seconds{quantile="1"} 0.002849683
go_gc_duration_seconds_sum 0.009867189
go_gc_duration_seconds_count 16
# HELP go_gc_finalizers_executed_finalizers_total Total count of finalizer functions (created by runtime.SetFinalizer) executed by the runtime. Subtract /gc/finalizers/queued:finalizers to approximate finalizer queue length. Useful for detecting finalizers overwhelming the queue, either by being too slow, or by there being too many of them. Sourced from /gc/finalizers/executed:finalizers.
# TYPE go_gc_finalizers_executed_finalizers_total counter
go_gc_finalizers_executed_finalizers_total 0
# HELP go_gc_finalizers_queued_finalizers_total Total count of finalizer functions (created by runtime.SetFinalizer) and queued by the runtime for execution. Subtract from /gc/finalizers/executed:finalizers to approximate finalizer queue length. Useful for detecting slow finalizers holding up the queue. Sourced from /gc/finalizers/queued:finalizers.
# TYPE go_gc_finalizers_queued_finalizers_total counter
go_gc_finalizers_queued_finalizers_total 0
# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.
# TYPE go_gc_gogc_percent gauge
go_gc_gogc_percent 75
# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.
# TYPE go_gc_gomemlimit_bytes gauge
go_gc_gomemlimit_bytes 7.49646766e+09

# [...more...]