Page 1 of 2
Availability Report email PDF blank
Posted: Tue Dec 08, 2015 8:10 am
by jkinning
I am trying to create an availability report and have it email the PDF out to several associates. It emails out but if you look at the PDF attachment there is no data just the title. I click on the link to view in Nagios and it just spins and spins until finally it stops and displays nothing. Is it normal behavior for the reports to take a long time to generate? I still have my old Nagios Core box up and running and the availability reports that I am generating spit out the data in a few seconds. Is there a way to generate the reports under Nagios Core and make it default? I usually look at last month to send out the availability report to our Business Units. I liked the schedule and automatically email a generated PDF but if there is no data in the PDF than it won't work.

Re: Availability Report email PDF blank
Posted: Tue Dec 08, 2015 3:02 pm
by rkennedy
I'd like to help with this, but will need to gather a bit more information -
1. Can you provide a screenshot of what you're seeing in the PDF attachment?
2. Are you forcing SSL?
3. What is your program URL / external URL? (found under Admin -> System settings)
4. Can you post the output of top|head-17?
Re: Availability Report email PDF blank
Posted: Wed Dec 09, 2015 7:34 am
by jkinning
1. Attached image
2. Not sure about forcing SSL but I am using SSL.
3. Attached
4.
top - 07:33:42 up 79 days, 19:13, 1 user, load average: 0.86, 1.28, 1.46
Tasks: 465 total, 2 running, 463 sleeping, 0 stopped, 0 zombie
Cpu(s): 3.6%us, 1.7%sy, 0.0%ni, 94.0%id, 0.6%wa, 0.0%hi, 0.1%si, 0.0%st
Mem: 33219220k total, 29056332k used, 4162888k free, 184092k buffers
Swap: 2064380k total, 80108k used, 1984272k free, 19955424k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
20357 nagios 20 0 302m 11m 7016 R 22.5 0.0 0:00.12 php
28646 mysql 20 0 8346m 155m 3140 S 5.6 0.5 10018:10 mysqld
20340 root 20 0 15284 1504 880 R 3.8 0.0 0:00.04 top
18501 postgres 20 0 212m 5724 4148 S 1.9 0.0 0:00.55 postmaster
61818 nagios 20 0 66156 48m 1312 S 1.9 0.1 77:13.26 nagios
61849 nagios 20 0 56012 7532 1012 S 1.9 0.0 23:45.03 ndo2db
1 root 20 0 19360 936 672 S 0.0 0.0 0:26.20 init
2 root 20 0 0 0 0 S 0.0 0.0 0:00.01 kthreadd
3 root RT 0 0 0 0 S 0.0 0.0 41:58.86 migration/0
4 root 20 0 0 0 0 S 0.0 0.0 16:50.03 ksoftirqd/0
Re: Availability Report email PDF blank
Posted: Wed Dec 09, 2015 2:19 pm
by lmiltchev
Can you also run the following commands and show the output?
Code: Select all
ip addr
hostname -f
ping localhost -c 3
cat /etc/hosts
/usr/bin/wkhtmltopdf -V
grep use_https /usr/local/nagiosxi/html/config.inc.php
Have you tried using an IP address in the "Program URL" instead of a FQDN?
Re: Availability Report email PDF blank
Posted: Thu Dec 10, 2015 8:11 am
by jkinning
# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
link/ether 00:50:56:88:09:8a brd ff:ff:ff:ff:ff:ff
inet <correct IP> scope global eth0
inet6 fe80::250:56ff:fe88:98a/64 scope link
valid_lft forever preferred_lft forever
# hostname -f
<correct hostname>
# ping localhost -c 3
PING localhost.localdomain (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=1 ttl=64 time=0.044 ms
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=2 ttl=64 time=0.041 ms
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=3 ttl=64 time=0.050 ms
--- localhost.localdomain ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.041/0.045/0.050/0.003 ms
# cat /etc/hosts
127.0.0.1 localhost.localdomain localhost.localdomain localhost4 localhost4.localdomain4 localhost nagiosl1p nagiosl1p
::1 localhost.localdomain localhost.localdomain localhost6 localhost6.localdomain6 localhost nagiosl1p nagiosl1p
<correct IP> <correct Nagios server name entry>
# /usr/bin/wkhtmltopdf -V
wkhtmltopdf 0.12.1-c22928d (with patched qt)
# grep use_https /usr/local/nagiosxi/html/config.inc.php
$cfg['use_https']=true; // determines whether cron jobs and other scripts will force the use of HTTPS instead of HTTP
I did try the IP address but got this for the PDF report:
Not Found
The requested URL /reports/availability.php was not found on this server.
Apache/2.2.15 (CentOS) Server at <Nagios IP Address> Port 443
If you need or want the exact IP and hostname let me know where I can send them. Don't want to put that information out on a message board.
Re: Availability Report email PDF blank
Posted: Thu Dec 10, 2015 11:13 am
by rkennedy
I did try the IP address but got this for the PDF report:
Not Found
The requested URL /reports/availability.php was not found on this server.
Apache/2.2.15 (CentOS) Server at <Nagios IP Address> Port 443
When you changed your Program URL was it to
https://nagiosip/nagiosxi/?
Also, from the Nagios server, can you run the following -
Re: Availability Report email PDF blank
Posted: Thu Dec 10, 2015 1:10 pm
by jkinning
PING nagiosl1p.ws.wsfgrp.net (IP Address) 56(84) bytes of data.
64 bytes from nagiosl1p.ws.wsfgrp.net (IP Address): icmp_seq=1 ttl=64 time=0.052 ms
64 bytes from nagiosl1p.ws.wsfgrp.net (IP Address): icmp_seq=2 ttl=64 time=0.036 ms
I used the FQDN -
https://nagiosl1p.ws.wsfgrp.net/nagiosxi/
Re: Availability Report email PDF blank
Posted: Thu Dec 10, 2015 1:36 pm
by tgriep
In the XI GUI, can you go in to Admin > System Settings and fill in the External URL to match the Program URL. Then see if you can email and / or access the reports after the change.
Let us know if this works for you.
Re: Availability Report email PDF blank
Posted: Fri Dec 11, 2015 7:54 am
by jkinning
No same thing a blank report both if sent by email or clicking the PDF icon. The csv versions appear to be working just not as user friendly.
Re: Availability Report email PDF blank
Posted: Fri Dec 11, 2015 2:03 pm
by rkennedy
jkinning wrote:PING nagiosl1p.ws.wsfgrp.net (IP Address) 56(84) bytes of data.
64 bytes from nagiosl1p.ws.wsfgrp.net (IP Address): icmp_seq=1 ttl=64 time=0.052 ms
64 bytes from nagiosl1p.ws.wsfgrp.net (IP Address): icmp_seq=2 ttl=64 time=0.036 ms
I used the FQDN -
https://nagiosl1p.ws.wsfgrp.net/nagiosxi/
Can you try setting your Program URL to
https://nagiosxiip/nagiosxi/ ?