Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a nagios status button to host and node view #139

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions conf_default.php.in
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down
3 changes: 3 additions & 0 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@
$alt_view .= '&nbsp;&nbsp;<button onclick="return false" id="delete_view_button">Delete View</button>';
}
}
if (($context == "host" || $context == "node") && $conf['nagios_status_button'] == true) {
$alt_view .= "&nbsp;&nbsp;<button class=\"header_btn\" onclick=\"window.location='${conf['nagios_status_url']}?host=$hostname';return false;\">Nagios Status</button>";
}

$data->assign("alt_view", $alt_view);

Expand Down