This article covers how to resolve the Nagios error, NDOUtils: Message Queue Exceeded error occurs when the amount of messages increases.
NDOUtils uses the operating system kernel message queue. As the amount of messages increases the kernel settings need to be tuned to allow more messages to be queued and processed.
A flood of messages in the /var/log/messages related to ndo2db like:
ndo2db: Error: max retries exceeded sending message to queue. Kernel queue parameters may neeed to be tuned. See README.
ndo2db: Warning: queue send error, retrying...
Nature of this Nagios error:
In Nagios you experience the following symptoms:
1. Missing hosts or services or status data
2. Takes a very long time to restart the Nagios process
3. Unusually high CPU load
How to fix Nagios error, NDOUtils: Message Queue Exceeded ?
The following commands are for the msgmni option.
For the grep command you executed previously:
i. If it did not return output, this command will add the setting to the /etc/sysctl.conf file:
$ echo 'kernel.msgmni = 512000' >> /etc/sysctl.conf
2. If it did return output, this command will update the setting in the /etc/sysctl.conf file:
$ sed -i 's/^kernel\.msgmni.*/kernel\.msgmni = 512000/g' /etc/sysctl.conf
3. After making those changes, execute the following command:
$ sysctl -p
4. You need to restart services using the commands below:
$ systemctl stop nagios.service
$ systemctl restart ndo2db.service
$ systemctl start nagios.service