1
0
mirror of https://github.com/chylex/Apache-Prometheus-Exporter.git synced 2024-11-24 22:42:52 +01:00
Apache-Prometheus-Exporter/docker
2023-01-07 17:27:25 +01:00
..
config Add Docker Compose example 2022-12-15 16:24:45 +01:00
docker-compose.yml Add support for watching error log files & add apache_errors_total metric 2023-01-07 17:27:25 +01:00
README.md Add Docker Compose example 2022-12-15 16:24:45 +01: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.

This example is not suitable 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