View source
<?php
function nagios_uninstall() {
variable_del('nagios_updates');
variable_del('nagios_ua');
variable_del('nagios_enable_status_page');
variable_del('nagios_show_outdated_names');
variable_del('nagios_status_ok_value');
variable_del('nagios_status_warning_value');
variable_del('nagios_status_critical_value');
variable_del('nagios_status_unknown_value');
}
function nagios_requirements($phase) {
$requirements = array();
if ($phase == 'runtime') {
if (variable_get('nagios_ua', '') == '') {
$requirements['nagios'] = array(
'title' => t('Nagios module'),
'value' => t('Not configured'),
'description' => t('Nagios module has not been configured yet. Please configure its settings from the <a href="@url">Nagios settings page</a>.', array(
'@url' => url('admin/settings/nagios'),
)),
'severity' => REQUIREMENT_WARNING,
);
}
}
return $requirements;
}
function nagios_update_6100() {
$return_message = array();
variable_set('nagios_status_ok_value', 0);
variable_set('nagios_status_unknown_value', 1);
variable_set('nagios_status_warning_value', 2);
variable_set('nagios_status_critical_value', 3);
$return_message[] = array(
'success' => true,
'query' => 'Set variables so Nagios status values are set to old settings on update.',
);
return $return_message;
}