Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Prometheus_Dojo.pdf

 Prometheus_Dojo.pdf

Nesse docker meetup de halloween fizemos um DOJO sobre prometheus e vimos como monitorar alguns containers! =)

Sebastian Webber

October 31, 2018
Tweet

More Decks by Sebastian Webber

Other Decks in Programming

Transcript

  1. Prometheus DOJO
    Sebastian Webber

    View Slide

  2. https://prometheus.io/

    View Slide

  3. https://grafana.com/

    View Slide

  4. View Slide

  5. Como rodar o prometheus?
    $ docker run \
    -p 9090:9090 \
    -v $(pwd)/prometheus.yml:/etc/prometheus/prometheus.yml \
    -d \
    prom/prometheus

    View Slide

  6. Como rodar o grafana?
    $ docker run \
    -d \
    --name=grafana \
    -p 3000:3000 \
    grafana/grafana

    View Slide

  7. version: '3.1'
    volumes:
    prometheus_data: {}
    grafana_data: {}
    services:
    prometheus:
    image: prom/prometheus
    volumes:
    - ./prometheus.yml:/etc/prometheus/prometheus.yml
    - prometheus_data:/prometheus
    ports:
    - 9090:9090
    restart: always
    https://bit.ly/2qk0OU7

    View Slide

  8. https://github.com/google/cadvisor

    View Slide

  9. Como rodar o cAdvisor?
    $ docker run \
    --volume=/:/rootfs:ro \
    --volume=/var/run:/var/run:ro \
    --volume=/sys:/sys:ro \
    --volume=/var/lib/docker/:/var/lib/docker:ro \
    --volume=/dev/disk/:/dev/disk:ro \
    --publish=8080:8080 \
    --detach=true \
    --name=cadvisor \
    google/cadvisor:latest

    View Slide

  10. https://github.com/prometheus/node_exporter

    View Slide

  11. Como rodar o node_exporter?
    $ docker run -d \
    --net="host" \
    --pid="host" \
    -v "/:/host:ro,rslave" \
    quay.io/prometheus/node-exporter \
    --path.rootfs /host

    View Slide

  12. Vamos parar de passar
    trabalho?
    https://github.com/stefanprodan/dockprom

    View Slide