Skip to content

A repo that contains a prometheus, grafana, consul service discovery configuration along with alertmanager

Notifications You must be signed in to change notification settings

awsprof/prometheus-service-discovery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Service Discovery using Consul for Prometheus as Docker containers

WHY this?

I found several examples of prometheus and grafana within docker containers. However, I could not find one example where Prometheus Service Discovery via Consul worked completely within Docker containers including Alert Manager. Had to put this together to ensure it helped someone who needed it.

Description

A simple docker-compose configuration that allows the following services to run as docker containers

  • prometheus
  • grafana
  • cadvisor
  • consul
  • node-exporter
  • alert-manager sending alerts to slack

All the configuration items are there. Alert Manager rules can be extended and when new serivces are registered with Consul, Prometheus auto discovers the services.

Installation

  • Edit the file data/alertmanager.yml
  • Replace the placeholder <<API_URL>> with your Slack webhook URL
api_url: <<API_URL>> ##webhook url
  • Replace the placeholder <> with your Slack channel. Leave the # Symbol in
channel: "#<<CHANNEL>>"
  • Run the following from the root folder
docker-compose up -d

Removing the containers

  • Run the following from the root folder
docker-compose down --remove-orphans

URLs to access

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

About

A repo that contains a prometheus, grafana, consul service discovery configuration along with alertmanager

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages