/etc/prometheus/prometheus.yml).
Example minimal Prometheus config:
global: Default parameters that apply to all scrape jobs. Individualscrape_configscan override these defaults.scrape_configs: Defines jobs (logical groups of targets) and how Prometheus should scrape them. Each job may define its ownscrape_interval,scrape_timeout,metrics_path,scheme, authentication, discovery mechanism, and static targets.
Note: the example below demonstrates overriding defaults for a job;schemeandmetrics_pathare illustrative. Most exporters usehttpand the defaultmetrics_path(/metrics).
job_name: Logical name for the job — added as ajoblabel to all scraped metrics.scrape_interval: How often Prometheus pulls metrics from targets in this job.scrape_timeout: How long Prometheus will wait for a scrape before it times out.metrics_path: HTTP path where metrics are exposed (defaults to/metrics).scheme:httporhttps(defaults tohttp).static_configs.targets: List ofhost:porttargets to scrape (Node Exporter commonly uses port9100).basic_auth: If targets require basic auth, setusernameand eitherpasswordorpassword_file(mutually exclusive).
Reference-style documented options:
- Edit the config file (example path):
- After saving changes, Prometheus does not automatically pick them up. You have several options to apply the new config:
- If you started Prometheus manually (for example with
./prometheus --config.file=/etc/prometheus/prometheus.yml), stop it with Ctrl+C and start it again the same way. - Send a SIGHUP to the Prometheus process to request a config reload:
- If Prometheus is managed via systemd, restart it:
After updating
prometheus.yml, restart Prometheus, send a SIGHUP, or use the /-/reload HTTP endpoint (if available) so new scrape jobs take effect.- Open the Prometheus UI at
http://<prometheus-host>:9090/. - Navigate to Status -> Targets to view all configured targets and their scrape status. A green “UP” indicates a successful scrape.

up metric in the Prometheus expression browser:
/etc/prometheus/prometheus.yml example
- Prometheus official docs: https://prometheus.io/docs/
- Prometheus configuration reference: https://prometheus.io/docs/prometheus/latest/configuration/configuration/
- Node Exporter: https://github.com/prometheus/node_exporter