Scheduled Reports PDF Broken

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
highness
Posts: 192
Joined: Thu May 01, 2014 4:25 pm

Scheduled Reports PDF Broken

Post by highness »

We have a couple of reports that appear to be broken after we upgraded to 5.2.9 (one of the reports only runs once a month, so we didn't catch it until today)

We get the email that has the page.pdf attachment, but when we try to open it, the browser says that the file is corrupt. When I look at the attachment it looks like this (it's been truncated due to size limitations, but you get the idea):

Code: Select all

        <!DOCTYPE html>
        <!-- Produced by Nagios XI. Copyright (c) 2008-2016 Nagios Enterprises, LLC (www.nagios.com). All Rights Reserved. -->
        <!-- Powered by the Nagios Synthesis Framework -->
        <html>

    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
                <title>Nagios XI - Dashboard - Internet and WAN Router Utilization</title>
        <meta name="ROBOTS" content="NOINDEX, NOFOLLOW">
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>


    <link rel="icon" type="image/png" href="http://nagios.example.com/nagiosxi/images/favicon-32x32.png" sizes="32x32" />
    <link rel="shortcut icon" href="http://nagios.example.com/nagiosxi/images/favicon.ico" type="image/ico"/>

    <script type='text/javascript'>
        var base_url = "http://nagios.example.com/nagiosxi/";
        var backend_url = "http%3A%2F%2Fnagios.example.com%2Fnagiosxi%2F%2Fdashboards%2Fdashboard.php";
        var ajax_helper_url = "http://nagios.example.com/nagiosxi/ajaxhelper.php";
        var ajax_proxy_url = "http://nagios.example.com/nagiosxi/ajaxproxy.php";
        var suggest_url = "http://nagios.example.com/nagiosxi/suggest.php";
        var request_uri = "%2Fnagiosxi%2F%2Fdashboards%2Fdashboard.php%3Fid%3Dr8284oga%26username%3Dnagiosadmin%26ticket%3Dk7u8q3ou%26locale%3Den_US%26mode%3Dpdf";
        var permalink_base = "http%3A%2F%2Fnagios.example.com%2Fnagiosxi%2F%2Fdashboards%2Fdashboard.php%3F%26id%3Dr8284oga%26username%3Dnagiosadmin%26ticket%3Dk7u8q3ou%26locale%3Den_US%26mode%3Dpdf";
        var demo_mode =0;
        var nsp_str = "c51089eb1ee55d7b0fa4f83cb5d2495c659b9e670a76954107e9c8b55f559069";
    </script>

    <!-- Adding Font-Awesome for all themes -->
    <link rel="stylesheet" href="http://nagios.example.com/nagiosxi/includes/css/font-awesome.min.css?1465567804" type="text/css" />

    <!-- main jquery libraries -->
    <script type='text/javascript' src='http://nagios.example.com/nagiosxi/includes/js/jquery/jquery-1.11.2.min.js?1465567804'></script>
    <script type='text/javascript' src='http://nagios.example.com/nagiosxi/includes/js/jquery/jquery-migrate-1.2.1.min.js?1465567804'></script>
    <link type="text/css" href="http://nagios.example.com/nagiosxi/includes/js/jquery/css/smoothness/jquery-ui-1.9.0.custom.min.css?1465567804" rel="stylesheet"/>
    <script type='text/javascript' src='http://nagios.example.com/nagiosxi/includes/js/jquery/jquery.colorBlend.js'></script>
    <script type='text/javascript' src='http://nagios.example.com/nagiosxi/includes/js/jquery/jquery.timers-1.1.3.js'></script>
    <script type='text/javascript' src='http://nagios.example.com/nagiosxi/includes/js/jquery/jquery-ui-1.9.0.custom.min.js?1465567804'></script>
    <script type='text/javascript' src='http://nagios.example.com/nagiosxi/includes/js/jquery/jquery-ui-timepicker-addon.js?1465567804'></script>
    <script type='text/javascript' src='http://nagios.example.com/nagiosxi/includes/js/jquery/jquery.searchabledropdown.custom.js?1465567804'></script>

            <!-- Bootstrap 3 for XI 5 UI -->
        <link rel="stylesheet" href="http://nagios.example.com/nagiosxi/includes/css/bootstrap.3.min.css?1465567804" type="text/css" />
        <script type='text/javascript' src='http://nagios.example.com/nagiosxi/includes/js/bootstrap.3.min.js?1465567804'></script>

    <!-- spin kit -->
    <link rel="stylesheet" href="http://nagios.example.com/nagiosxi/includes/css/spinkit.css?1465567804" type="text/css" />

    <!-- jquery autocomplete -->
    <link rel='stylesheet' type='text/css' href='http://nagios.example.com/nagiosxi/includes/css/jquery.autocomplete.css'/>

    <!-- colorpicker -->
    <link rel="stylesheet" href="http://nagios.example.com/nagiosxi/includes/js/jquery/colorpicker/css/colorpicker.css" type="text/css" />
    <script type="text/javascript" src="http://nagios.example.com/nagiosxi/includes/js/jquery/colorpicker/js/colorpicker.js"></script>
example.com
In the email, the link to the report can be directly accessed and the report is displayed without issue.

I can run wkhtmltopdf from the command line and use that same link to generate the pdf and it works.

It just fails when we try to let the scheduled report work.

Any ideas? Suggestions?
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Scheduled Reports PDF Broken

Post by rkennedy »

Could you post your /var/log/httpd/error_log and /var/log/httpd/ssl_error_log for us to review? If it's truncating, I'm wondering if you're hitting a max variable limit somewhere.

Would this be a report that has to pull a lot of data?
Former Nagios Employee
highness
Posts: 192
Joined: Thu May 01, 2014 4:25 pm

Re: Scheduled Reports PDF Broken

Post by highness »

Just PM'd the logs to you.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Scheduled Reports PDF Broken

Post by rkennedy »

Not seeing anything in my inbox here, where did you send it exactly?
Former Nagios Employee
highness
Posts: 192
Joined: Thu May 01, 2014 4:25 pm

Re: Scheduled Reports PDF Broken

Post by highness »

Sent you another PM with that info.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Scheduled Reports PDF Broken

Post by ssax »

What are you seeing in /usr/local/nagiosxi/var/scheduledreporting.log? It should give us an indication of what is going on.

Are you scheduling a page or scheduling a specific report? I know there is a bug when scheduling a page (not a report) as a PDF.
USPHNetAdmins
Posts: 17
Joined: Tue Jul 02, 2013 9:55 am

Re: Scheduled Reports PDF Broken

Post by USPHNetAdmins »

I am also trying to schedule a page to email as a report. Is there any way to turn the page into a report?
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Scheduled Reports PDF Broken

Post by mcapra »

@USPHNetAdmins please refer to this document under the "Scheduling a Page" section:
https://assets.nagios.com/downloads/nag ... eports.pdf

Also please open a new thread next time if you have a question not relating to the original thread :)

@highness let us know when you have the log info requested by @ssax
Former Nagios employee
https://www.mcapra.com/
Locked