From d835b61469d57623c5028609e9a75e829c0384fa Mon Sep 17 00:00:00 2001 From: Peter Childs Date: Tue, 21 Nov 2023 23:29:31 +0000 Subject: [PATCH] ensure returned values do not exceed max of RRD file --- snmp/mysql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/snmp/mysql b/snmp/mysql index 530637352..d7ac4f09a 100755 --- a/snmp/mysql +++ b/snmp/mysql @@ -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));