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

@ -43,17 +43,14 @@ if (count($argv) === 2 && $argv[1] === 'config') {
echo "graph_category Moodle\n";
echo "graph_scale no\n";
echo "graph_info Displays the sum of users, as well as active, suspended and deleted accounts, in your Moodle site\n";
echo "graph_total total\n";
echo "users_total.label total users\n";
echo "users_active.label active users\n";
echo "users_suspended.label suspended users\n";
echo "users_deleted.label deleted users\n";
echo "users_total.min 0\n";
echo "users_active.label active\n";
echo "users_suspended.label suspended\n";
echo "users_deleted.label deleted\n";
echo "users_active.min 0\n";
echo "users_suspended.min 0\n";
echo "users_deleted.min 0\n";
exit(0);
}
@ -65,15 +62,6 @@ try {
exit(1);
}
//All users
$nbusers = 0;
if (($stmt = $dbh->query("SELECT COUNT(id) FROM {$table_prefix}user")) != false) {
$nbusers = $stmt->fetchColumn();
}
echo "users_total.value $nbusers\n";
//Active users (not deleted or suspended)
$nbusers = 0;
if (($stmt = $dbh->query("SELECT COUNT(id) FROM {$table_prefix}user WHERE deleted=0 AND suspended=0")) != false) {