Scheduled Report PDF not attached

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
BenCowan
Posts: 68
Joined: Thu Jul 28, 2011 11:34 am

Scheduled Report PDF not attached

Post 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?
jsimon
Posts: 116
Joined: Wed Aug 23, 2023 11:27 am

Re: Scheduled Report PDF not attached

Post 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.
BenCowan
Posts: 68
Joined: Thu Jul 28, 2011 11:34 am

Re: Scheduled Report PDF not attached

Post 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=<nagiosxi-noreply@xxxx.xxxxxx.xxx>
2024 Apr 29 07:30:03 rohan [mail.info] postfix/cleanup[729094]: 1F6654023FC: message-id=<9PPgUky1d79evruxpIlq2m11jJc2nJPY7iJaTazg@rohan.xxxx.xxxxxx.xxx>
2024 Apr 29 07:30:03 rohan [mail.info] postfix/qmgr[1274]: 1F6654023FC: from=<nagiosxi-noreply@xxxx.xxxxxx.xxx>, size=2685, nrcpt=5 (queue active)
2024 Apr 29 07:30:03 rohan [mail.info] postfix/smtp[729098]: 1F6654023FC: to=<ias_dba@xxxx.xxxxxx.xxx>, 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=<ias_psa@xxxx.xxxxxx.xxx>, 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=<ns_all@xxxx.xxxxxx.xxx>, 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=<scs_operational_managers@xxxx.xxxxxx.xxx>, 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=<se_sysnotify@xxxx.xxxxxx.xxx>, 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
BenCowan
Posts: 68
Joined: Thu Jul 28, 2011 11:34 am

Re: Scheduled Report PDF not attached

Post 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
bbahn
Posts: 127
Joined: Thu Jan 12, 2023 5:42 pm

Re: Scheduled Report PDF not attached

Post 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
April: Actively advancing awesome answers with ardent alliteration, aptly addressing all ambiguities. Amplify your acumen and avail our amicable assistance. Eagerly awaiting your astute assessments of our advice.
BenCowan
Posts: 68
Joined: Thu Jul 28, 2011 11:34 am

Re: Scheduled Report PDF not attached

Post 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
jsimon
Posts: 116
Joined: Wed Aug 23, 2023 11:27 am

Re: Scheduled Report PDF not attached

Post by jsimon »

Glad you were able to sort it out! I'll go ahead and lock this post.
Locked