Birdseye view, love it but hate it too

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
SteveBeauchemin
Posts: 524
Joined: Mon Oct 14, 2013 7:19 pm

Birdseye view, love it but hate it too

Post by SteveBeauchemin »

To get the most performance possible in the Nagios GUI I have made some small edits to timings and intervals.

One such change is to the Quick-View -> Birdseye - which was causing me grief without being obvious.
I needed to change timings in there that were coded into the javascript. I made changes as shown.

Code: Select all

cd /usr/local/nagiosxi/html/includes/components/birdseye/includes
vi main.js
Change the following lines:
from

Code: Select all

    // Display simple JS clock
    setInterval('update_clock()', 1000);
 
    // Display updates
    setInterval('update_display_view(show_handled)', 10000);
    setInterval('update_display_view(show_soft)', 10000);
    setInterval('update_display_list(show_handled)', 10000);
    setInterval('update_display_list(show_soft)', 10000);
to

Code: Select all

    // Display simple JS clock
    // changed to refresh one time per minute
    setInterval('update_clock()', 60000);
 
    // Display updates once a minute
    setInterval('update_display_view(show_handled)', 60000);
    setInterval('update_display_view(show_soft)', 60000);
    setInterval('update_display_list(show_handled)', 60000);
    setInterval('update_display_list(show_soft)', 60000);
Since the clock only updates once a minute now, there is no need to show the seconds
At bottom of the same file change

Code: Select all

var str = hours + ":" + minutes + ":" + seconds + " " + post;
to

Code: Select all

var str = hours + ":" + minutes + " " + post;
Next you have to tell the browser that the javascript in cache needs to be updated. To force this you have to increment the version number in the php code.

Code: Select all

cd /usr/local/nagiosxi/html/includes/components/birdseye
vi birdseye.php
Find and change from:

Code: Select all

 <script type="text/javascript" src="includes/main.js"></script>
to:

Code: Select all

<script type="text/javascript" src="includes/main.js?v=1.1"></script>
If there are ever changes to the javascript from this point forward, then the v=1.1 needs to change and the browser will update the cached javascript file.

This reduces load on the httpd processes and requires less overhead as the end user web browser requests refreshes less often. Birdseye had been grabbing a TON of data every 10 seconds. With a large site, you can tell that something is using resources.

Without these changes, if someone leaves the Birdseye view running overnight, my ipcs queue will eventually climb to more than a million backlogged items. Then the full queue will make the DB start to lose data. I finally got the javascript refresh piece figured out. I had made the change, but the workstations cache the js files and never refresh them.

But not any more.

If anyone is running a large installation, this simple refresh timing thing could be causing performance issues. I find that GUI refreshes less than one minute make no difference to the tool users. I have increased all the settings I can find such that GUI refreshes do not impact my server. One at a time, find and change. I have not heard that anyone even noticed. But the tool is definitely running better.
XI 5.7.3 / Core 4.4.6 / NagVis 1.9.8 / LiveStatus 1.5.0p11 / RRDCached 1.7.0 / Redis 3.2.8 /
SNMPTT / Gearman 0.33-7 / Mod_Gearman 3.0.7 / NLS 2.0.8 / NNA 2.3.1 /
NSClient 0.5.0 / NRPE Solaris 3.2.1 Linux 3.2.1 HPUX 3.2.1
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Birdseye view, love it but hate it too

Post by dwhitfield »

Thanks as always, Steve! Did you having anything else to add, or should we lock it up?
SteveBeauchemin
Posts: 524
Joined: Mon Oct 14, 2013 7:19 pm

Re: Birdseye view, love it but hate it too

Post by SteveBeauchemin »

Sure - Lock is okay. I hope the changes I detailed help others. It is the little things that matter sometimes. When there are many little things, they sometimes add up to a big thing.

Thanks

Steve B
XI 5.7.3 / Core 4.4.6 / NagVis 1.9.8 / LiveStatus 1.5.0p11 / RRDCached 1.7.0 / Redis 3.2.8 /
SNMPTT / Gearman 0.33-7 / Mod_Gearman 3.0.7 / NLS 2.0.8 / NNA 2.3.1 /
NSClient 0.5.0 / NRPE Solaris 3.2.1 Linux 3.2.1 HPUX 3.2.1
Locked