1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-22 02:51:03 +00:00

remove computed total to let munin do the work

This commit is contained in:
ak4t0sh 2014-09-15 23:10:00 +02:00
parent 5ac6279f44
commit ac1f67b28e
2 changed files with 6 additions and 22 deletions

View file

@ -56,20 +56,16 @@ if (count($argv) === 2 && $argv[1] === 'config') {
echo "graph_category Moodle\n";
echo "graph_scale no\n";
echo "graph_info Displays the sum of module, as well as module instance number by type, in your Moodle site\n";
echo "graph_total.label total\n";
foreach($data as $entry) {
echo "modules_".$entry->modulename.".label ".$entry->modulename."\n";
echo "modules_".$entry->modulename.".min 0\n";
echo "modules_".$entry->modulename.".draw AREA\n";
}
echo "modules_total.label total users\n";
echo "modules_total.min 0\n";
exit(0);
}
$total = 0;
foreach($data as $entry) {
echo "modules_".$entry->modulename.".label ".$entry->modulename."\n";
echo "modules_".$entry->modulename.".value ".$entry->moduleinstance."\n";
$total += $entry->moduleinstance;
}
echo "modules_total.value $total\n";
}