notifications tab

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
btemple
Posts: 183
Joined: Fri Nov 08, 2013 9:30 am

notifications tab

Post by btemple »

When running a notifications report from the home tab the query takes an extended time to complete. Do you have any suggestions on how to speed this up ?
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: notifications tab

Post by cdienger »

What is an extended time in this situation? 1 minute, 2, 5? How many notifications total are listed when it eventually returns?

Are you applying any filters to limit the results to specific time period, host, groups, etc? Those are always options if you know kind of what you're looking for and should speed things up a bit.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
btemple
Posts: 183
Joined: Fri Nov 08, 2013 9:30 am

Re: notifications tab

Post by btemple »

when you launch the notifcations tab it just starts the default query I would say it takes about 5 minutes to finish if it doesn't crash the browser. When I look at top it looks like

mysqld hits 100% and stays - I have ran db repair without resolving the issue

When I close my browser mysqld goes back to 8 -10 %
You do not have the required permissions to view the files attached to this post.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: notifications tab

Post by cdienger »

I'll need to poke around a bit to see if there's something we can do to improve the performance of the default query, but in the meantime I believe I have a work around for you to try:

Open /usr/local/nagiosxi/html/reports/notifications.php and find the section that looks like:

Code: Select all

function display_notifications()
{
    global $request;

    // Makes sure user has appropriate license level
    licensed_feature_check();

    // Get values passed in GET/POST request
    $page = grab_request_var("page", 0);
    $reportperiod = grab_request_var("reportperiod", "last24hours");
    $startdate = grab_request_var("startdate", "");
    $enddate = grab_request_var("enddate", "");
    $search = grab_request_var("search", "");
    $host = grab_request_var("host", "");
    $service = grab_request_var("service", "");
    $hostgroup = grab_request_var("hostgroup", "");
    $servicegroup = grab_request_var("servicegroup", "");
     ...
This is the default query that is run. Edit one of the lines to restrict the default search. For example:

Code: Select all

$search = grab_request_var("search", "localhost");
Save the changes to the file, restart the service with service nagios restat, test, and let us know if this helps.

PM me a system profile as well so that I can get a better idea of your Nagios setup. Profiles can be generated and downloaded under Admin > System Config > System Profile.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: notifications tab

Post by cdienger »

Received the profile but didn't see anything unusual. Please run the following to export a copy of the notifications table and PM the resulting notifications.sql file:

mysqldump -uroot -pnagiosxi nagios nagios_notifications > notifications.sql
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
btemple
Posts: 183
Joined: Fri Nov 08, 2013 9:30 am

Re: notifications tab

Post by btemple »

please see attched pm too big
You do not have the required permissions to view the files attached to this post.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: notifications tab

Post by cdienger »

Thanks for that! I loaded the table and the amount of entries(~60,000) wasn't causing any problems on a very modest test system. Reviewing the profile again I see that there is frequently a very high load on the machine due to processing performance data. I would recommend following https://assets.nagios.com/downloads/nag ... giosXI.pdf to setup a RAM disk to help with performance. The guide goes into a lot of detail, but the installation is pretty quick and is summed up with:

cd /tmp
wget https://assets.nagios.com/downloads/nag ... ramdisk.sh
chmod +x install_ramdisk.sh
./install_ramdisk.sh
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
btemple
Posts: 183
Joined: Fri Nov 08, 2013 9:30 am

Re: notifications tab

Post by btemple »

Ok we will give it a shot thank you
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: notifications tab

Post by cdienger »

No problem. Look forward to your update.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
btemple
Posts: 183
Joined: Fri Nov 08, 2013 9:30 am

Re: notifications tab

Post by btemple »

unfortunaley not better on the notifications link. What is odd is that i ran a "event log" query and the result 4.000 + records came back in like 5- 10 seconds
You do not have the required permissions to view the files attached to this post.
Locked