Y porque no quieres usar composer? por ahí podrías levantarlo
he realizado un compose mira : pero el problema creo que esta en el prometheus.yml
version: "3"
services:
prom:
image: quay.io/prometheus/prometheus:latest
restart: unless-stopped
volumes:
- ./configuracion/prometheus.yml:/etc/prometheus/prometheus.yml
command: "--config.file=/etc/prometheus/prometheus.yml --storage.tsdb.path=/prometheus"
ports:
- 9090:9090
depends_on:
- exporter
- cadvisor
exporter:
image: prom/node-exporter:latest
privileged: true
restart: unless-stopped
ports:
- "9100:9100"
network_mode: mi-red
cadvisor:
image: google/cadvisor:latest
privileged: true
restart: unless-stopped
network_mode: mi-red
ports:
- "8080:8080"
grafana:
image: grafana/grafana
network_mode: mi-red
privileged: true
restart: unless-stopped
ports:
- "3000:3000"
depends_on:
- prom
alertmanager:
image: prom/alertmanager
privileged: true
restart: unless-stopped
ports:
- "9093:9093"
volumes:
- ./alertmanager/:/etc/alertmanager/
network_mode: mi-red
command:
- '--config.file=/etc/alertmanager/config.yml'
- '--storage.path=/alertmanager'
______________________
# my global config
global:
scrape_interval: 15s # By default, scrape targets every 15 seconds.
evaluation_interval: 15s # By default, scrape targets every 15 seconds.
# scrape_timeout is set to the global default (10s).
# Attach these labels to any time series or alerts when communicating with
# external systems (federation, remote storage, Alertmanager).
external_labels:
monitor: 'codelab-monitor'
# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
# - "first.rules"
# - "second.rules"
# alert
alerting:
alertmanagers:
- scheme: http
static_configs:
- targets:
- "alertmanager:9093"
# 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
# metrics_path defaults to '/metrics'
# scheme defaults to 'http'.
static_configs:
- targets: ['localhost:9090']
- job_name: "node"
scrape_interval: "15s"
static_configs:
- targets: ['exporter:9100']
##
- job_name: "cadvisor"
metrics_path: /metrics
static_configs:
- targets: ['cadvisor:8080']
## si pongo esta parte me salta el prometheus --> en targets me dice que no estan levantados esos dos pero si quito esta parte del cadvisor me coge perfecto el node-exporter y el prometheus
necesito meter cadvisor como sea