CGI files that use Livestatus
Posted: Wed Jan 17, 2018 5:59 am
I have found that as we add more hosts and service checks to Nagios and more people are using the Web GUI that the Web GUI doesn't pull and display data as quickly as it used to.
Even though I have tried to enhance performance as much as possible and we have worker nodes doing checks etc, its still isn't as fast as it used to be.
Its not a massive delay, sometimes the worst it gets is having to wait about 4/5 seconds for a page to load when calling service information using the extinfo.cgi.
I guess because its pulling data from the status.dat file which is constantly being written to and read from, I currently have this on a RamDisk.
I compared this to some custom reports I wrote that were requested by management, they pull as much data as the Nagios cgi pages but are far more quicker.
My CGI pages get their data directly from the Livestatus module, so it set me wondering how fast pages like extinfo.cgi would be if they pulled data using the Livestatus module.
So I wrote a new script to display the data that gets displayed calling "extinfo.cgi?type=2&host=<host name>&service=<service name>" , but my script used the Livestatus module to get the data.
I was amazed that the script I wrote displayed all the data on other page in a split second, compared to 2 to 3 seconds calling the same data using extinfo.cgi.
So I was wondering if anyone had rewrote the Nagios CGI scripts to use the Livestatus module or if there were any plans to actual do this within the Nagios Project itself for future releases.
Maybe make both sets of CGI scripts available, in case people didn't use the Livestatus module.
If not I think I'll be rewriting some more of the Nagios CGI scripts to use Livestatus.
Thanks
Tony
Even though I have tried to enhance performance as much as possible and we have worker nodes doing checks etc, its still isn't as fast as it used to be.
Its not a massive delay, sometimes the worst it gets is having to wait about 4/5 seconds for a page to load when calling service information using the extinfo.cgi.
I guess because its pulling data from the status.dat file which is constantly being written to and read from, I currently have this on a RamDisk.
I compared this to some custom reports I wrote that were requested by management, they pull as much data as the Nagios cgi pages but are far more quicker.
My CGI pages get their data directly from the Livestatus module, so it set me wondering how fast pages like extinfo.cgi would be if they pulled data using the Livestatus module.
So I wrote a new script to display the data that gets displayed calling "extinfo.cgi?type=2&host=<host name>&service=<service name>" , but my script used the Livestatus module to get the data.
I was amazed that the script I wrote displayed all the data on other page in a split second, compared to 2 to 3 seconds calling the same data using extinfo.cgi.
So I was wondering if anyone had rewrote the Nagios CGI scripts to use the Livestatus module or if there were any plans to actual do this within the Nagios Project itself for future releases.
Maybe make both sets of CGI scripts available, in case people didn't use the Livestatus module.
If not I think I'll be rewriting some more of the Nagios CGI scripts to use Livestatus.
Thanks
Tony