ommit timestamp for now

master
Dirk Heilig 2024-08-14 16:36:13 +02:00
parent 8d8260898f
commit 7db2046042
1 changed files with 3 additions and 3 deletions

View File

@ -238,8 +238,8 @@ function output(): void
$labels .
" " .
$entry["value"] .
#" " .
#$entry["timestamp"] .
" " .
$entry["timestamp"] .
"\n";
}
file_put_contents("/www/metrics/new.prom", $prom);
@ -251,7 +251,7 @@ function filter(): void
{
global $data, $stats;
$data = array_filter($data, function ($entry) {
return $entry["timestamp"] > time() - 5 * 60; // 5 min is the hardcoded value in prometheus
return $entry["timestamp"] > time() - 60;
});
// remove stats older than 24h
foreach ($stats as $key => $values) {