t('Munin plugin modules'),
'value' => t('No plugin found'),
'description' => t('Munin API is enabled, but does not find any plugin, including the one built into the API.'),
'severity' => REQUIREMENT_ERROR,
);
break;
case 1:
$req = array(
'title' => t('Munin plugin modules'),
'value' => t('No Munin plugin module enabled beyond API'),
'description' => t('Munin API is enabled, but no plugin module is enabled to report to it except the one built within the API. You should either enable some plugin modules or disable and uninstall Munin API.', array(
'!link' => url('admin/build/modules'),
)),
'severity' => REQUIREMENT_INFO,
);
break;
default:
$req = array(
'title' => t('Munin plugin modules'),
// format plural although $count >= 2 because some languages have several plural forms
'value' => format_plural($count, '1 Munin plugin enabled.',
'@count Munin plugins enabled.', array('!link' => url('admin/reports/munin_api'))),
'severity' => REQUIREMENT_OK,
);
}
$ret[] = $req;
}
elseif ($phase != 'install') {
// This should never happen and points to a severe error somewhere
watchdog('munin_api', 'Invalid phase %phase passed to %function', array(
'%phase' => $phase,
'%function' => __FUNCTION__,
), WATCHDOG_ERROR);
}
// else $phase == 'install', nothing to do.
return $ret;
}
/**
* Implements hook_uninstall()
*/
function munin_api_uninstall() {
$vars = array(
'init_path',
'last',
'next_report',
'watchdog',
);
foreach ($vars as $tail) {
$name = 'munin_api_'. $tail;
variable_del($name);
}
}