Hello,
I've been creating a Powershell script that will start a complete audit on a server passed as parameter with a quick action. This script will output all it's information to a webpage I'm placing on the Windows server it is running at the moment. The auditing script takes some time to run (20 - 30 secs at the moment) and I noticed the Nagios XI webpage hangs while the script is running.
Is there any way to prevent the webpage from hanging while my Powershell auditing script is running?
(hopefully I will be able to put the script on the Nagios Exchange soon, it just needs a litle more polishing)
Grtz
Willem
Webpage hangs when executing quick action auditing script
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Webpage hangs when executing quick action auditing scrip
How is the script on the XI box being run? From within XI in a component or dashlet or just at the command line?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Webpage hangs when executing quick action auditing scrip
With the quick action component Troy.
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Webpage hangs when executing quick action auditing scrip
I know what you mean. I assume the Action Type is Command.
I've had a look at the code and I thinking that the pause is due to how the ajax request is being performed. The ajax request might be waiting for the full response to return before it loads the page.
Does a blank page open first and hang while waiting for the script to run, or does XI just hang and then the page is displayed once the script completes?
I've had a look at the code and I thinking that the pause is due to how the ajax request is being performed. The ajax request might be waiting for the full response to return before it loads the page.
Does a blank page open first and hang while waiting for the script to run, or does XI just hang and then the page is displayed once the script completes?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Webpage hangs when executing quick action auditing scrip
Troy,
Something was changed in my actions component by Andy Brist in order to prevent the popup window from appearing. See http://support.nagios.com/forum/viewtop ... n&start=30 for some details. I can't immeditately remember what he changed.
So when I initiate a quick action, I do not see a popup window appear, but the Nagios XI webpage just hangs, meaning I can't click on any link or got any other Nagios XI webpage. As the auditing script runs about 30 seconds this is kind of annoying. I think the action is executed byt the httpd process which waits for the quick acton to finish. it would be nice if the quick action would run in a seperate process or something like that, but without popup window.
Grtz
Willem
Something was changed in my actions component by Andy Brist in order to prevent the popup window from appearing. See http://support.nagios.com/forum/viewtop ... n&start=30 for some details. I can't immeditately remember what he changed.
So when I initiate a quick action, I do not see a popup window appear, but the Nagios XI webpage just hangs, meaning I can't click on any link or got any other Nagios XI webpage. As the auditing script runs about 30 seconds this is kind of annoying. I think the action is executed byt the httpd process which waits for the quick acton to finish. it would be nice if the quick action would run in a seperate process or something like that, but without popup window.
Grtz
Willem
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Webpage hangs when executing quick action auditing scrip
I'll follow this up with Andy and get back to you.
Can you also please create a zip of all the files in /usr/local/nagiosxi/html/includes/components/actions/ and PM/email them to me.
Can you also please create a zip of all the files in /usr/local/nagiosxi/html/includes/components/actions/ and PM/email them to me.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Webpage hangs when executing quick action auditing scrip
Sent you the pm with the zipped actions folder Troy.
Grtz
Willem
Grtz
Willem
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net
Re: Webpage hangs when executing quick action auditing scrip
Let's do this for now. Go to Admin -> Manage Components and save a copy of your current Actions component, then install a fresh copy of our latest one (attached). See if the page still hangs with the default behavior, and we can work from there.
You do not have the required permissions to view the files attached to this post.
Former Nagios employee
Re: Webpage hangs when executing quick action auditing scrip
Trevor, Troy,
Updated the ations component to latest version. I think the hanging webpage was caused byt the edit done in the actions component to prevent the webpage from popping up. It seems in the updated version, a new window is opened in another tab. We decided for now to leave it like that, as it means we can output data from the script to the webpage.
So this thread can be closed.
Grtz
Willem
Updated the ations component to latest version. I think the hanging webpage was caused byt the edit done in the actions component to prevent the webpage from popping up. It seems in the updated version, a new window is opened in another tab. We decided for now to leave it like that, as it means we can output data from the script to the webpage.
So this thread can be closed.
Grtz
Willem
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net