2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00
contrib-munin/plugins/moodle/moodle_users_online.php

31 lines
683 B
PHP
Raw Normal View History

2014-09-12 18:29:18 +02:00
#!/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;