PDFs reports showing up as non supported file type

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
emartine
Posts: 660
Joined: Thu Dec 29, 2011 10:47 am

PDFs reports showing up as non supported file type

Post by emartine »

We had an issue last night with our production NagiosXI server (Nagios XI 2014R2.6 ) where the database needed fixing (a message showed up on the screen regarding the database requiring a fix). After a fix and a restart of the services the notifications and checks were working as expected. This morning the reports that are usually sent out came out as 64bytes and unable to be read by anyone.
We get the message that "it is either not a supported file type of because the file ahs been damaged (for example, it was sent as an email attachment and wasn't correctly decoded)." I created a new report but the result is that same.

Some assistance would be appreciated.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: PDFs reports showing up as non supported file type

Post by dwhitfield »

Can you still properly view/download as pdf (Reports->Download As PDF)?
What about CSV or other file types?
What exactly are the reports that are having an issue?
What do you have in the "Program/External URL" fields under "System Settings" (Admin->Manage System Config)?
Are you using a proxy? If so, following https://support.nagios.com/kb/article.php?id=147 ? (specifically wget in this case)
What about SSL? If so, following https://assets.nagios.com/downloads/nag ... s%20XI.pdf
What's the output of /usr/bin/wkhtmltopdf -V?

Any yum updates recently? If so, can you send your yum.log (probably /var/log/yum.log)?

Can you PM me your Profile? You can download it by going to Admin > System Config > System Profile and click the Download Profile button towards the top. If for whatever reason you *cannot* download the profile, please put the output of View System Info (5.3.4+, Show Profile if older) in the thread (that will at least get us some info). This will give us access to many of the logs we would otherwise ask for individually. If security is a concern, you can unzip the profile take out what you like, and then zip it up again. We may end up needing something you remove, but we can ask for that specifically.

After you PM the profile, please update this thread. Updating this thread is the only way for it to show back up on our dashboard.
User avatar
emartine
Posts: 660
Joined: Thu Dec 29, 2011 10:47 am

Re: PDFs reports showing up as non supported file type

Post by emartine »

dwhitfield wrote:Can you still properly view/download as pdf (Reports->Download As PDF)?
What about CSV or other file types?
What exactly are the reports that are having an issue?
When I click on the "send report" to folks the received pdf gets the message above. When I attempt to generate a report by clicking on the PDF icon, the report is blank.
dwhitfield wrote: What do you have in the "Program/External URL" fields under "System Settings" (Admin->Manage System Config)?
the URL for the nagiosxi host. in program URL and nothing for the external URL field.
dwhitfield wrote: Are you using a proxy? If so, following https://support.nagios.com/kb/article.php?id=147 ? (specifically wget in this case)
No proxy.
dwhitfield wrote: What about SSL? If so, following https://assets.nagios.com/downloads/nag ... s%20XI.pdf
What's the output of /usr/bin/wkhtmltopdf -V?
/usr/bin/wkhtmltopdf -V
wkhtmltopdf 0.12.1-c22928d (with patched qt)

dwhitfield wrote: Any yum updates recently? If so, can you send your yum.log (probably /var/log/yum.log)?
NONE.
dwhitfield wrote: Can you PM me your Profile? You can download it by going to Admin > System Config > System Profile and click the Download Profile button towards the top. If for whatever reason you *cannot* download the profile, please put the output of View System Info (5.3.4+, Show Profile if older) in the thread (that will at least get us some info). This will give us access to many of the logs we would otherwise ask for individually. If security is a concern, you can unzip the profile take out what you like, and then zip it up again. We may end up needing something you remove, but we can ask for that specifically.

After you PM the profile, please update this thread. Updating this thread is the only way for it to show back up on our dashboard.
I am unable to create a profile. I get the error

Failed to retrieve zip file!
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: PDFs reports showing up as non supported file type

Post by dwhitfield »

Thank you for the Show Profile information. I have shared that with the other techs.

There should be a CSV icon to the left of the PDF icon. Does that work?

The information for these reports comes from different places. That's why I want to know exactly which reports are an issue. It's possible this is related to your other thread on alerting if everything is getting pulled from the nagios.log.

Does the profile generate if you run /usr/local/nagiosxi/html/includes/components/profile/getprofile.sh? If not, could you provide the output of that command?

Also, if the command line does not work, can you please run tar -zcvf /tmp/supporttar.tar.gz /usr/local/nagios/etc /usr/local/nagios/var /var/log/httpd /var/log/messages and either post or PM the output. If you PM, please make sure you post in the thread so it comes back up on the dashboard.
User avatar
emartine
Posts: 660
Joined: Thu Dec 29, 2011 10:47 am

Re: PDFs reports showing up as non supported file type

Post by emartine »

The nagios log file is being written to

-rw-r--r-- 1 nagios nagios 14917632 May 1 10:23 nagios.log

[1493617342] SERVICE NOTIFICATION: <user being sent notification> ;server name;service ;state;service notification handler;....
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: PDFs reports showing up as non supported file type

Post by dwhitfield »

Do you not have the CSV icon? Just wondering if that's why you've ignored that question twice.

Does the profile generate if you run /usr/local/nagiosxi/html/includes/components/profile/getprofile.sh? If not, could you provide the errors?

Also, if the command line profile generation does not work, can you please run tar -zcvf /tmp/supporttar.tar.gz /usr/local/nagios/etc /usr/local/nagios/var /var/log/httpd /var/log/messages and either post or PM the output. If you PM, please make sure you post in the thread so it comes back up on the dashboard.
Locked