Prometheus Exporters Repository
This repository contains Continuous Integration (CI) tasks that build various Prometheus exporters and package them into a release. The exporters included in this repository are the Varnish Exporter, Redis Exporter, Nginx Exporter, Opcache Exporter, Apache Exporter, Blackbox Exporter, Memcached Exporter, MongoDB Exporter, MySQLD Exporter, Node Exporter, PHPFPM Exporter, and PostgreSQL Exporter.
CI Workflow
The CI workflow in this repository is triggered on every push event with tags matching 'latest'. When such a tag is pushed, the CI pipeline will be executed, building the exporters and creating a release with the built binaries.
Exporters
1. Varnish Exporter
The Varnish Exporter is responsible for scraping metrics from a Varnish Cache instance and exposing them in a format suitable for Prometheus.
GitHub Repository: jonnenauha/prometheus_varnish_exporter
2. Redis Exporter
The Redis Exporter collects and exports various Redis metrics to Prometheus, providing insights into the performance and health of Redis servers.
GitHub Repository: oliver006/redis_exporter
3. Nginx Exporter
The Nginx Exporter exports metrics from Nginx web servers, helping monitor the web server's performance and resource usage.
GitHub Repository: nginxinc/nginx-prometheus-exporter
4. Opcache Exporter
The Opcache Exporter extracts metrics from PHP Opcache, allowing users to monitor PHP opcode cache statistics.
GitHub Repository: floodcode/opcache-exporter
5. Apache Exporter
The Apache Exporter provides Apache HTTP server metrics for Prometheus monitoring.
GitHub Repository: Lusitaniae/apache_exporter
6. Blackbox Exporter
The Blackbox Exporter allows blackbox probing of endpoints over various protocols, enabling monitoring of endpoints from the perspective of the Prometheus server.
GitHub Repository: prometheus/blackbox_exporter
7. Memcached Exporter
The Memcached Exporter exports Memcached server metrics for Prometheus monitoring.
GitHub Repository: prometheus/memcached_exporter
8. MongoDB Exporter
The MongoDB Exporter provides MongoDB metrics for Prometheus monitoring.
GitHub Repository: percona/mongodb_exporter
9. MySQLD Exporter
The MySQLD Exporter exports MySQL server metrics for Prometheus monitoring.
GitHub Repository: prometheus/mysqld_exporter
10. Node Exporter
The Node Exporter exposes various server metrics for Prometheus, such as CPU, memory, disk, and network statistics.
GitHub Repository: prometheus/node_exporter
11. PHPFPM Exporter
The PHPFPM Exporter exports PHPFPM pool metrics for Prometheus monitoring.
GitHub Repository: Lusitaniae/phpfpm_exporter
12. PostgreSQL Exporter
The PostgreSQL Exporter provides PostgreSQL database metrics for Prometheus monitoring.
GitHub Repository: prometheus-community/postgres_exporter
13. Elasticsearch Exporter
The Elasticsearch Exporter provides Elasticsearch database metrics for Prometheus monitoring.
GitHub Repository: prometheus-community/elasticsearch_exporter
CI Workflow Details
The CI workflow consists of the following steps:
-
Setup Go Environment: Sets up the Go environment with a version greater than or equal to 1.20, ensuring that the exporters can be built.
-
Checkout Exporter Repositories: Clones the repositories of each exporter mentioned above, so their source code is available for building.
-
Build Exporters: The exporters are built using Go build commands, and the resulting binaries are stored in the
bindirectory:- Varnish Exporter
- Redis Exporter
- Nginx Exporter
- Opcache Exporter
- Apache Exporter
- Blackbox Exporter
- Memcached Exporter
- MongoDB Exporter
- MySQLD Exporter
- Node Exporter
- PHPFPM Exporter
- PostgreSQL Exporter
-
Create Release: The CI workflow uses the
gitea.com/actions/release-actionto create a release. It packages the built exporter binaries (located in thebindirectory) and attaches them to the release.
Release Token
To enable the CI pipeline to create a release, a release token must be configured as a secret in the repository settings. The token should be stored securely and provided as an environment variable (${{secrets.RELEASE_TOKEN}}) during the release creation step.
Note: Ensure that the appropriate permissions and scopes are granted to the release token to create releases and upload artifacts.
For more information on configuring repository secrets, please refer to the GitHub documentation: Creating encrypted secrets for a repository.