Hi Team,
When displaying any Status URLs on Dashboards - Can we customize the Out-Of-Box Column list :
Host
Service
Status
Duration
Attempt
Last Check
Status Information
to exclude few of them like Duration & Attempt, and include any custom fields/columns from free variables ?
-- Vamsi
Dashboard / Service Status Column Selection
-
veeravamsi
- Posts: 145
- Joined: Wed Jan 23, 2019 3:35 am
Dashboard / Service Status Column Selection
You do not have the required permissions to view the files attached to this post.
Re: Dashboard / Service Status Column Selection
This would require modifications to at least /usr/local/nagiosxi/html/includes/components/xicore/ajaxhelpers-hoststatus.inc.php and /usr/local/nagiosxi/html/includes/components/xicore/ajaxhelpers-servicestatus.inc.php. ajaxhelpers-servicestatus.inc.php for example has these sections:
removing or moving a field would just be a matter of removing desired lines or reodering them. Adding to to the table would be trickier. Since we generally don't advise making direct changes to files like this, I can filed a feature request if you'd like.
Code: Select all
// Table row output
$output .= "<tr class='" . $rowclass . "'>
<td style='white-space: nowrap' class='" . $host_status_class . "'>" . $host_name_cell . "</td>
<td style='white-space: nowrap'>" . $service_name_cell . "</td><td class='" . $service_status_class . "'>" . $status_cell . "</td>
<td nowrap>" . $statedurationstr . "</td>
<td>" . $current_attempt . "/" . $max_attempts . "</td>
<td nowrap>" . $last_check . "</td>
<td>" . $status_info . "</td>";Code: Select all
// Sorted table header
$output .= sorted_table_header($sortby, $sortorder, "", _("Host"), $extra_args, "", $url);
$output .= sorted_table_header($sortby, $sortorder, "service_description", _("Service"), $extra_args, "", $url);
$output .= sorted_table_header($sortby, $sortorder, "current_state", _("Status"), $extra_args, "", $url);
$output .= sorted_table_header($sortby, $sortorder, "last_state_change", _("Duration"), $extra_args, "", $url);
$output .= sorted_table_header($sortby, $sortorder, "current_check_attempt", _("Attempt"), $extra_args, "", $url);
$output .= sorted_table_header($sortby, $sortorder, "last_check", _("Last Check"), $extra_args, "", $url);
$output .= sorted_table_header($sortby, $sortorder, "status_text", _("Status Information"), $extra_args, "", $url);As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
veeravamsi
- Posts: 145
- Joined: Wed Jan 23, 2019 3:35 am
Re: Dashboard / Service Status Column Selection
Awesome . Thank you . One question would this change impact all the pages/Status .. Can i limit this to one Page or Dashboard ?
Re: Dashboard / Service Status Column Selection
This would impact all pages. I've not found a way to limit it but can include that in a feature request.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.