Scheduled reports - PDF empty

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
driksk8
Posts: 7
Joined: Tue Feb 05, 2013 12:11 pm

Scheduled reports - PDF empty

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Scheduled reports - PDF empty

Post by scottwilkerson »

Can you post the output of the following command

Code: Select all

cat /etc/php.ini|grep display_errors
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
driksk8
Posts: 7
Joined: Tue Feb 05, 2013 12:11 pm

Re: Scheduled reports - PDF empty

Post 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
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Scheduled reports - PDF empty

Post 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.

Code: Select all

tail -f /var/log/httpd/error_log
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
driksk8
Posts: 7
Joined: Tue Feb 05, 2013 12:11 pm

Re: Scheduled reports - PDF empty

Post 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.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Scheduled reports - PDF empty

Post by abrist »

Could you post one of the corrupt pdf reports here?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
driksk8
Posts: 7
Joined: Tue Feb 05, 2013 12:11 pm

Re: Scheduled reports - PDF empty

Post 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
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Scheduled reports - PDF empty

Post by abrist »

What version of XI are you running?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
driksk8
Posts: 7
Joined: Tue Feb 05, 2013 12:11 pm

Re: Scheduled reports - PDF empty

Post by driksk8 »

I have Nagios XI 2011R3.2 version.
driksk8
Posts: 7
Joined: Tue Feb 05, 2013 12:11 pm

Re: Scheduled reports - PDF empty

Post 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.
Locked