add exporters
build / build (push) Failing after 1m26s

This commit is contained in:
tchivert committed 2023-07-19 16:21:21 +02:00
1 parent f77c372067
commit 3ddcb84862
3 files changed
+120 -3

No files matched your search

+40
View File
@@ -22,6 +22,22 @@ jobs:
run: git clone https://github.com/nginxinc/nginx-prometheus-exporter nginx
- name: Checkout opcache exporter
run: git clone https://github.com/floodcode/opcache-exporter opcache
- name: Checkout apache exporter
run: git clone https://github.com/Lusitaniae/apache_exporter apache
- name: Checkout blackbox exporter
run: git clone https://github.com/prometheus/blackbox_exporter blackbox
- name: Checkout memcached exporter
run: git clone https://github.com/prometheus/memcached_exporter memcached
- name: Checkout mongodb exporter
run: git clone https://github.com/percona/mongodb_exporter mongodb
- name: Checkout mysqld exporter
run: git clone https://github.com/prometheus/mysqld_exporter mysqld
- name: Checkout node exporter
run: git clone https://github.com/prometheus/node_exporter node
- name: Checkout php_fpm exporter
run: git clone https://github.com/hipages/php-fpm_exporter php_fpm
- name: Checkout postgres exporter
run: git clone https://github.com/prometheus-community/postgres_exporter postgres
- name: Build varnish exporter
run: go build -o ../bin/varnish_exporter
@@ -35,6 +51,30 @@ jobs:
- name: Build opcache exporter
run: go build -o ../bin/opcache_exporter ./cmd/exporter
working-directory: opcache
- name: Build apache exporter
run: go build -o ../bin/apache_exporter
working-directory: apache
- name: Build blackbox exporter
run: go build -o ../bin/blackbox_exporter
working-directory: blackbox
- name: Build memcached exporter
run: go build -o ../bin/memcached_exporter
working-directory: memcached
- name: Build mongodb exporter
run: go build -o ../bin/mongodb_exporter
working-directory: mongodb
- name: Build mysqld exporter
run: go build -o ../bin/mysqld_exporter
working-directory: mysqld
- name: Build node exporter
run: go build -o ../bin/node_exporter
working-directory: node
- name: Build php_fpm exporter
run: go build -o ../bin/php_fpm_exporter
working-directory: php_fpm
- name: Build postgres exporter
run: go build -o ../bin/postgres_exporter
working-directory: postgres
- name: Create release
uses: https://gitea.com/actions/release-action@main
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2023, tchivert
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+59 -3
View File
@@ -1,10 +1,10 @@
# 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, and Opcache Exporter.
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, PHP-FPM Exporter, and PostgreSQL Exporter.
## CI Workflow
The CI workflow in this repository is triggered on every push event with tags. When a tag is pushed, the CI pipeline will be executed, building the exporters and creating a release with the built binaries.
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
@@ -32,6 +32,54 @@ The Opcache Exporter extracts metrics from PHP Opcache, allowing users to monito
GitHub Repository: [floodcode/opcache-exporter](https://github.com/floodcode/opcache-exporter)
### 5. Apache Exporter
The Apache Exporter provides Apache HTTP server metrics for Prometheus monitoring.
GitHub Repository: [Lusitaniae/apache_exporter](https://github.com/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](https://github.com/prometheus/blackbox_exporter)
### 7. Memcached Exporter
The Memcached Exporter exports Memcached server metrics for Prometheus monitoring.
GitHub Repository: [prometheus/memcached_exporter](https://github.com/prometheus/memcached_exporter)
### 8. MongoDB Exporter
The MongoDB Exporter provides MongoDB metrics for Prometheus monitoring.
GitHub Repository: [percona/mongodb_exporter](https://github.com/percona/mongodb_exporter)
### 9. MySQLD Exporter
The MySQLD Exporter exports MySQL server metrics for Prometheus monitoring.
GitHub Repository: [prometheus/mysqld_exporter](https://github.com/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](https://github.com/prometheus/node_exporter)
### 11. PHP-FPM Exporter
The PHP-FPM Exporter exports PHP-FPM pool metrics for Prometheus monitoring.
GitHub Repository: [hipages/php-fpm_exporter](https://github.com/hipages/php-fpm_exporter)
### 12. PostgreSQL Exporter
The PostgreSQL Exporter provides PostgreSQL database metrics for Prometheus monitoring.
GitHub Repository: [prometheus-community/postgres_exporter](https://github.com/prometheus-community/postgres_exporter)
## CI Workflow Details
The CI workflow consists of the following steps:
@@ -40,11 +88,19 @@ The CI workflow consists of the following steps:
2. **Checkout Exporter Repositories**: Clones the repositories of each exporter mentioned above, so their source code is available for building.
3. **Build Exporters**: The exporters are built using Go build commands:
3. **Build Exporters**: The exporters are built using Go build commands, and the resulting binaries are stored in the `bin` directory:
- Varnish Exporter: `go build -o ../bin/varnish_exporter` in the `varnish` directory.
- Redis Exporter: `go build -o ../bin/redis_exporter` in the `redis` directory.
- Nginx Exporter: `go build -o ../bin/nginx_exporter` in the `nginx` directory.
- Opcache Exporter: `go build -o ../bin/opcache_exporter ./cmd/exporter` in the `opcache` directory.
- Apache Exporter: `go build -o ../bin/apache_exporter` in the `apache` directory.
- Blackbox Exporter: `go build -o ../bin/blackbox_exporter` in the `blackbox` directory.
- Memcached Exporter: `go build -o ../bin/memcached_exporter` in the `memcached` directory.
- MongoDB Exporter: `go build -o ../bin/mongodb_exporter` in the `mongodb` directory.
- MySQLD Exporter: `go build -o ../bin/mysqld_exporter` in the `mysqld` directory.
- Node Exporter: `go build -o ../bin/node_exporter` in the `node` directory.
- PHP-FPM Exporter: `go build -o ../bin/php_fpm_exporter` in the `php_fpm` directory.
- PostgreSQL Exporter: `go build -o ../bin/postgres_exporter` in the `postgres` directory.
4. **Create Release**: The CI workflow uses the `gitea.com/actions/release-action` to create a release. It packages the built exporter binaries (located in the `bin` directory) and attaches them to the release.