Page 1 of 1
Metrics auto running
Posted: Mon Oct 20, 2014 11:02 am
by BanditBBS
Not sure when this started happening. Running 2014r1.5 here and my performance settings are set so nothing auto runs. Everything seems to behaving as desired except metrics, they are still auto running.
Can someone verify its a bug and not just my server?
Re: Metrics auto running
Posted: Mon Oct 20, 2014 11:59 am
by lmiltchev
Do you have anything selected under the "Auto-running Page Performance Options" section?
Admin->Performance Settings->Auto-Running tab
Re: Metrics auto running
Posted: Mon Oct 20, 2014 12:01 pm
by BanditBBS
lmiltchev wrote:Do you have anything selected under the "Auto-running Page Performance Options" section?
Admin->Performance Settings->Auto-Running tab
That is why I said my performance settings are set properly. Both check boxes are checked. Reports are not auto running, but metrics are.
Before you ask, I unchecked it, applied settings and then rechecked it again, metrics are still auto running.
Re: Metrics auto running
Posted: Mon Oct 20, 2014 5:09 pm
by lmiltchev
I will talk to the devs and will get back to you sometime tomorrow. I am able to recreate the issue. Not sure if it is a bug but it sure looks like it.
Re: Metrics auto running
Posted: Mon Oct 20, 2014 5:20 pm
by tmcdonald
I got your back:
/usr/local/nagiosxi/html/includes/components/metrics/index.php line 158 modify as so:
Code: Select all
</select>
<input type="text" name="maxitems" value="<?php echo htmlentities($maxitems);?>" size="2">
<input type="submit" class="submitbutton" name="goButton" value="<?php echo $lstr['UpdateButton'];?>" id="goButton">
<input type="hidden" name="manual_run" value="1">
</form>
<script type="text/javascript">
$(document).ready(function(){
$('#servicegroupList').change(function() {
$('#hostgroupList').val('');
});
$('#hostgroupList').change(function() {
$('#servicegroupList').val('');
});
});
</script>
<?php
// Die right here if we don't want to auto-load the page
$manual_run = grab_request_var("manual_run", 0);
$disable_metrics_auto_run = get_option("disable_metrics_auto_run", 0);
if ($disable_metrics_auto_run == 1 && $manual_run == 0) {
die();
}
?>
The lines that are being added are:
Code: Select all
<input type="hidden" name="manual_run" value="1">
in the HTML form code and
Code: Select all
<?php
// Die right here if we don't want to auto-load the page
$manual_run = grab_request_var("manual_run", 0);
$disable_metrics_auto_run = get_option("disable_metrics_auto_run", 0);
if ($disable_metrics_auto_run == 1 && $manual_run == 0) {
die();
}
?>
just above the div for the tabs.
Re: Metrics auto running
Posted: Tue Oct 21, 2014 8:42 am
by BanditBBS
That fixed it...hopefully they are putting that code back into the commit. I know it used to be in there.
Re: Metrics auto running
Posted: Tue Oct 21, 2014 9:31 am
by abrist
Indeed it used to be. This will be fixed in the next component version.