custom-prometheus-exporter/index.php

7 lines
252 B
PHP
Raw Normal View History

2024-06-03 19:48:39 +02:00
<?php
header('Content-Type: text/plain; version=0.0.4');
$config = getenv('CONFIG_FILE');
$phpbin = getenv('PHP_BINARY');
$output = shell_exec('CONFIG_FILE="' . $config . '" ' . $phpbin . ' ' . $_SERVER['DOCUMENT_ROOT'] . 'script.php');
echo $output;