From 3edcb596bbd77a5496432c2ddd5988276707ffbd Mon Sep 17 00:00:00 2001 From: Kevin Hildebrand Date: Thu, 8 Nov 2012 08:47:43 -0500 Subject: [PATCH] Add a nagios status button to host and node view --- conf_default.php.in | 4 ++++ header.php | 3 +++ 2 files changed, 7 insertions(+) diff --git a/conf_default.php.in b/conf_default.php.in index 0b718643..5846f654 100644 --- a/conf_default.php.in +++ b/conf_default.php.in @@ -362,6 +362,10 @@ $conf['overlay_events_color_map_file'] = $conf['conf_dir'] . "/event_color.json" $conf['overlay_events_tick_alpha'] = '30'; $conf['overlay_events_shade_alpha'] = '20'; +# Show a 'Nagios Status' button in node and host context +$conf['nagios_status_button'] = false; +$conf['nagios_status_url'] = 'http://localhost/nagios/cgi-bin/status.cgi'; + # Colors to use e.g. in graph_colors $conf['graph_colors'] = array("0000A3", "FF3300", "FFCC33", "00CC66", "B88A00", "33FFCC", "809900", "FF3366", "FF33CC", "CC33FF", "CCFF33", "FFFF66", "33CCFF"); diff --git a/header.php b/header.php index 40169767..5bab3a5e 100755 --- a/header.php +++ b/header.php @@ -148,6 +148,9 @@ $alt_view .= '  '; } } +if (($context == "host" || $context == "node") && $conf['nagios_status_button'] == true) { + $alt_view .= "  "; +} $data->assign("alt_view", $alt_view);