1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-22 02:51:03 +00:00
Munin-Contrib/plugins/moodle/moodle_users_online.php
2014-09-12 18:29:18 +02:00

31 lines
No EOL
683 B
PHP

#!/usr/bin/php
<?php
/**
* Moodle Users Online
* Munin plugin to count online users
*
* It's required to define a container entry for this plugin in your
* /etc/munin/plugin-conf.d/munin-node (or a separate and dedicated file).
*
* @example Example entry for configuration:
* [moodle*]
* env.type mysql
* env.db moodle
* env.user mysql_user
* env.pass mysql_pass
* env.host localhost
* env.port 3306
* env.table_prefix mdl_
*
* @author Arnaud Trouvé <ak4t0sh@free.fr>
* @version 1.0 2014
*
*/
$db = getenv('db');
$type = getenv('type');
$host = getenv('host');
$user = getenv('user');
$pass = getenv('pass');
$port = getenv('port');
if (!$port)
$port = 3306;