Every report is emtpy (64B)

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
fogier
Posts: 66
Joined: Fri Jul 13, 2012 12:53 am

Every report is emtpy (64B)

Post 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:
Last edited by fogier on Thu Mar 20, 2014 8:30 am, edited 1 time in total.
belvdr
Posts: 81
Joined: Tue Oct 08, 2013 9:17 pm

Re: Every report is emtpy (64B)

Post 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)?
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Every report is emtpy (64B)

Post 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.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
fogier
Posts: 66
Joined: Fri Jul 13, 2012 12:53 am

Re: Every report is emtpy (64B)

Post 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>
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Every report is emtpy (64B)

Post 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.
fogier
Posts: 66
Joined: Fri Jul 13, 2012 12:53 am

Re: Every report is emtpy (64B)

Post by fogier »

Name of the server never changed.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Every report is emtpy (64B)

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
fogier
Posts: 66
Joined: Fri Jul 13, 2012 12:53 am

Re: Every report is emtpy (64B)

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Every report is emtpy (64B)

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked