Page 1 of 1

Every report is emtpy (64B)

Posted: Mon Feb 03, 2014 4:27 am
by fogier
CentOS 64bit (your vm from the website) on Vsphere 5.0 Update 2.
Nagios XI 2012Rv2.7

When I create a report and send it (csv/pdf doesn't matter) by email, then attachment is always 64B (thus corrupt/empty).
If a create the same report and export it to pdf without the email it works fine.

Our mgmt wants a monthly report on our website uptime so this feature is highly needed here. :mrgreen:

Re: Every report is emtpy (64B)

Posted: Mon Feb 03, 2014 9:11 am
by belvdr
I tested the availability report for the last 24 hours on 2012R2.8c and am not seeing this issue. Could it be one of your mail relays removing the attachment and/or not trusting your From: email address (specified on Admin -> Manage Email Settings)?

Re: Every report is emtpy (64B)

Posted: Mon Feb 03, 2014 10:40 am
by sreinhardt
This is generally caused by one of few things. If your nagios otherwise appears fine as it sounds, it is likely an issue with the backend api items. To check,

Go to admin -> Manage Components -> click on settings for Backend API URL -> Select the Nagiosadmin user, and hit apply settings -> Select the link from the Hosts field and paste it into your address bar.

This should change you to a xml page containing information on your hosts. At the top, you should see a record count amount above 0 or 1, like this:

<hostlist>
<recordcount>29</recordcount>
<host id="168">

If record count is 0 or 1 and not a number accurate to number of hosts you are monitoring, you need to run the following two commands.

service ndo2db restart
[wait more than 1 minute]
service nagios restart

If you feel the record count is accurate, please send me the first 5-10 lines of that page. Considering this is specific to emailing as attachments, it might also be an issue with sendmail\smtp settings, but let's start here first.

Re: Every report is emtpy (64B)

Posted: Thu Feb 06, 2014 2:53 am
by fogier
Thank you both for your reply.
Number is accurate. Tried both sendmail and smtp. Both have the same problem. We're using Exchange 2010 SP3.

Here is the first 10 lines:

Code: Select all

<hostlist>
<recordcount>324</recordcount>
<host id="2418">
<instance_id>1</instance_id>
<host_name>S_H_SV16863</host_name>
<is_active>1</is_active>
<config_type>1</config_type>
<alias>Nagios Netwerk</alias>
<display_name>Nagios Netwerk</display_name>
<address>145.32.229.231</address>

Re: Every report is emtpy (64B)

Posted: Thu Feb 06, 2014 10:57 am
by slansing
Did you recently change the address of your XI server? If so, make sure you change it's address in the web interface as well:

Admin > System Configuration

This has been known to cause issues with reports.

Re: Every report is emtpy (64B)

Posted: Mon Feb 17, 2014 10:24 am
by fogier
Name of the server never changed.

Re: Every report is emtpy (64B)

Posted: Mon Feb 17, 2014 1:06 pm
by lmiltchev
Try to create/send a report, then run the following command and show us the output:

Code: Select all

tail -50 /var/log/httpd/error_log

Re: Every report is emtpy (64B)

Posted: Thu Mar 20, 2014 7:53 am
by fogier
Somehow, it's trying to connect to our proxy server.

Code: Select all

--2014-03-20 13:52:10--  http://ssc-nagios/nagiosxi//reports/availability.php?&username=fogier&ticket=haeji95otn0hvaolo5m89k6uqjnlil24sfmcmo4hf5vdeov4slc38f022mnj9ok5&locale=&mode=pdf
Connecting to 145.32.97.5:8080... connected.
Proxy request sent, awaiting response... 503 Service Unavailable
2014-03-20 13:52:10 ERROR 503: Service Unavailable.

--2014-03-20 13:52:10--  http://ssc-nagios/nagiosxi//reports/availability.php?&username=fogier&ticket=haeji95otn0hvaolo5m89k6uqjnlil24sfmcmo4hf5vdeov4slc38f022mnj9ok5&locale=&mode=csv&csvtype=host
Connecting to 145.32.97.5:8080... connected.
Proxy request sent, awaiting response... 503 Service Unavailable
2014-03-20 13:52:10 ERROR 503: Service Unavailable.

--2014-03-20 13:52:10--  http://ssc-nagios/nagiosxi//reports/availability.php?&username=fogier&ticket=haeji95otn0hvaolo5m89k6uqjnlil24sfmcmo4hf5vdeov4slc38f022mnj9ok5&locale=&mode=csv&csvtype=service
Connecting to 145.32.97.5:8080... connected.
Proxy request sent, awaiting response... 503 Service Unavailable
2014-03-20 13:52:10 ERROR 503: Service Unavailable.
Than I editted the /etc/wgetrc and added the dns hostname to no_proxy.

Code: Select all

no_proxy = localhost,127.0.0.1,ssc-nagios
Problem solved! Thanks a lot.

Re: Every report is emtpy (64B)

Posted: Thu Mar 20, 2014 8:03 am
by scottwilkerson
This is because you your proxy setting on the Nagios XI server.

Edit /etc/hosts on your Nagios XI server, making the following line

Code: Select all

127.0.0.1   localhost.localdomain localhost
look like this

Code: Select all

127.0.0.1   localhost.localdomain localhost ssc-nagios
Also, edit /etc/wgetrc and make sure you have excluded the following with the no_proxy

Code: Select all

no_proxy=ssc-nagios,localhost,127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 # Hosts to exclude from proxying