Page 1 of 1

Scheduled Report PDF not attached

Posted: Sun Apr 28, 2024 4:16 pm
by BenCowan
I have XI send a daily report of alerts over the previous 24 hours every morning at 7:30am, and at some point the normally attached PDF stopped coming with the report. I'm not sure when the problem started, but I see this in the scheduledreport.log file:

DEBUG:
[04-28-2024 12:55:40] Message sent! (method=sendmail), Referer: includes/components/scheduledreporting > Scheduled Report

DELETING /usr/local/nagiosxi/tmp/scheduledreport-bcowan-FtFBsS4OYsQu-1714334140-Alerts - Last 24 Hours.pdf

So, it appears the pdf is created, but never attached?

Re: Scheduled Report PDF not attached

Posted: Mon Apr 29, 2024 9:19 am
by jsimon
Hi @BenCowan,

Can you advise what version of XI you are currently on, as well as your Linux distro? Has your XI version changed recently? I'd like to know what your sendmail logs say, but location for this file varies based on distro.

Re: Scheduled Report PDF not attached

Posted: Mon Apr 29, 2024 10:14 am
by BenCowan
Sorry, RHEL 9, 2024R1.1.2

mail log:
2024 Apr 29 07:30:03 rohan [mail.info] postfix/pickup[645269]: 1F6654023FC: uid=1048 from=<[email protected]>
2024 Apr 29 07:30:03 rohan [mail.info] postfix/cleanup[729094]: 1F6654023FC: message-id=<[email protected]>
2024 Apr 29 07:30:03 rohan [mail.info] postfix/qmgr[1274]: 1F6654023FC: from=<[email protected]>, size=2685, nrcpt=5 (queue active)
2024 Apr 29 07:30:03 rohan [mail.info] postfix/smtp[729098]: 1F6654023FC: to=<[email protected]>, relay=smtp.xxxx.xxxxxx.xxx[123.456.198.55]:25, delay=0.36, delays=0.02/0.01/0.01/0.32, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 6F5CE1000092)
2024 Apr 29 07:30:03 rohan [mail.info] postfix/smtp[729098]: 1F6654023FC: to=<[email protected]>, relay=smtp.xxxx.xxxxxx.xxx[123.456.198.55]:25, delay=0.36, delays=0.02/0.01/0.01/0.32, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 6F5CE1000092)
2024 Apr 29 07:30:03 rohan [mail.info] postfix/smtp[729098]: 1F6654023FC: to=<[email protected]>, relay=smtp.xxxx.xxxxxx.xxx[123.456.198.55]:25, delay=0.36, delays=0.02/0.01/0.01/0.32, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 6F5CE1000092)
2024 Apr 29 07:30:03 rohan [mail.info] postfix/smtp[729098]: 1F6654023FC: to=<[email protected]>, relay=smtp.xxxx.xxxxxx.xxx[123.456.198.55]:25, delay=0.36, delays=0.02/0.01/0.01/0.32, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 6F5CE1000092)
2024 Apr 29 07:30:03 rohan [mail.info] postfix/smtp[729098]: 1F6654023FC: to=<[email protected]>, relay=smtp.xxxx.xxxxxx.xxx[123.456.198.55]:25, delay=0.36, delays=0.02/0.01/0.01/0.32, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 6F5CE1000092)
2024 Apr 29 07:30:03 rohan [mail.info] postfix/qmgr[1274]: 1F6654023FC: removed

Re: Scheduled Report PDF not attached

Posted: Thu May 02, 2024 5:57 pm
by BenCowan
Found this in reportengine.log:

Database Error: Could not connect to database
No such file or directory
Database Error: Could not connect to database
No such file or directory
/bin/sh: /usr/bin/php: No such file or directory
PHP Fatal error: Uncaught Error: Call to undefined function mysqli_connect_error() in /app/nagios/nagiosxi/html/db/adodb/drivers/adodb-mysqli.inc.php:804
Stack trace:
#0 /app/nagios/nagiosxi/html/includes/db.inc.php(336): ADODB_mysqli->ErrorMsg()
#1 /app/nagios/nagiosxi/html/includes/db.inc.php(236): db_connect()
#2 /app/nagios/nagiosxi/cron/reportengine.php(31): db_connect_all()
#3 /app/nagios/nagiosxi/cron/reportengine.php(16): init_reportengine()
#4 {main}
thrown in /app/nagios/nagiosxi/html/db/adodb/drivers/adodb-mysqli.inc.php on line 804

Re: Scheduled Report PDF not attached

Posted: Fri May 03, 2024 9:39 am
by bbahn
Hello @BenCowan,

Can you connect to your mysql database via the CLI? If you need the passwords used by Nagios XI, you can get them from /usr/local/nagiosxi/scripts/get_mysql_passwords.sh

Re: Scheduled Report PDF not attached

Posted: Fri May 03, 2024 5:59 pm
by BenCowan
I'm shocked that I actually solved this, but out of desperation, I browsed every log in ../nagiosxi/var and in chromium_report.log, I found that the command 'chromium-browser' was not found. It turns out that one of my colleagues, thought we wouldn't need all the accompanying baggage, so he had uninstalled it. After I put it back, the report attachements began working again. :D

Re: Scheduled Report PDF not attached

Posted: Mon May 06, 2024 9:24 am
by jsimon
Glad you were able to sort it out! I'll go ahead and lock this post.