email issue: Unable to bind parameters & Statement not prepared

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
JohnFLi
Posts: 559
Joined: Mon Jun 17, 2013 3:11 pm

email issue: Unable to bind parameters & Statement not prepared

Post 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?
Everybody is somebody else’s weirdo
kg2857
Posts: 490
Joined: Wed Apr 12, 2023 5:48 pm

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

Post by kg2857 »

I'd guess the DB needs a repair.
Marilian
Posts: 6
Joined: Sun Jun 25, 2023 11:31 pm

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

Post 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
Lillian
Posts: 3
Joined: Thu Jul 04, 2024 4:28 pm

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

Post by Lillian »

It typically encountered in database operations, specifically when using prepared statements.
jsimon
Posts: 339
Joined: Wed Aug 23, 2023 11:27 am

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

Post 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.
User avatar
jmichaelson
Posts: 375
Joined: Wed Aug 23, 2023 1:02 pm

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

Post 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.
Please let us know if you have any other questions or concerns.

-Jason
Locked