Skip to content

Commit

Permalink
ensure returned values do not exceed max of RRD file (#497)
Browse files Browse the repository at this point in the history
  • Loading branch information
peejaychilds authored Dec 17, 2023
1 parent 0c18d34 commit 0f7ad4d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions snmp/mysql
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 0f7ad4d

Please sign in to comment.