Page 1 of 1

emailed reports corrupt attachments

Posted: Tue Oct 04, 2016 2:32 am
by djcomber
When emailing reports the PDF or JPG are corrupt, download as PDF or JPG works fine.

Replicate
1. create bandwidth report
2. Email report as PDF or jpg
3. open PDF or jpg from email

Re: emailed reports corrupt attachments

Posted: Tue Oct 04, 2016 9:30 am
by lmiltchev
I would like to try to recreate the issue in house. What is the Nagios XI version that you are currently using? Are you using/forcing SSL? What is the output of the following commands?

Code: Select all

ip addr | grep global | grep -m 1 'inet' | awk '/inet[^6]/{print substr($2,0)}' | sed 's|/.*||'
hostname -f
cat /etc/hosts
tail -100 /var/log/httpd/error_log
Go to Admin->System Settings, and show us a screenshot of this page.

Can you also upload one of the "corrupted" PDFs?

Re: emailed reports corrupt attachments

Posted: Tue Oct 04, 2016 6:22 pm
by djcomber
Verison 5.2.9
SSL in use but not enforced

Code: Select all

[root@sucgrdc01nxi01 ~]# ip addr | grep global | grep -m 1 'inet' | awk '/inet[^                                                                                                                                                             6]/{print substr($2,0)}' | sed 's|/.*||'
10.1.50.1
[root@sucgrdc01nxi01 ~]# hostname -f
sucgrdc01nxi01.ucommgroup.com.au
[root@sucgrdc01nxi01 ~]# cat /etc/hosts
127.0.0.1       localhost.localdomain   localhost.localdomain   localhost4     l                                                                                                                                                             ocalhost4.localdomain4  localhost       nagios  nagiosna        nagiosxi
::1     localhost.localdomain   localhost.localdomain   localhost6      localhos                                                                                                                                                             t6.localdomain6 localhost       nagios  nagiosna        nagiosxi
[root@sucgrdc01nxi01 ~]# tail -100 /var/log/httpd/error_log
[Sun Oct 02 19:49:38 2016] [error] [client 14.203.71.150] File does not exist: /                                                                                                                                                             var/www/html/favicon.ico
[Sun Oct 02 19:49:38 2016] [error] [client 14.203.71.150] File does not exist: /                                                                                                                                                             var/www/html/apple-touch-icon-152x152-precomposed.png
[Sun Oct 02 19:49:38 2016] [error] [client 14.203.71.150] File does not exist: /                                                                                                                                                             var/www/html/apple-touch-icon-152x152.png
[Sun Oct 02 19:49:39 2016] [error] [client 14.203.71.150] File does not exist: /                                                                                                                                                             var/www/html/apple-touch-icon-precomposed.png
[Sun Oct 02 19:49:39 2016] [error] [client 14.203.71.150] File does not exist: /                                                                                                                                                             var/www/html/apple-touch-icon.png
[Sun Oct 02 19:49:39 2016] [error] [client 14.203.71.150] File does not exist: /                                                                                                                                                             var/www/html/favicon.ico
[Sun Oct 02 23:15:16 2016] [error] [client 5.255.250.70] File does not exist: /v                                                                                                                                                             ar/www/html/robots.txt
[Mon Oct 03 02:36:52 2016] [error] [client 218.92.147.79] File does not exist: /                                                                                                                                                             var/www/html/uploadify, referer: http://220.101.94.18
[Mon Oct 03 02:37:09 2016] [error] [client 218.92.147.79] File does not exist: /                                                                                                                                                             var/www/html/uploadify.css, referer: http://220.101.94.18
[Mon Oct 03 02:37:30 2016] [error] [client 218.92.147.79] File does not exist: /                                                                                                                                                             var/www/html/admin, referer: http://220.101.94.18
[Mon Oct 03 02:37:47 2016] [error] [client 218.92.147.79] File does not exist: /                                                                                                                                                             var/www/html/public, referer: http://220.101.94.18
[Mon Oct 03 02:37:56 2016] [error] [client 218.92.147.79] File does not exist: /                                                                                                                                                             var/www/html/js, referer: http://220.101.94.18
[Mon Oct 03 02:38:04 2016] [error] [client 218.92.147.79] File does not exist: /                                                                                                                                                             var/www/html/include, referer: http://220.101.94.18
[Mon Oct 03 02:38:21 2016] [error] [client 218.92.147.79] File does not exist: /                                                                                                                                                             var/www/html/data, referer: http://220.101.94.18
[Mon Oct 03 02:38:32 2016] [error] [client 218.92.147.79] File does not exist: /                                                                                                                                                             var/www/html/Public, referer: http://220.101.94.18
[Mon Oct 03 02:38:39 2016] [error] [client 218.92.147.79] File does not exist: /                                                                                                                                                             var/www/html/addons, referer: http://220.101.94.18
[Mon Oct 03 02:38:55 2016] [error] [client 218.92.147.79] File does not exist: /                                                                                                                                                             var/www/html/script, referer: http://220.101.94.18
[Mon Oct 03 02:39:03 2016] [error] [client 218.92.147.79] File does not exist: /                                                                                                                                                             var/www/html/inc, referer: http://220.101.94.18
[Mon Oct 03 02:39:09 2016] [error] [client 218.92.147.79] File does not exist: /                                                                                                                                                             var/www/html/general, referer: http://220.101.94.18
[Mon Oct 03 02:39:20 2016] [error] [client 218.92.147.79] File does not exist: /                                                                                                                                                             var/www/html/uploadify, referer: http://220.101.94.18
[Mon Oct 03 02:39:30 2016] [error] [client 218.92.147.79] File does not exist: /                                                                                                                                                             var/www/html/bocadmin, referer: http://220.101.94.18
[Mon Oct 03 02:39:34 2016] [error] [client 218.92.147.79] File does not exist: /                                                                                                                                                             var/www/html/css, referer: http://220.101.94.18
[Mon Oct 03 02:39:46 2016] [error] [client 218.92.147.79] File does not exist: /                                                                                                                                                             var/www/html/common, referer: http://220.101.94.18
[Mon Oct 03 02:39:57 2016] [error] [client 218.92.147.79] File does not exist: /                                                                                                                                                             var/www/html/lib, referer: http://220.101.94.18
[Mon Oct 03 02:40:12 2016] [error] [client 218.92.147.79] File does not exist: /                                                                                                                                                             var/www/html/admin, referer: http://220.101.94.18
[Mon Oct 03 02:40:20 2016] [error] [client 218.92.147.79] File does not exist: /                                                                                                                                                             var/www/html/js, referer: http://220.101.94.18
[Mon Oct 03 02:40:29 2016] [error] [client 218.92.147.79] File does not exist: /                                                                                                                                                             var/www/html/JS, referer: http://220.101.94.18
[Mon Oct 03 02:40:36 2016] [error] [client 218.92.147.79] File does not exist: /                                                                                                                                                             var/www/html/js, referer: http://220.101.94.18
[Mon Oct 03 02:40:50 2016] [error] [client 218.92.147.79] File does not exist: /                                                                                                                                                             var/www/html/js, referer: http://220.101.94.18
[Mon Oct 03 09:22:02 2016] [error] [client 141.212.122.96] client sent HTTP/1.1                                                                                                                                                              request without hostname (see RFC2616 section 14.23): /x
[Mon Oct 03 14:30:06 2016] [error] [client 89.248.174.4] script '/var/www/html/x                                                                                                                                                             mlrpc.php' not found or unable to stat
[Mon Oct 03 15:31:46 2016] [error] [client 1.128.96.187] File does not exist: /v                                                                                                                                                             ar/www/html/apple-touch-icon-120x120-precomposed.png
[Mon Oct 03 15:31:46 2016] [error] [client 1.128.96.187] File does not exist: /v                                                                                                                                                             ar/www/html/apple-touch-icon-120x120.png
[Mon Oct 03 15:31:46 2016] [error] [client 1.128.96.187] File does not exist: /v                                                                                                                                                             ar/www/html/apple-touch-icon-precomposed.png
[Mon Oct 03 15:31:47 2016] [error] [client 1.128.96.187] File does not exist: /v                                                                                                                                                             ar/www/html/apple-touch-icon.png
[Mon Oct 03 15:31:47 2016] [error] [client 1.128.96.187] File does not exist: /v                                                                                                                                                             ar/www/html/favicon.ico
[Mon Oct 03 15:31:47 2016] [error] [client 1.128.96.187] File does not exist: /v                                                                                                                                                             ar/www/html/apple-touch-icon-120x120-precomposed.png
[Mon Oct 03 15:31:47 2016] [error] [client 1.128.96.187] File does not exist: /v                                                                                                                                                             ar/www/html/apple-touch-icon-120x120.png
[Mon Oct 03 15:31:47 2016] [error] [client 1.128.96.187] File does not exist: /v                                                                                                                                                             ar/www/html/apple-touch-icon-precomposed.png
[Mon Oct 03 15:31:47 2016] [error] [client 1.128.96.187] File does not exist: /v                                                                                                                                                             ar/www/html/apple-touch-icon.png
[Mon Oct 03 15:31:47 2016] [error] [client 1.128.96.187] File does not exist: /v                                                                                                                                                             ar/www/html/favicon.ico
[Mon Oct 03 16:24:09 2016] [error] [client 173.231.185.150] File does not exist:                                                                                                                                                              /var/www/html/admin
[Mon Oct 03 20:42:12 2016] [error] [client 58.7.203.228] File does not exist: /v                                                                                                                                                             ar/www/html/apple-touch-icon-120x120-precomposed.png
[Mon Oct 03 20:42:12 2016] [error] [client 58.7.203.228] File does not exist: /v                                                                                                                                                             ar/www/html/apple-touch-icon-120x120.png
[Mon Oct 03 20:42:12 2016] [error] [client 58.7.203.228] File does not exist: /v                                                                                                                                                             ar/www/html/apple-touch-icon-precomposed.png
[Mon Oct 03 20:42:12 2016] [error] [client 58.7.203.228] File does not exist: /v                                                                                                                                                             ar/www/html/apple-touch-icon.png
[Mon Oct 03 20:42:12 2016] [error] [client 58.7.203.228] File does not exist: /v                                                                                                                                                             ar/www/html/favicon.ico
[Mon Oct 03 20:42:12 2016] [error] [client 58.7.203.228] File does not exist: /v                                                                                                                                                             ar/www/html/apple-touch-icon-120x120-precomposed.png
[Mon Oct 03 20:42:12 2016] [error] [client 58.7.203.228] File does not exist: /v                                                                                                                                                             ar/www/html/apple-touch-icon-120x120.png
[Mon Oct 03 20:42:12 2016] [error] [client 58.7.203.228] File does not exist: /v                                                                                                                                                             ar/www/html/apple-touch-icon-precomposed.png
[Mon Oct 03 20:42:12 2016] [error] [client 58.7.203.228] File does not exist: /v                                                                                                                                                             ar/www/html/apple-touch-icon.png
[Mon Oct 03 20:42:12 2016] [error] [client 58.7.203.228] File does not exist: /v                                                                                                                                                             ar/www/html/favicon.ico
[Tue Oct 04 01:34:06 2016] [error] [client 179.157.89.182] File does not exist:                                                                                                                                                              /var/www/html/cgi
[Tue Oct 04 01:34:07 2016] [error] [client 179.157.89.182] File does not exist:                                                                                                                                                              /var/www/html/stssys.htm
[Tue Oct 04 01:34:08 2016] [error] [client 179.157.89.182] script '/var/www/html                                                                                                                                                             /command.php' not found or unable to stat
[Tue Oct 04 07:58:32 2016] [error] [client 14.203.71.150] File does not exist: /                                                                                                                                                             var/www/html/apple-touch-icon-152x152-precomposed.png
[Tue Oct 04 07:58:32 2016] [error] [client 14.203.71.150] File does not exist: /                                                                                                                                                             var/www/html/apple-touch-icon-152x152.png
[Tue Oct 04 07:58:32 2016] [error] [client 14.203.71.150] File does not exist: /                                                                                                                                                             var/www/html/apple-touch-icon-precomposed.png
[Tue Oct 04 07:58:32 2016] [error] [client 14.203.71.150] File does not exist: /                                                                                                                                                             var/www/html/apple-touch-icon.png
[Tue Oct 04 07:58:32 2016] [error] [client 14.203.71.150] File does not exist: /                                                                                                                                                             var/www/html/favicon.ico
[Tue Oct 04 07:58:32 2016] [error] [client 14.203.71.150] File does not exist: /                                                                                                                                                             var/www/html/apple-touch-icon-152x152-precomposed.png
[Tue Oct 04 07:58:33 2016] [error] [client 14.203.71.150] File does not exist: /                                                                                                                                                             var/www/html/apple-touch-icon-152x152.png
[Tue Oct 04 07:58:33 2016] [error] [client 14.203.71.150] File does not exist: /                                                                                                                                                             var/www/html/apple-touch-icon-precomposed.png
[Tue Oct 04 07:58:33 2016] [error] [client 14.203.71.150] File does not exist: /                                                                                                                                                             var/www/html/apple-touch-icon.png
[Tue Oct 04 07:58:33 2016] [error] [client 14.203.71.150] File does not exist: /                                                                                                                                                             var/www/html/favicon.ico
[Tue Oct 04 12:39:59 2016] [error] [client 163.172.200.111] File does not exist:                                                                                                                                                              /var/www/html/HNAP1, referer: http://220.101.94.18/
[Tue Oct 04 12:57:09 2016] [error] [client 5.255.250.70] File does not exist: /v                                                                                                                                                             ar/www/html/robots.txt
[Tue Oct 04 14:08:07 2016] [error] [client 175.176.202.18] PHP Notice:  Undefine                                                                                                                                                             d index: flash_msg in /usr/local/nagiosxi/html/login.php on line 79, referer: ht                                                                                                                                                             tp://monitor.ucommgroup.com.au/
PHP Notice:  Undefined index: scheme in /usr/local/nagiosxi/html/includes/compon                                                                                                                                                             ents/scheduledreporting/sendreport.php on line 155
PHP Notice:  Undefined index: host in /usr/local/nagiosxi/html/includes/componen                                                                                                                                                             ts/scheduledreporting/sendreport.php on line 157
://monitor.ucommgroup.com.au/nagiosxi//includes/components/bandwidthreport/index                                                                                                                                                             .php?name=10.18.2.1_2&manual_run=1&username=dcomber&ticket=c3geb764ngmtolahv58eh                                                                                                                                                             h56o0b2lv40vjdaoicf22anlh8kjd34r7ak6ilohmoh&locale=en_US&mode=pdf: Scheme missin                                                                                                                                                             g.
PHP Notice:  Undefined index: scheme in /usr/local/nagiosxi/html/includes/compon                                                                                                                                                             ents/scheduledreporting/sendreport.php on line 155
PHP Notice:  Undefined index: host in /usr/local/nagiosxi/html/includes/componen                                                                                                                                                             ts/scheduledreporting/sendreport.php on line 157
://monitor.ucommgroup.com.au/nagiosxi//includes/components/bandwidthreport/index                                                                                                                                                             .php?name=10.18.2.1_2&manual_run=1&username=dcomber&ticket=c3geb764ngmtolahv58eh                                                                                                                                                             h56o0b2lv40vjdaoicf22anlh8kjd34r7ak6ilohmoh&locale=en_US&mode=jpg: Scheme missin                                                                                                                                                             g.
[Tue Oct 04 16:21:42 2016] [error] [client 14.203.71.150] File does not exist: /                                                                                                                                                             var/www/html/apple-touch-icon-152x152-precomposed.png
[Tue Oct 04 16:21:43 2016] [error] [client 14.203.71.150] File does not exist: /                                                                                                                                                             var/www/html/apple-touch-icon-152x152.png
[Tue Oct 04 16:21:43 2016] [error] [client 14.203.71.150] File does not exist: /                                                                                                                                                             var/www/html/apple-touch-icon-precomposed.png
[Tue Oct 04 16:21:43 2016] [error] [client 14.203.71.150] File does not exist: /                                                                                                                                                             var/www/html/apple-touch-icon.png
[Tue Oct 04 16:21:43 2016] [error] [client 14.203.71.150] File does not exist: /                                                                                                                                                             var/www/html/favicon.ico
[Tue Oct 04 16:21:43 2016] [error] [client 14.203.71.150] File does not exist: /                                                                                                                                                             var/www/html/apple-touch-icon-152x152-precomposed.png
[Tue Oct 04 16:21:43 2016] [error] [client 14.203.71.150] File does not exist: /                                                                                                                                                             var/www/html/apple-touch-icon-152x152.png
[Tue Oct 04 16:21:43 2016] [error] [client 14.203.71.150] File does not exist: /                                                                                                                                                             var/www/html/apple-touch-icon-precomposed.png
[Tue Oct 04 16:21:43 2016] [error] [client 14.203.71.150] File does not exist: /                                                                                                                                                             var/www/html/apple-touch-icon.png
[Tue Oct 04 16:21:44 2016] [error] [client 14.203.71.150] File does not exist: /                                                                                                                                                             var/www/html/favicon.ico
[Tue Oct 04 17:33:17 2016] [error] [client 195.62.53.168] File does not exist: /                                                                                                                                                             var/www/html/engine
[Tue Oct 04 20:28:53 2016] [error] [client 58.7.203.228] File does not exist: /v                                                                                                                                                             ar/www/html/apple-touch-icon-120x120-precomposed.png
[Tue Oct 04 20:28:53 2016] [error] [client 58.7.203.228] File does not exist: /v                                                                                                                                                             ar/www/html/apple-touch-icon-120x120.png
[Tue Oct 04 20:28:53 2016] [error] [client 58.7.203.228] File does not exist: /v                                                                                                                                                             ar/www/html/apple-touch-icon-precomposed.png
[Tue Oct 04 20:28:53 2016] [error] [client 58.7.203.228] File does not exist: /v                                                                                                                                                             ar/www/html/apple-touch-icon.png
[Tue Oct 04 20:28:53 2016] [error] [client 58.7.203.228] File does not exist: /v                                                                                                                                                             ar/www/html/favicon.ico
[Tue Oct 04 20:28:53 2016] [error] [client 58.7.203.228] File does not exist: /v                                                                                                                                                             ar/www/html/apple-touch-icon-120x120-precomposed.png
[Tue Oct 04 20:28:53 2016] [error] [client 58.7.203.228] File does not exist: /v                                                                                                                                                             ar/www/html/apple-touch-icon-120x120.png
[Tue Oct 04 20:28:53 2016] [error] [client 58.7.203.228] File does not exist: /v                                                                                                                                                             ar/www/html/apple-touch-icon-precomposed.png
[Tue Oct 04 20:28:54 2016] [error] [client 58.7.203.228] File does not exist: /v                                                                                                                                                             ar/www/html/apple-touch-icon.png
[Tue Oct 04 20:28:54 2016] [error] [client 58.7.203.228] File does not exist: /v                                                                                                                                                             ar/www/html/favicon.ico
[Tue Oct 04 21:28:59 2016] [error] [client 208.64.253.251] Invalid URI in reques                                                                                                                                                             t GET HTTP/1.1 HTTP/1.1
[Tue Oct 04 21:28:59 2016] [error] [client 208.64.253.251] File does not exist:                                                                                                                                                              /var/www/html/admin
[Tue Oct 04 23:24:00 2016] [error] [client 173.231.185.150] File does not exist:                                                                                                                                                              /var/www/html/admin
[Wed Oct 05 08:34:21 2016] [error] [client 58.7.203.228] PHP Notice:  Undefined                                                                                                                                                              index: flash_msg in /usr/local/nagiosxi/html/login.php on line 79, referer: http                                                                                                                                                             ://monitor.ucommgroup.com.au/
[Wed Oct 05 08:49:18 2016] [error] [client 58.7.203.228] PHP Notice:  Undefined                                                                                                                                                              index: flash_msg in /usr/local/nagiosxi/html/login.php on line 79, referer: http                                                                                                                                                             ://monitor.ucommgroup.com.au/
[root@sucgrdc01nxi01 ~]#
System Settings.PNG
can't attach the PDF file as it says "The upload file is empty"

Re: emailed reports corrupt attachments

Posted: Wed Oct 05, 2016 7:32 am
by jacek
Hi, I had an similar issue some time ago, and I found an solution somewhere here in the forum.
I needed to replace some files of the report module, and then the problem was gone.
To bad I can't find the thread...

Re: emailed reports corrupt attachments

Posted: Wed Oct 05, 2016 10:41 am
by lmiltchev
You will need to modify your "External URL" by adding "https://" in front of it. You could probably remove the "External URL" as it is the same as the "Program URL". In addition to this, you could add "monitor monitor.ucommgroup.com.au" to the "/etc/hosts" at the end of the "127.0.0.1" line.

BTW, why do you have "nagiosna" in there? Are you running Nagios XI and Nagios NA on the same machine?

Re: emailed reports corrupt attachments

Posted: Wed Oct 05, 2016 7:48 pm
by djcomber
ok will try to do those things and see what result I get,

no idea why nagiosna is in there. we have linked NA with XI, no they aren't on the same machine. no one has manually changed any files on the XI. Adding monitor will be the first manual change

Re: emailed reports corrupt attachments

Posted: Wed Oct 05, 2016 8:00 pm
by djcomber
Awesome!! fixed - not sure if it was the host entry or the external URL..

thanks a bunch now I can receive scheduled reports :)

Re: emailed reports corrupt attachments

Posted: Thu Oct 06, 2016 9:37 am
by avandemore
Sounds like your issue is resolved djcomber. Do you mind if we lock this thread? Please open a new one for any further issues.

Re: emailed reports corrupt attachments

Posted: Mon Oct 17, 2016 7:09 am
by djcomber
good to lock