Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

docker-compose with Prometheus + Alertmanager + Grafana

License

Notifications You must be signed in to change notification settings

ialejandro/docker-full-monitoring

Repository files navigation

Docker: Prometheus + Alertmanager + Grafana

Deploy a full monitoring stack with basic configuration (Prometheus, Alertmanager, Node Exporter, Blackbox Exporter and Grafana).

It's only for develop environments and learn how-to use Prometheus monitoring.

Requirements

  • docker-compose installed.
  • docker version 18.06.0+ or above.

Quick start

Initialize Stack

  • Deploy configs.
  • Started containers.
$ ./initialize_stack.sh

Remove Stack

  • Remove configs.
  • Stop and remove containers.
$ ./remove_stack.sh

Services

Prometheus

  • Name Container: prometheus
  • Image: prom/prometheus:latest
  • Port: 9090
  • Configuration: /srv/prometheus/prometheus.yml
  • Rules: /srv/prometheus/rules.d/*.yml

Alertmanager

  • Name Container: alertmanager
  • Image: prom/alertmanager:latest
  • Port: 9093
  • Configuration: /srv/alertmanager/alertmanager.yml

Grafana

  • Name Container: grafana
  • Image: grafana/grafana:latest
  • Port: 3000
  • Provisioning: /srv/grafana/provisioning
  • Dashboards: /srv/grafana/dashboards

Dashboards

By default exists the Node Exporter dashboard (id: 1860). If you want added new dashboards, use Grafana provisioning function to save the dashboards. Only need create .json file on configs/grafana/dashboards folder.

Check the currently configs/grafana/provisioning folders to see the demo configuration.

Datasources

By default exists the Prometheus datasource. If the dashboard uses another datasource -- non-default Prometheus datasource--, please, added on datasources the new .yml file.

Check the currently configs/grafana/provisioning folders to see the demo configuration.

Exporters

Blackbox Exporter

  • Name Container: blackbox_exporter
  • Image: prom/blackbox-exporter
  • Port: 9115
  • Configuration: /srv/blackbox_exporter/blackbox.yml

Node Exporter

  • Name Container: node_exporter
  • Image: prom/node-exporter:latest
  • Port: 9100

Contributing

Refer to CONTRIBUTING.md.

License

Apache License 2.0. Refer to LICENSE.