Page 1 of 2

Error while generating scheduled reports!!

Posted: Wed Jun 10, 2020 9:21 am
by deek
We are trying to to generate a scheduled report for a service group. And we have encountered some errors while doing so.

The reports are being sent successfully to the recipient mails but the reports are in unsupported formats(received in bytes),
Availbility Error_1.PNG
and the link along is throwing up an error with "ERROR: You are not authorized to view this report" on NagiosXi page.
Report_Error_2.PNG
Reports generated for single host or service is working fine and the reports received are in kb and accessible. I have attached the necessary screenshots. please help with the same.

Re: Error while generating scheduled reports!!

Posted: Wed Jun 10, 2020 10:04 am
by deek
Nagios_Report_Error.JPG

Re: Error while generating scheduled reports!!

Posted: Wed Jun 10, 2020 10:08 am
by deek
We are seeing this error in /var/log/httpd/ssl_error_log

l/nagiosxi/html/includes/utils-systat.inc.php on line 17, referer: https://hostname/nagiosxi/includes/comp ... -index.php
[Wed Jun 10 10:59:11.420460 2020] [:error] [pid 17012] [client **.**.**.**:51738] PHP Warning: simplexml_load_string(): Entity: line 25: parser error : EntityRef: expecting ';' in /usr/local/nagiosxi/html/includes/utils-systat.inc.php on line 17, referer: https://hostname/nagiosxi/includes/comp ... -index.php
[Wed Jun 10 10:59:11.420466 2020] [:error] [pid 17012] [client **.**.**.**:51738] PHP Warning: simplexml_load_string(): 149.254:1111/containers/json?&filters={%22id%22:%5B%22store-order-svc%22%5D}&all in /usr/local/nagiosxi/html/includes/utils-systat.inc.php on line 17, referer: https://hostname/nagiosxi/includes/comp ... -index.php
[Wed Jun 10 10:59:11.420471 2020] [:error] [pid 17012] [client **.**.**.**:51738] PHP Warning: simplexml_load_string(): ^ in /usr/local/nagiosxi/html/includes/utils-systat.inc.php on line 17, referer: https://hostname/nagiosxi/includes/comp ... -index.php
[Wed Jun 10 10:59:17.434911 2020] [:error] [pid 23495] [client **.**.**.**:62250] PHP Warning: simplexml_load_string(): Entity: line 25: parser error : EntityRef: expecting ';' in /usr/local/nagiosxi/html/includes/utils-systat.inc.php on line 17, referer: https://hostname/nagiosxi/
[Wed Jun 10 10:59:17.434939 2020] [:error] [pid 23495] [client **.**.**.**:62250] PHP Warning: simplexml_load_string(): > \xe2\x94\x94\xe2\x94\x8031696 curl http://172.29.149.254:1111/containers/json?&filters in /usr/local/nagiosxi/html/includes/utils-systat.inc.php on line 17, referer: https://hostname/nagiosxi/
[Wed Jun 10 10:59:17.434947 2020] [:error] [pid 23495] [client **.**.**.**:62250] PHP Warning: simplexml_load_string(): ^ in /usr/local/nagiosxi/html/includes/utils-systat.inc.php on line 17, referer: https://hostname/nagiosxi/
[Wed Jun 10 10:59:17.434967 2020] [:error] [pid 23495] [client **.**.**.**:62250] PHP Warning: simplexml_load_string(): Entity: line 25: parser error : EntityRef: expecting ';' in /usr/local/nagiosxi/html/includes/utils-systat.inc.php on line 17, referer: https://hostname/nagiosxi/
[Wed Jun 10 10:59:17.434973 2020] [:error] [pid 23495] [client **.**.**.**:62250] PHP Warning: simplexml_load_string():

Re: Error while generating scheduled reports!!

Posted: Wed Jun 10, 2020 4:36 pm
by ssax
Please run through these KB articles for troubleshooting:

https://support.nagios.com/kb/article/n ... s-829.html

https://support.nagios.com/kb/article/n ... g-742.html

Additionally, please run this tail command (and leave it running):

Code: Select all

tail -F /var/log/httpd/error_log /var/log/httpd/ssl_error_log /usr/local/nagiosxi/var/cmdsubsys.log /usr/local/nagiosxi/var/eventman.log /usr/local/nagiosxi/var/scheduledreporting.log
Then force the report to be sent and send me the full output of the tail command once it's completed.

Please send me a copy of your profile as well, you can download it from Admin > System Profile > Download Profile.

Re: Error while generating scheduled reports!!

Posted: Fri Jun 12, 2020 5:59 am
by deek
Hi Ssax

Attaching the requested docs here.

Profile
tailF_log.txt
Tail f log
profile.zip
Thanks

Re: Error while generating scheduled reports!!

Posted: Fri Jun 12, 2020 3:42 pm
by ssax
You have some crashed DB tables, please run the DB repair and then test the reports again:

Code: Select all

cd /usr/local/nagiosxi/scripts
./repair_databases.sh

Re: Error while generating scheduled reports!!

Posted: Sat Jun 13, 2020 7:14 am
by deek
Let me try running the script and get back to you with details

Re: Error while generating scheduled reports!!

Posted: Sat Jun 13, 2020 7:44 am
by deek
Ssax -- I tried running the repair script and it was successful. Following that i tried scheduling the report for one of the service groups and we still see the error as mentioned before.
repair_script.JPG
We have other nagios instances where the reporting is working fine. Would that profile help you for comparison?

-Deek

Re: Error while generating scheduled reports!!

Posted: Mon Jun 15, 2020 8:59 pm
by deek
Hi ssax

Awaiting your reply

thanks

Re: Error while generating scheduled reports!!

Posted: Tue Jun 16, 2020 12:47 pm
by ssax
Please edit this file:

Code: Select all

/usr/local/nagiosxi/html/config.inc.php
Change this:

Code: Select all

$cfg['use_https'] = false;
To this:

Code: Select all

$cfg['use_https'] = true;
Then run this tail command again as root (and leave it running):

Code: Select all

tail -F /var/log/httpd/error_log /var/log/httpd/ssl_error_log /usr/local/nagiosxi/var/cmdsubsys.log /usr/local/nagiosxi/var/eventman.log /usr/local/nagiosxi/var/scheduledreporting.log
Then force the report to be sent and send me the full output of the tail command once it's completed.