mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 02:51:03 +00:00
Avoid negative connection count on Sphinx restart
Difference calculation can go negative when Sphinx is restarted. This makes ugly spikes in the graph.
This commit is contained in:
parent
08241c1282
commit
7ca5814ce7
1 changed files with 3 additions and 0 deletions
|
@ -54,6 +54,9 @@ if (!file_exists($sTmpFilePath)) {
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
|
|
||||||
$toShow = (int) ($iCurrent - (int) $iOldCount);
|
$toShow = (int) ($iCurrent - (int) $iOldCount);
|
||||||
|
if ($toShow < 0) {
|
||||||
|
$toShow = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "current.value $toShow\n";
|
echo "current.value $toShow\n";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue