Hmm not really what I was looking for. I can output to file, but I'm trying to find out what Ludmill meant to make ajax show the content of this logfile.
Grtz
Long actions make browser hang
Re: Long actions make browser hang
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Long actions make browser hang
I'm sorry to jump in here without prior knowledge, but it sounds like you use the actions component, and when loading certain pages? or when using actions that take a long time? it hangs your browser?
If thats correct, it sounds to me like either the actions component directly has issues with waiting for a response, or that firefox does in particular. I cannot say I have seen this with nagios particularly, but I also don't use the actions component. However I have seen this with other web apps I use, and it seems to be a particular issues with FF's javascript engine not handling waits properly. That's not to soley point blame at FF, it's very possible we have issues that can be resolve as well. What I'm getting at, is if you haven't let's try chrome or *shudder* IE and see if any changes are had.
Also, it sounds like I don't need your particular script to emulate this, simply something that waits between 30-60 seconds before it responds to the script and provides actionable data for the browser to work with. Does that sounds correct?
If thats correct, it sounds to me like either the actions component directly has issues with waiting for a response, or that firefox does in particular. I cannot say I have seen this with nagios particularly, but I also don't use the actions component. However I have seen this with other web apps I use, and it seems to be a particular issues with FF's javascript engine not handling waits properly. That's not to soley point blame at FF, it's very possible we have issues that can be resolve as well. What I'm getting at, is if you haven't let's try chrome or *shudder* IE and see if any changes are had.
Also, it sounds like I don't need your particular script to emulate this, simply something that waits between 30-60 seconds before it responds to the script and provides actionable data for the browser to work with. Does that sounds correct?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: Long actions make browser hang
Spenser,
Just tested it and same issue with Chrome. Aft clicking the action, a new page is opened. the script starts updating all hosts in a hostgroup, outputting as text in the second tab, the status of each update. This can take up to 15 minutes, depending of how many hosts are in the hostgroup. In the meantime the tab where I initiated the action hangs, for as long as the action is running.
Don't get me wrong, I need to have the status of each update for each host in the webpage of the tab opened by the action. it's just very inconvenient that the original nagios XI webpage hangs.
Grtz
Willem
Just tested it and same issue with Chrome. Aft clicking the action, a new page is opened. the script starts updating all hosts in a hostgroup, outputting as text in the second tab, the status of each update. This can take up to 15 minutes, depending of how many hosts are in the hostgroup. In the meantime the tab where I initiated the action hangs, for as long as the action is running.
Don't get me wrong, I need to have the status of each update for each host in the webpage of the tab opened by the action. it's just very inconvenient that the original nagios XI webpage hangs.
Grtz
Willem
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net
Re: Long actions make browser hang
This is due to how it is coded. The javascript runs an ajax loop waiting for the command to finish. What you want is possible, but it was never part of the vision of this plugin. We call them "quick actions" for multiple reasonsWillemDH wrote:it's just very inconvenient that the original nagios XI webpage hangs.
The real issue is how to handle this. We could load the javascript into a different tab and let that tab hang until the script is complete. This will require a number of changes to the code, so you should most likely submit a feature request to tracker.nagios.com and our devs will get it on the list.
For now, you may want to refer to my earlier suggestion of using one action to start the script in the background with its output redirected to a file, and another to display the text from the file.
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.
"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.
Re: Long actions make browser hang
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net
Re: Long actions make browser hang
Locking it.
Be sure to check out our Knowledgebase for helpful articles and solutions!