A custom prometheus exportor
Go to file
Jeroen De Meerleer f06c804c24
Updated response handling and added 404 page
The code changes include an update to the response handling in index.php. Now, it checks if the request URI is '/metrics'. If so, it continues with the previous behavior of executing a script and outputting its result. If not, it loads a new 404 error page using Twig templating engine.

A new file '404.twig' has been added under templates directory which serves as a custom 404 error page. It displays the requested URI and provides a link back to '/metrics'.
2024-06-13 16:03:44 +02:00
templates Updated response handling and added 404 page 2024-06-13 16:03:44 +02:00
.gitignore Update gitignore to exclude config files, refactor index.php for dynamic configuration file loading and caching. 2024-06-05 08:33:29 +02:00
.htaccess Introduced .htaccess file and refactored index.php 2024-06-13 13:41:31 +02:00
composer.json Added the first code 2024-06-03 19:48:39 +02:00
composer.lock Added the first code 2024-06-03 19:48:39 +02:00
config.example.php Update metrics configuration with new CPU, memory, disk usage, website status, and HTTP request count metrics. Add submetrics for detailed monitoring. 2024-06-05 08:33:35 +02:00
dockerfile Added Dockerfile for PHP with Apache 2024-06-13 13:42:19 +02:00
index.php Updated response handling and added 404 page 2024-06-13 16:03:44 +02:00
LICENCE.md Added readme and licence 2024-06-03 19:48:39 +02:00
README.md Added readme and licence 2024-06-03 19:48:39 +02:00
script.php Refactored script for better readability 2024-06-13 15:52:08 +02:00

Custom Prometheus

Copyright (c) 2024- Jeroen De Meerleer me@jeroened.be

A script to add custom prometheus exporters. Output is received from external scripts and urls.

Licence

Copyright (c) 2024- Jeroen De Meerleer <me@jeroened.be>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.