Page 1 of 1

Graph Explorer no longer properly loading

Posted: Fri Sep 22, 2023 12:26 pm
by ScottMc
On loading Graph Explorer and attempting to load the Multistacked Performance graph, I noticed that the "Select Service" wasn't populating. This used to work properly so I am unsure as to when it stopped. I performed the initial troubleshooting:
- Tried from various machines and browsers (Edge, Chrome, Firefox) - same result
- Loaded the same page from another Nagios XI that runs in a different environment - no problem
- Upgraded Nagios XI from 5.11.1 to 5.11.2 - same result
- Checked DevTools > Console for errors - Screenshot below
nagiosxi-console.jpg
- Compared listed files (graphexplorer.js, exporting.js, no-data-to-display.js) between the Nagios servers - no difference
- Compared network response payload for above files in browser console for both servers - no difference
- Ran console. log(jQuery(). jquery); against both XI instances - bad one shows 1.12.4, working one shows 3.6.0
- Ran yum update and brought both servers to same update state - no difference

When clicking the different tabs in Graph Explorer, the tab doesn't appear to change, but the content in the tab does attempt to load, though interactive elements don't (ie. I select a host but the services don't populate, nor do the two default host checks).

Both servers were created using the VM template years ago running CentOS 7 running Nagios XI 5.11.2. Any help would be appreciated. Thanks!

Re: Graph Explorer no longer properly loading

Posted: Mon Oct 09, 2023 10:31 am
by danderson
Thanks for reaching out @ScottMc,

It seems that jQuery is the issue here. Does the output of console.log(jQuery().jquery) return 1.12.4 throughout the application as well?

Re: Graph Explorer no longer properly loading

Posted: Tue Oct 10, 2023 2:19 pm
by ScottMc
danderson wrote: Mon Oct 09, 2023 10:31 am It seems that jQuery is the issue here. Does the output of console.log(jQuery().jquery) return 1.12.4 throughout the application as well?
Everywhere I've tested does. I did a little more testing and noticed something else that may be noteworthy. Comparing the working server and bad server respectively, I see this on line 14:
<script type='text/javascript' src='/nagiosxi/includes/js/jquery/jquery-3.6.0.min.js'></script>
<script type='text/javascript' src='/nagiosxi/includes/js/jquery/jquery-3.3.1.min.js'></script>

Neither server have jquery-3.3.1.min.js and both have jquery-3.6.0.min.js. I can't seem to find where/why this is happening and am wondering if it is also related.

Re: Graph Explorer no longer properly loading

Posted: Tue Oct 10, 2023 5:57 pm
by danderson
I have those same items on a working XI.

Try looking at Admin -> System Config -> Performance Settings -> PDF/JPG Exporting and unchecking the box if it is checked. Tell me if that changes anything.

Re: Graph Explorer no longer properly loading

Posted: Wed Oct 11, 2023 2:48 pm
by ScottMc
Making that change did appear to change the jquery version in the console, but didn't fix the issue with the Graph Explorer:
JQuery.png

Re: Graph Explorer no longer properly loading

Posted: Thu Oct 12, 2023 10:35 am
by danderson
What version is the component? It should be 2.3.0

Re: Graph Explorer no longer properly loading

Posted: Thu Oct 12, 2023 11:22 am
by ScottMc
It is 2.3.0. On a side note, I had to reenable the PDF/JPG Exporting jquery setting because disabling it ended up breaking the search function at the top. On my working Nagios server in the other environment, disabling the setting did not break the search function when switching to jquery 3.6.0.

Re: Graph Explorer no longer properly loading

Posted: Mon Oct 16, 2023 9:42 am
by danderson
I was able to replicate your problems by removing "jquery-migrate-1.4.1.min.js", do you see this file in the head at all? Does the file /usr/local/nagiosxi/html/includes/js/jquery/jquery-migrate-1.4.1.min.js exist?

Re: Graph Explorer no longer properly loading

Posted: Fri Oct 20, 2023 2:58 pm
by ScottMc
/usr/local/nagiosxi/html/includes/js/jquery/jquery-migrate-1.4.1.min.js exists in both servers, and seemed to be loading.

Ultimately I just got fed up with it and so I took a snapshot of the server and copied everything from /usr/local/nagiosxi/html from the working server to the server that wasn't working so it's working now. Thanks for trying!