The current PHP configuration is:
Code: Select all
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
...
; How many GET/POST/COOKIE input variables may be accepted
; max_input_vars = 1000
max_input_vars = 1000 is the default value (see
documentation) since PHP 5.3.9 (my version: php-5.4.16-43.el7_4.1.x86_64)
Moreover per documentation (
max-input-vars) if there are more input variables than specified by this directive, an E_WARNING is issued, and further input variables are truncated from the request.
So E_WARNING should be logged... But nothing related in httpd log files.
Simulating and stracing a scheduled report in cmdline, I detected that
/usr/local/nagiosxi/var/scheduledreporting.log file did not exist.
Now created, it does not reveal error messages. But I can see the related 2 wget commands.
The strace output is more interesting: it took less than 1min to generate the host_availability part of the report, but +5min for the service_availabilty part.
(The related servicegroup contains 9 hosts & 56 services.)
Why such a difference ?
Code: Select all
time strace /usr/bin/php /usr/local/nagiosxi/html/includes/components/scheduledreporting/sendreport.php --report=2prcF0 --username="loic.vaillant" 2>&1 > /tmp/report.log
...
read(7, --2018-06-05 11:23:44-- https://XXX.YYY.ZZZ/nagiosxi//reports/availability.php?reportperiod=lastmonth&startdate=&enddate=&host=&service=&hostgroup=&servicegroup=myservicegroup&advanced=1&assumeinitialstates=yes&assumestateretention=yes&assumestatesduringdowntime=yes&includesoftstates=no&assumedhoststate=3&assumedservicestate=6&timeperiod=&dont_count_downtime=on&dont_count_unknown=on&username=loic.vaillant&ticket=foobarp&locale=en_US&mode=csv&csvtype=host
Resolving XXX.YYY.ZZZ (XXX.YYY.ZZZ)... a.b.c.d
Connecting to XXX.YYY.ZZZ (XXX.YYY.ZZZ)|a.b.c.d|:443... connected.
WARNING: cannot verify XXX.YYY.ZZZ's certificate, issued by ‘/DC=lan/DC=zodiac/CN=HQ-CA1’:
Unable to locally verify the issuer's authority.
HTTP request sent, awaiting response... 200 OK
Length: 430 [application/octet-stream]
Saving to: ‘/usr/local/nagiosxi/tmp/scheduledreport-loic.vaillant-2prcF0-Host_Availability.csv’
100%[===================================================================================================================================================================================================>] 430 --.-K/s in 0s
2018-06-05 11:24:26 (32.5 MB/s) - ‘/usr/local/nagiosxi/tmp/scheduledreport-loic.vaillant-2prcF0-Host_Availability.csv’ saved [430/430]
...
read(7, --2018-06-05 11:24:26-- https://XXX.YYY.ZZZ/nagiosxi//reports/availability.php?reportperiod=lastmonth&startdate=&enddate=&host=&service=&hostgroup=&servicegroup=myservicegroup&advanced=1&assumeinitialstates=yes&assumestateretention=yes&assumestatesduringdowntime=yes&includesoftstates=no&assumedhoststate=3&assumedservicestate=6&timeperiod=&dont_count_downtime=on&dont_count_unknown=on&username=loic.vaillant&ticket=foobar&locale=en_US&mode=csv&csvtype=service
Resolving XXX.YYY.ZZZ (XXX.YYY.ZZZ)... a.b.c.d
Connecting to XXX.YYY.ZZZ (XXX.YYY.ZZZ)|a.b.c.d|:443... connected.
WARNING: cannot verify XXX.YYY.ZZZ's certificate, issued by ‘/DC=lan/DC=zodiac/CN=HQ-CA1’:
Unable to locally verify the issuer's authority.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/octet-stream]
Saving to: ‘/usr/local/nagiosxi/tmp/scheduledreport-loic.vaillant-2prcF0-Service_Availability.csv’
[ <=> ] 24,262 --.-K/s in 0.1s
2018-06-05 11:29:57 (207 KB/s) - ‘/usr/local/nagiosxi/tmp/scheduledreport-loic.vaillant-2prcF0-Service_Availability.csv’ saved [24262]
exit_group(0) = ?
+++ exited with 0 +++
real 6m13.198s
user 0m0.250s
sys 0m0.291s
For the second read(/wget), the
length is
unspecified.
I'm digging further more...