Metrics auto running

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Metrics auto running

Post 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?
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Metrics auto running

Post by lmiltchev »

Do you have anything selected under the "Auto-running Page Performance Options" section?

Admin->Performance Settings->Auto-Running tab
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Metrics auto running

Post 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.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Metrics auto running

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Metrics auto running

Post 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.
Former Nagios employee
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Metrics auto running

Post by BanditBBS »

That fixed it...hopefully they are putting that code back into the commit. I know it used to be in there.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Metrics auto running

Post by abrist »

Indeed it used to be. This will be fixed in the next component version.
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.
Locked