Page 1 of 2

availability reports slow

Posted: Wed Nov 25, 2015 8:35 am
by vnc786
hi team,

Nagiosxi: 2014 2.7

Does offloading database has any impact on reporting area. Correct me if i am wrong, reports are generated after parsing every nagios.log (/usr/local/nagios/var/{nagios.log,archives/nagios*})

I have done some tunning at php and mysql level.

--thanks

Re: availability reports slow

Posted: Wed Nov 25, 2015 10:17 am
by rkennedy
It shouldn't have much effect on your reports, what are the specs of your machine running Nagios?

Do your reports work slowly, or not at all?

Re: availability reports slow

Posted: Sat Nov 28, 2015 1:40 am
by vnc786
rkennedy wrote:It shouldn't have much effect on your reports, what are the specs of your machine running Nagios?
16 core cpu
12 GB Memory
Do your reports work slowly, or not at all?
the availability report takes about 15 minutes to load. Whenever i am trying to get report the avail.cgi takes 1 core 90-100 percent which i thinks normal because i have multiple cores so there is no issue. Now when i am trying to get pdf it never comes. FYI i have also tried to generate pdf from the server itself using API+Ticket number with the help of curl.

I think we will be be raising a ticket for this. Meanwhile was try to get help on this.

Re: availability reports slow

Posted: Sat Nov 28, 2015 10:42 pm
by jrdalrymple
While I can't give you specifics, I can tell you that an internal feature request was submitted at the behest of a customer for that exact issue. Perhaps one of the staff can indicate the status of that request, last I knew it was still pending approval.

Re: availability reports slow

Posted: Mon Nov 30, 2015 12:31 pm
by rkennedy
How many service checks are you running with that machine? Can you post the results of top|head -17?

Re: availability reports slow

Posted: Tue Dec 01, 2015 4:45 am
by vnc786
rkennedy wrote:How many service checks are you running with that machine? Can you post the results of top|head -17?

Code: Select all

/usr/local/nagios/bin/nagiostats

Nagios Stats 4.0.8
Copyright (c) 2003-2008 Ethan Galstad (www.nagios.org)
Last Modified: 08-12-2014
License: GPL

CURRENT STATUS DATA
------------------------------------------------------
Status File:                            /usr/local/nagios/var/status.dat
Status File Age:                        0d 0h 0m 7s
Status File Version:                    4.0.8

Program Running Time:                   0d 0h 7m 57s
Nagios PID:                             6857

Total Services:                         12878
Services Checked:                       12878
Services Scheduled:                     12872
Services Actively Checked:              12878
Services Passively Checked:             0
Total Service State Change:             0.000 / 55.720 / 0.075 %
Active Service Latency:                 0.000 / 1.148 / 0.018 sec
Active Service Execution Time:          0.001 / 90.272 / 0.856 sec
Active Service State Change:            0.000 / 55.720 / 0.075 %
Active Services Last 1/5/15/60 min:     2857 / 12537 / 12871 / 12871
Passive Service Latency:                0.000 / 0.000 / 0.000 sec
Passive Service State Change:           0.000 / 0.000 / 0.000 %
Passive Services Last 1/5/15/60 min:    0 / 0 / 0 / 0
Services Ok/Warn/Unk/Crit:              11054 / 433 / 1001 / 390
Services Flapping:                      12
Services In Downtime:                   0

Total Hosts:                            777
Hosts Checked:                          777
Hosts Scheduled:                        777
Hosts Actively Checked:                 777
Host Passively Checked:                 0
Total Host State Change:                0.000 / 5.720 / 0.007 %
Active Host Latency:                    0.000 / 0.982 / 0.014 sec
Active Host Execution Time:             0.001 / 53.519 / 0.634 sec
Active Host State Change:               0.000 / 5.720 / 0.007 %
Active Hosts Last 1/5/15/60 min:        256 / 769 / 777 / 777
Passive Host Latency:                   0.000 / 0.000 / 0.000 sec
Passive Host State Change:              0.000 / 0.000 / 0.000 %
Passive Hosts Last 1/5/15/60 min:       0 / 0 / 0 / 0
Hosts Up/Down/Unreach:                  755 / 22 / 0
Hosts Flapping:                         0
Hosts In Downtime:                      0

Active Host Checks Last 1/5/15 min:     497 / 2175 / 3231
   Scheduled:                           313 / 1459 / 2223
   On-demand:                           184 / 716 / 1008
   Parallel:                            313 / 1459 / 2223
   Serial:                              0 / 0 / 0
   Cached:                              184 / 716 / 1008
Passive Host Checks Last 1/5/15 min:    0 / 0 / 0
Active Service Checks Last 1/5/15 min:  2886 / 12780 / 19551
   Scheduled:                           2886 / 12780 / 19551
   On-demand:                           0 / 0 / 0
   Cached:                              0 / 0 / 0
Passive Service Checks Last 1/5/15 min: 0 / 0 / 0

External Commands Last 1/5/15 min:      0 / 0 / 0

Code: Select all

ll /usr/local/nagios/var/archives/ | wc -l
143
I have increase resources from my previous post. But still facing issue. If you want result of topwhen i am running report let me know.

Code: Select all

top | head -17
top - 15:07:38 up 7 days,  6:15,  4 users,  load average: 7.19, 9.14, 9.70
Tasks: 423 total,   9 running, 412 sleeping,   0 stopped,   2 zombie
Cpu(s): 33.3%us, 16.1%sy,  0.0%ni, 48.6%id,  2.0%wa,  0.0%hi,  0.1%si,  0.0%st
Mem:  32872340k total, 28936040k used,  3936300k free,   391700k buffers
Swap:  8388604k total,    64520k used,  8324084k free, 25180416k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 2561 nagios    20   0 2848m  42m  10m S 237.8  0.1   0:02.79 java
 6872 nagios    20   0 10896 1008  676 R 100.0  0.0   1:32.32 nagios
 6878 nagios    20   0 10852  876  676 R 100.0  0.0   0:29.50 nagios
 6868 nagios    20   0 10984 1008  676 R 97.5  0.0   1:37.04 nagios
 2674 nagios    20   0  136m  10m 2136 S 50.7  0.0   0:00.26 check_snmp_proc
 2678 nagios    20   0  148m  13m 2288 S 25.3  0.0   0:00.13 check_wmi_plus.
 9767 apache    20   0  496m  85m 4508 S 25.3  0.3   5:15.34 httpd
 2687 nagios    20   0  134m 9516 2012 R 19.5  0.0   0:00.10 check_snmp_stor
35719 apache    20   0  454m  42m 4404 R 15.6  0.1   0:58.77 httpd
 2685 nagios    20   0  136m  10m 2132 S 13.6  0.0   0:00.07 check_snmp_moun

Re: availability reports slow

Posted: Tue Dec 01, 2015 2:54 pm
by rkennedy
I don't think this was mentioned previously, can you please clarify - are you offloading your SQL currently?

If so, are you hosting it locally, or remotely?

Re: availability reports slow

Posted: Wed Dec 02, 2015 4:16 am
by vnc786
rkennedy wrote:I don't think this was mentioned previously, can you please clarify - are you offloading your SQL currently?

If so, are you hosting it locally, or remotely?
Web and DB are on same host only currently i have got suggestion from Troy Lea on one of ticket that start with offloading the Databases, implementing Mod-Gearman and implementing the RAMDisk first.

I am in process to move DB to another server in same LAN.

FYI nagiosXI is running in virtual environment.

Re: availability reports slow

Posted: Wed Dec 02, 2015 10:23 am
by scottwilkerson
The availability report calculates values by reading the nagios.log file and their archives, so disk speed is the primary factor in fast reports.

What is the time period you are running the report for?

Does this machine have fast disks, e.g. SSD, RAID Array?

What is the output of the following?

Code: Select all

ls -l /usr/local/nagios/var/nagios.log
du -h /usr/local/nagios/var/archives/
ls /usr/local/nagios/var/archives/|wc -l

Re: availability reports slow

Posted: Thu Feb 18, 2016 11:21 am
by jonathan.cruz
I have the same problema here. any idea?