Page 1 of 1

email issue: Unable to bind parameters & Statement not prepared

Posted: Mon Jun 19, 2023 10:06 am
by JohnFLi
Our Nagios version: 5.10.0
our nagios xi is set to use 'send mail'
in trying to find out why some (only some) messages are not being sent out for alerting.

I look in /usr/local/nagios/var/nagios.log file and i see:
[1687186711] NDO-3: ndo_return = 1 (Statement not prepared)
[1687186711] NDO-3: ndo_handle_system_command(ndo-handlers.c:334): Unable to bind parameters
[1687186711] NDO-3: ndo_return = 1 (Statement not prepared)
[1687186711] NDO-3: ndo_handle_system_command(ndo-handlers.c:334): Unable to bind parameters
[1687186711] NDO-3: ndo_return = 1 (Statement not prepared)
[1687186711] NDO-3: ndo_handle_system_command(ndo-handlers.c:334): Unable to bind parameters
[1687186711] NDO-3: ndo_return = 1 (Statement not prepared)
[1687186711] NDO-3: ndo_handle_system_command(ndo-handlers.c:334): Unable to bind parameters

any thoughts?

Re: email issue: Unable to bind parameters & Statement not prepared

Posted: Mon Jun 19, 2023 8:44 pm
by kg2857
I'd guess the DB needs a repair.

Re: email issue: Unable to bind parameters & Statement not prepared

Posted: Sun Jun 25, 2023 11:36 pm
by Marilian
All data that is not specific to the hosts is placed into one or more templates that I design. Then, have a script generate the template, hostname, and address into separate host.
amanda the adventurer

Re: email issue: Unable to bind parameters & Statement not prepared

Posted: Thu Jul 25, 2024 6:06 am
by Lillian
It typically encountered in database operations, specifically when using prepared statements.

Re: email issue: Unable to bind parameters & Statement not prepared

Posted: Thu Jul 25, 2024 2:41 pm
by jsimon
Hi @JohnFli,

We have a guide for enabling phpmailer debugging here.

Following these steps and enabling debugging during a period you would expect alerts to go out should provide more insight into the issue. Please let us know if you run into any trouble with these steps. Otherwise, let us know what errors you're finding for additional steps.

Re: email issue: Unable to bind parameters & Statement not prepared

Posted: Thu Jul 25, 2024 3:29 pm
by jmichaelson
My question, since this is a year old thread, is whether this happens on Nagios XI 2024R1.1.x? I'd recommend updating to a newer version of XI as soon as reasonably possible.