Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Can I build a single docker-compose.yml file to bring all 3 containers up at once? Or am I missing something. Also, if so, how do you capture the “-config.file=” and “-storage.local.path=” and so forth information in the yml file? Please advise.
Hi, here you are not mentioning any alert manager configuration?how can i configure for the alert manager also.I am new to the docker can i have detailed doc how to install prometheus on ubuntu14 .04?
If trying this with a more recent prometheus, target_groups has been renamed static_configs. http://www.robustperception.io/new-features-in-prometheus-0-20-0/
Please, update tutorial, prometheus.yml is broken
target_groups changed to static_configs
prometheus.yml
# A scrape configuration scraping a Node Exporter and the Prometheus server
# itself.
scrape_configs:
# Scrape Prometheus itself every 5 seconds.
- job_name: 'prometheus'
scrape_interval: 5s
static_configs:
- targets: ['your_ip_address:9090']
# Scrape the Node Exporter every 5 seconds.
- job_name: 'node'
scrape_interval: 5s
static_configs:
- targets: ['your_ip_address:9100']
You can use this snippet to automate ip address change
IP_ADDRESS = `ip addr show eth0 | grep -Po 'inet \K[\d.]+' | head -n 1` sed -i 's/your_ip_address/'"$IP_ADDRESS"'/' prometheus.yml
Hi,
While executing this command
docker run -d -p 9090:9090 -v ~/prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus -config.file=/etc/prometheus/prometheus.yml -storage.local.path=/prometheus -storage.local.memory-chunks=10000
i am getting error like this
0ca057b44e35be769af88c4a8c552b7ca5d1aa3c270db46127626e7819f99932 docker: Error response from daemon: invalid header field value "oci runtime error: container_linux.go:247: starting container process caused "process_linux.go:359: container init caused \"rootfs_linux.go:53: mounting \\\"/root/prometheus.yml\\\" to rootfs \\\"/var/lib/docker/overlay/6c6ed56ba7f080909fa0bfa9b287a21b8a131806b49216f24a3c3d4f15ec249c/merged\\\" at \\\"/var/lib/docker/overlay/6c6ed56ba7f080909fa0bfa9b287a21b8a131806b49216f24a3c3d4f15ec249c/merged/etc/prometheus/prometheus.yml\\\" caused \\\"not a directory\\\"\""\
i have created prometheus directory in etc and in that i have created file with the following content vi prometheus.yml
scrape_configs:
can someone help me in solving this issue???
When I ran docker using docker run -d -p 9090:9090 -v ~/prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus -config.file=/etc/prometheus/prometheus.yml -storage.local.path=/prometheus -storage.local.memory-chunks=10000 and tried to scrape localhost:9090 , I got state : UNKNOWN in http://localhost:9090/targets.
But on removing -storage.local.memory-chunks=10000 , I got state : UP
Can anyone tell the reason for this?
We need an update about the article since Prometheus is 2.x now.
prometheus.yml
# https://prometheus.io/docs/prometheus/latest/getting_started/
global:
scrape_interval: 15s # By default, scrape targets every 15 seconds.
# Attach these labels to any time series or alerts when communicating with
# external systems (federation, remote storage, Alertmanager).
external_labels:
monitor: 'codelab-monitor'
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: 'prometheus'
# Override the global default and scrape targets from this job every 5 seconds.
scrape_interval: 5s
static_configs:
- targets: ['localhost:9090']
# Scrape the Node Exporter every 5 seconds.
- job_name: 'node'
scrape_interval: 5s
static_configs:
- targets: ['1.1.1.1:9100']
For commands to run docker, it should be modified as follow:
docker run -d -p 9090:9090 -v ~/prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus --config.file=/etc/prometheus/prometheus.yml --storage.tsdb.path=/prometheus
Above command does not use memory-chunks now, see discussions here