You are here

function prod_check_nagios_status_page in Production check & Production monitor 7

Same name and namespace in other branches
  1. 6 prod_check.module \prod_check_nagios_status_page()

Custom callback to override /nagios page.

1 string reference to 'prod_check_nagios_status_page'
prod_check_settings_form in includes/prod_check.admin.inc
Build settings form.

File

./prod_check.module, line 235

Code

function prod_check_nagios_status_page() {

  // Make sure this page is not cached.
  drupal_page_is_cacheable(FALSE);
  header("Pragma: no-cache");
  header("Expires: 0");
  if ($_SERVER['HTTP_USER_AGENT'] != variable_get('nagios_ua', 'Nagios')) {
    switch (variable_get('prod_check_nagios_unique', 'default')) {
      case '404':
        drupal_not_found();
        break;
      case 'home':
        drupal_goto('<front>');
        break;
      default:
        nagios_status_page();
    }
  }
  else {
    nagios_status_page();
  }
}