1
0
mirror of https://github.com/chylex/Apache-Prometheus-Exporter.git synced 2024-11-24 13:42:52 +01:00
Apache-Prometheus-Exporter/docker
2023-09-30 23:40:04 +02:00
..
config Add Docker Compose example 2022-12-15 16:24:45 +01:00
docker-compose.yml Use SIGINT stop signal in Docker Compose example 2023-09-30 23:40:04 +02:00
README.md Expose metrics web server port in Docker Compose example 2023-09-30 23:20:03 +02:00

Apache Prometheus Exporter - Docker Example

Here you can find an example Docker Compose configuration you can use to develop and test the exporter.

This configuration will create a Docker volume for the logs, and the following containers:

  1. Apache running on 3 ports, each of which has its own access log:
  2. Grafana running on http://localhost:2000 with a pre-configured Prometheus data source.
    • User : admin
    • Password : admin
  3. Prometheus configured with the exporter's endpoint.
  4. Exporter built using the source code from this repository, with its metrics endpoint exposed as: http://localhost:2004/metrics

This example is unsuitable for production. You can use it as inspiration, but you will have to modify it in order to persist container data and follow the latest security practices:

  • Create Docker volumes for persistent storage of container data and configuration files
  • Create a dedicated user for each container instead of running as root
  • Customize the configuration of every containerized application for your needs
  • Use HTTPS for all domains served by Apache
  • Have Apache act as a reverse proxy for Grafana instead of exposing Grafana's web server port
  • Use a strong password for Grafana and pass it via Docker secrets instead of environment variables