UI Change Request 2
UI Change Request 2
Nagios XI 2012R2.9
Offloaded DB
RHEL 6.5 x64
Manual Install
Please refer to the attached pic, the list is not sorted.
The user has to scroll up and down to find the correct host group.
Offloaded DB
RHEL 6.5 x64
Manual Install
Please refer to the attached pic, the list is not sorted.
The user has to scroll up and down to find the correct host group.
You do not have the required permissions to view the files attached to this post.
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
RHEL 6 & 7
rrdcached & ramdisk optimisation
Re: UI Change Request 2
I have opened an internal bug report. Thanks for the report!
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: UI Change Request 2
I might have a fix for this - checking with devs. Will update post when I know more.
Edit the /usr/local/nagiosxi/html/reports/execsummary.php file to change the following:
to
beginning on line 241. Note that other reports like the SLA will need to be similarly changed, but in the meantime this will work. The devs should hopefully be fixing this for all reports.
Edit the /usr/local/nagiosxi/html/reports/execsummary.php file to change the following:
Code: Select all
<select name="hostgroup" id="hostgroupList" style="width: 150px;">
<option value=""><?php echo gettext("Hostgroup"); ?>:</option>
<?php
$oxml=get_xml_hostgroup_objects();
if($oxml){
foreach($oxml->hostgroup as $hg){
$name=strval($hg->hostgroup_name);
echo "<option value='".$name."' ".is_selected($hostgroup,$name).">$name</option>\n";
}
}
?>
</select>
<select name="servicegroup" id="servicegroupList" style="width: 150px;">
<option value=""><?php echo gettext("Servicegroup"); ?>:</option>
<?php
$oxml=get_xml_servicegroup_objects();
if($oxml){
foreach($oxml->servicegroup as $sg){
$name=strval($sg->servicegroup_name);
echo "<option value='".$name."' ".is_selected($servicegroup,$name).">$name</option>\n";
}
}
?>
</select>
Code: Select all
<select name="hostgroup" id="hostgroupList" style="width: 150px;">
<option value=""><?php echo gettext("Hostgroup"); ?>:</option>
<?php
$hg_array = array();
$oxml=get_xml_hostgroup_objects();
if($oxml){
foreach($oxml->hostgroup as $hg){
$name=strval($hg->hostgroup_name);
$hg_array["$name"] = "<option value='".$name."' ".is_selected($hostgroup,$name).">$name</option>\n";
}
sort($hg_array);
foreach($hg_array as $name => $html) {
echo $html;
}
}
?>
</select>
<select name="servicegroup" id="servicegroupList" style="width: 150px;">
<option value=""><?php echo gettext("Servicegroup"); ?>:</option>
<?php
$sg_array = array();
$oxml=get_xml_servicegroup_objects();
if($oxml){
foreach($oxml->servicegroup as $sg){
$name=strval($sg->servicegroup_name);
$sg_array["$name"] = "<option value='".$name."' ".is_selected($servicegroup,$name).">$name</option>\n";
}
}
sort($sg_array);
foreach($sg_array as $name => $html) {
echo $html;
}
?>
</select>
Former Nagios employee
Re: UI Change Request 2
Mine does not look the same as yours. Please double confirm the version this is for.tmcdonald wrote:I might have a fix for this - checking with devs. Will update post when I know more.
Edit the /usr/local/nagiosxi/html/reports/execsummary.php file to change the following:
toCode: Select all
<select name="hostgroup" id="hostgroupList" style="width: 150px;"> <option value=""><?php echo gettext("Hostgroup"); ?>:</option> <?php $oxml=get_xml_hostgroup_objects(); if($oxml){ foreach($oxml->hostgroup as $hg){ $name=strval($hg->hostgroup_name); echo "<option value='".$name."' ".is_selected($hostgroup,$name).">$name</option>\n"; } } ?> </select> <select name="servicegroup" id="servicegroupList" style="width: 150px;"> <option value=""><?php echo gettext("Servicegroup"); ?>:</option> <?php $oxml=get_xml_servicegroup_objects(); if($oxml){ foreach($oxml->servicegroup as $sg){ $name=strval($sg->servicegroup_name); echo "<option value='".$name."' ".is_selected($servicegroup,$name).">$name</option>\n"; } } ?> </select>
beginning on line 241. Note that other reports like the SLA will need to be similarly changed, but in the meantime this will work. The devs should hopefully be fixing this for all reports.Code: Select all
<select name="hostgroup" id="hostgroupList" style="width: 150px;"> <option value=""><?php echo gettext("Hostgroup"); ?>:</option> <?php $hg_array = array(); $oxml=get_xml_hostgroup_objects(); if($oxml){ foreach($oxml->hostgroup as $hg){ $name=strval($hg->hostgroup_name); $hg_array["$name"] = "<option value='".$name."' ".is_selected($hostgroup,$name).">$name</option>\n"; } sort($hg_array); foreach($hg_array as $name => $html) { echo $html; } } ?> </select> <select name="servicegroup" id="servicegroupList" style="width: 150px;"> <option value=""><?php echo gettext("Servicegroup"); ?>:</option> <?php $sg_array = array(); $oxml=get_xml_servicegroup_objects(); if($oxml){ foreach($oxml->servicegroup as $sg){ $name=strval($sg->servicegroup_name); $sg_array["$name"] = "<option value='".$name."' ".is_selected($servicegroup,$name).">$name</option>\n"; } } sort($sg_array); foreach($sg_array as $name => $html) { echo $html; } ?> </select>
See attached execsummary.php.
You do not have the required permissions to view the files attached to this post.
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
RHEL 6 & 7
rrdcached & ramdisk optimisation
Re: UI Change Request 2
Our two versions are different, yes. Looking at yours the changes begin on line 212 and go to line 235, and in mine there is an extra "style" parameter that should not affect anything. Other than that they are the same as far as this patch goes.
Former Nagios employee
Re: UI Change Request 2
I am not comfortable introducing change that is not based on the same version. There might be some other changes that possibly not considered.tmcdonald wrote:Our two versions are different, yes. Looking at yours the changes begin on line 212 and go to line 235, and in mine there is an extra "style" parameter that should not affect anything. Other than that they are the same as far as this patch goes.
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
RHEL 6 & 7
rrdcached & ramdisk optimisation
Re: UI Change Request 2
I just manually configured a new 2012R2.9 server and applied the patch myself - it works:
Line 212 is the beginning of the <select> for hostgroups, and line 235 is the end of the <select> for servicegroups. All of the changes should be made in-between those lines. The only difference is that you will not have the CSS width attribute, which will not affect the functionality.
Line 212 is the beginning of the <select> for hostgroups, and line 235 is the end of the <select> for servicegroups. All of the changes should be made in-between those lines. The only difference is that you will not have the CSS width attribute, which will not affect the functionality.
You do not have the required permissions to view the files attached to this post.
Former Nagios employee
Re: UI Change Request 2
Ok. Thanks for the confirmation.tmcdonald wrote:I just manually configured a new 2012R2.9 server and applied the patch myself - it works:
Line 212 is the beginning of the <select> for hostgroups, and line 235 is the end of the <select> for servicegroups. All of the changes should be made in-between those lines. The only difference is that you will not have the CSS width attribute, which will not affect the functionality.
Removed line 212 to 235 from original file and pasted your code.
The list is sorted now but the page does not produce any reports.
Noticed the following errors in the httpd error log. This errors are still there from the original version but it seems to be working.
Code: Select all
[Tue Jun 24 07:26:51 2014] [error] [client 10.17.44.201] PHP Notice: Undefined variable: data in /usr/local/nagiosxi/html/reports/availability.php on line 98, referer: http://10.17.19.235/nagiosxi/reports/execsummary.php
[Tue Jun 24 07:26:51 2014] [error] [client 10.17.44.201] PHP Warning: Invalid argument supplied for foreach() in /usr/local/nagiosxi/html/reports/availability.php on line 98, referer: http://10.17.19.235/nagiosxi/reports/execsummary.php
[Tue Jun 24 07:26:51 2014] [error] [client 10.17.44.201] PHP Notice: Undefined variable: xdata in /usr/local/nagiosxi/html/reports/availability.php on line 111, referer: http://10.17.19.235/nagiosxi/reports/execsummary.php
[Tue Jun 24 07:26:51 2014] [error] [client 10.17.44.201] PHP Notice: Undefined variable: data in /usr/local/nagiosxi/html/reports/availability.php on line 98, referer: http://10.17.19.235/nagiosxi/reports/execsummary.php
[Tue Jun 24 07:26:51 2014] [error] [client 10.17.44.201] PHP Warning: Invalid argument supplied for foreach() in /usr/local/nagiosxi/html/reports/availability.php on line 98, referer: http://10.17.19.235/nagiosxi/reports/execsummary.php
[Tue Jun 24 07:26:51 2014] [error] [client 10.17.44.201] PHP Notice: Undefined variable: xdata in /usr/local/nagiosxi/html/reports/availability.php on line 111, referer: http://10.17.19.235/nagiosxi/reports/execsummary.php
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
RHEL 6 & 7
rrdcached & ramdisk optimisation
Re: UI Change Request 2
I'm a bit confused here. Those errors are from the Availability Report but we were working on the Executive Summary. Which of these are you seeing issues with?
Former Nagios employee
Re: UI Change Request 2
Sorry for the confusion, this was FYI on the possible issues on the other report. There was no errors in Executive Summary but nothing came out after making the changes.tmcdonald wrote:I'm a bit confused here. Those errors are from the Availability Report but we were working on the Executive Summary. Which of these are you seeing issues with?
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
RHEL 6 & 7
rrdcached & ramdisk optimisation