1
0
mirror of https://github.com/librenms/librenms-agent.git synced 2024-05-09 09:54:52 +00:00

ensure returned values do not exceed max of RRD file (#497)

This commit is contained in:
Peter Childs
2023-12-17 13:26:21 +10:30
committed by GitHub
parent 0c18d34fd1
commit 0f7ad4d23e

View File

@@ -158,6 +158,8 @@ if (!isset($called_by_script_server)) {
$output[] = $item;
}
list($short, $val) = explode(":", $item);
# ensure returned values do not exceed max limits in RRD
$val = $val % ( 124999999999 + 1 );
echo(strtolower($short).":".strtolower($val)."\n");
}
debug(array("Final result", $output));