1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41:03 +00:00

Avoid negative queries 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:
Lars Windolf 2014-01-07 15:28:01 +01:00
parent 7ca5814ce7
commit b32ff11c61

View file

@ -54,6 +54,9 @@ if (!file_exists($sTmpFilePath)) {
fclose($fp);
$toShow = (int) ($iCurrent - (int) $iOldCount);
if ($toShow < 0) {
$toShow = 0;
}
}
echo "current.value $toShow\n";