Page 1 of 2
Scheduled reports - PDF empty
Posted: Tue Feb 05, 2013 12:19 pm
by driksk8
Hi everybody,
I post on this forum because I have an issue regarding Nagios XI utilization, more precisely with the reporting of Nagios XI.
When I go to “Report” tabs > “scheduled reports” >" new availability report", I configure all fields (hours of day / report name / subject / body / etc), the mail is sent to the defined user but when we want to open the “file.pdf” which was sent, we got an error message : "Adobe Reader could not open report.pdf, because this kind of file is not handle or file is corrupted."
Moreover, the file is 0 octet sized.
Can you please explain to me how can I do to generate this report that contains information needed ?
If someone has the answer or only some ideas, do not hesitate to answer to me.
Thank you very much
Cédric
Re: Scheduled reports - PDF empty
Posted: Tue Feb 05, 2013 1:28 pm
by scottwilkerson
Can you post the output of the following command
Code: Select all
cat /etc/php.ini|grep display_errors
Re: Scheduled reports - PDF empty
Posted: Wed Feb 06, 2013 6:10 am
by driksk8
Hi Scott,
To answer to your question, below the result of your command :
Code: Select all
; display_errors
display_errors = Off
; separately from display_errors. PHP's default behavior is to suppress those
Do you need something more ?
Thanks for your help
Re: Scheduled reports - PDF empty
Posted: Wed Feb 06, 2013 12:02 pm
by abrist
Do a running tail on the httpd error log and then try to open up a pdf from XI. Post the output here.
Re: Scheduled reports - PDF empty
Posted: Thu Feb 07, 2013 12:26 pm
by driksk8
Hi, you can see below the result of the "tail"'s command : I have deleted some lines which seems to be useless.
Code: Select all
[Thu Feb 07 17:40:29 2013] [error] [client @IP_A] PHP Notice: Undefined index: dayweek in /usr/local/nagiosxi/html/includes/components/reportmod/schedulereport.php on line 414, referer: http://@IP_NAGIOS/nagiosxi/includes/components/reportmod/schedulereport.php?name=New State History Report&url=reports%2Fstatehistory.php%3F
[Thu Feb 07 17:40:29 2013] [error] [client @IP_A] PHP Notice: Undefined index: month in /usr/local/nagiosxi/html/includes/components/reportmod/schedulereport.php on line 415, referer: http://@IP_NAGIOS/nagiosxi/includes/components/reportmod/schedulereport.php?name=New State History Report&url=reports%2Fstatehistory.php%3F
[Thu Feb 07 17:40:29 2013] [error] [client @IP_A] PHP Notice: Undefined index: hours in /usr/local/nagiosxi/html/includes/components/reportmod/schedulereport.php on line 416, referer: http://@IP_NAGIOS/nagiosxi/includes/components/reportmod/schedulereport.php?name=New State History Report&url=reports%2Fstatehistory.php%3F
[Thu Feb 07 17:40:29 2013] [error] [client @IP_A] PHP Notice: Undefined index: minutes in /usr/local/nagiosxi/html/includes/components/reportmod/schedulereport.php on line 417, referer: http://@IP_NAGIOS/nagiosxi/includes/components/reportmod/schedulereport.php?name=New State History Report&url=reports%2Fstatehistory.php%3F
[Thu Feb 07 17:40:29 2013] [error] [client @IP_A] PHP Notice: Undefined index: daymonth in /usr/local/nagiosxi/html/includes/components/reportmod/schedulereport.php on line 418, referer: http://@IP_NAGIOS/nagiosxi/includes/components/reportmod/schedulereport.php?name=New State History Report&url=reports%2Fstatehistory.php%3F
[Thu Feb 07 17:40:29 2013] [error] [client @IP_A] PHP Notice: Undefined index: message in /usr/local/nagiosxi/html/includes/components/reportmod/schedulereport.php on line 419, referer: http://@IP_NAGIOS/nagiosxi/includes/components/reportmod/schedulereport.php?name=New State History Report&url=reports%2Fstatehistory.php%3F
[Thu Feb 07 17:40:29 2013] [error] [client @IP_A] PHP Notice: Undefined index: message in /usr/local/nagiosxi/html/includes/components/reportmod/schedulereport.php on line 421, referer: http://@IP_NAGIOS/nagiosxi/includes/components/reportmod/schedulereport.php?name=New State History Report&url=reports%2Fstatehistory.php%3F
[Thu Feb 07 17:40:29 2013] [error] [client @IP_A] PHP Notice: Undefined index: message in /usr/local/nagiosxi/html/includes/components/reportmod/schedulereport.php on line 424, referer: http://@IP_NAGIOS/nagiosxi/includes/components/reportmod/schedulereport.php?name=New State History Report&url=reports%2Fstatehistory.php%3F
[Thu Feb 07 17:40:29 2013] [error] [client @IP_A] PHP Notice: Undefined index: message in /usr/local/nagiosxi/html/includes/components/reportmod/schedulereport.php on line 426, referer: http://@IP_NAGIOS/nagiosxi/includes/components/reportmod/schedulereport.php?name=New State History Report&url=reports%2Fstatehistory.php%3F
[Thu Feb 07 17:40:29 2013] [error] [client @IP_A] PHP Notice: Undefined index: message in /usr/local/nagiosxi/html/includes/components/reportmod/schedulereport.php on line 429, referer: http://@IP_NAGIOS/nagiosxi/includes/components/reportmod/schedulereport.php?name=New State History Report&url=reports%2Fstatehistory.php%3F
But i'm not sure to have well explained my issue.
I don't have problems to see report when i'm on Nagios XI webinterface (in clicking on csv icon or pdf icon) => I can consult it without issue.
I have only issue with the report which is sent when I configure my scheduled report.
I receive the mail with PDF attached but after download it (on outlook / gmail / or something else), i try to open it but i have an error message which appears.
Because PDF generated is not well writen i think.
Re: Scheduled reports - PDF empty
Posted: Thu Feb 07, 2013 12:31 pm
by abrist
Could you post one of the corrupt pdf reports here?
Re: Scheduled reports - PDF empty
Posted: Thu Feb 07, 2013 1:20 pm
by driksk8
Yes no problem, I have uploaded the file but "The uploaded file is empty." is written.
Maybe the issue is that Nagios is not able to write something in the PDF which is sent.
If it is the case, do you have solution to correct script or something else ?
For your information, i have installed Nagios XI with the VMware file available in download section.
Thanks
Re: Scheduled reports - PDF empty
Posted: Thu Feb 07, 2013 1:22 pm
by abrist
What version of XI are you running?
Re: Scheduled reports - PDF empty
Posted: Thu Feb 07, 2013 1:31 pm
by driksk8
I have Nagios XI 2011R3.2 version.
Re: Scheduled reports - PDF empty
Posted: Thu Feb 07, 2013 1:38 pm
by driksk8
It appears that i have an issue with the date too.
Because when the script to create a report is running, it logs issue with variable which are "time" "minute" "hour" "date", all around the "datetime" format which is maybe wrong.
To try to correct, i have added the line datetime = "Europe/Paris" in the php.ini file.