Page 1 of 1

Nagios restarts with ndoutils

Posted: Mon Sep 14, 2015 4:53 am
by yunushaikh
Hello Sir,

I have configured ndoutils2.0 with nagios 4.0.8. I noticed that everytime I restart nagios, ndoutils deletes all the entries from nagios_commands, nagios_hosts, nagios_services table and put it back. I think that this process takes little long. Can you please tell me what all tables are reloaded and also if there is any way to only update the mysql table instead of deleting and reinserting all the values.

I notice that nagios_servicechecks table gets loads of entries when nagios is restarted.
I have around 1 million entries in that table. Is there anyway to avoid this. Please suggest.

Re: Nagios restarts with ndoutisl

Posted: Mon Sep 14, 2015 7:47 am
by yunushaikh
Warning: queue send error, retrying...
ndo2db: Message sent to queue.

When there is nagios restart then I get this kind of messages continuously in /var/log/messages.

What is causing this issue.
cat /proc/sys/kernel/msgmni
32768

cat /proc/sys/kernel/msgmax
65536

cat /proc/sys/kernel/msgmnb
65536


Please suggest

Re: Nagios restarts with ndoutisl

Posted: Mon Sep 14, 2015 9:22 am
by tmcdonald
ndo is currently going through some major changes, in particular there is a bug we have been chasing for months (since we can't replicated it in-house, this has been difficult). We think we have gotten that squashed, next up is to streamline exactly what you have mentioned here, along with some other things.

For right now I don't really have a great resolution for you, since anything I came up with would need to be implemented by the developers.

The only questions I would have it related to your queues. What is the output of the following?

ipcs -q

Re: Nagios restarts with ndoutisl

Posted: Mon Sep 14, 2015 9:56 am
by yunushaikh
Below is the output of ipcs -q

------ Message Queues --------
key msqid owner perms used-bytes messages
0x19030002 1441792 nagios 600 0 0
0xcb030002 2392065 nagios 600 0 0
0xc0030002 3997698 nagios 600 0 0
0x51030002 1900547 nagios 600 0 0
0xdd030002 2031620 nagios 600 0 0
0x8c030002 2555909 nagios 600 0 0
0x30030002 2457606 nagios 600 0 0
0x4a030002 2490375 nagios 600 0 0
0x85030002 2523144 nagios 600 0 0
0x6a030002 2719753 nagios 600 0 0
0x7d030002 2621450 nagios 600 0 0
0x84030002 2654219 nagios 600 0 0
0xc3030002 2686988 nagios 600 0 0
0x37030002 2850829 nagios 600 0 0
0xa1030002 2785294 nagios 600 0 0
0xca030002 2818063 nagios 600 0 0
0x36030002 2883600 nagios 600 0 0
0x38030002 2916369 nagios 600 0 0
0x89030002 2949138 nagios 600 0 0
0x6f030002 2981907 nagios 600 0 0
0x20030002 3014676 nagios 600 0 0
0x77030002 3047445 nagios 600 0 0
0x86030002 3080214 nagios 600 0 0
0x62030002 3145751 nagios 600 0 0
0xcd030002 3178520 nagios 600 0 0
0xcf030002 3211289 nagios 600 0 0
0xe1030002 3244058 nagios 600 0 0
0xe4030002 3276827 nagios 600 0 0
0x13030002 3309596 nagios 600 0 0
0x65030002 3342365 nagios 600 0 0
0x74030002 3375134 nagios 600 0 0
0x88030002 3440671 nagios 600 0 0
0x49030002 3473440 nagios 600 0 0
0x9f030002 3637281 nagios 600 0 0
0x7e030002 3538978 nagios 600 0 0
0xdb030002 3571747 nagios 600 0 0
0xc4030002 3604516 nagios 600 0 0
0x99030002 3866661 nagios 600 65536 64
0x97030002 3702822 nagios 600 0 0
0xa9030002 3735591 nagios 600 0 0
0xfd030002 3768360 nagios 600 0 0
0x87030002 4030505 nagios 600 0 0
0xbe030002 4063274 nagios 600 0 0
0xf6030002 4096043 nagios 600 0 0
0xe3030002 4128812 nagios 600 0 0
0xe2030002 4161581 nagios 600 0 0
0xed030002 4194350 nagios 600 0 0
0xef030002 4227119 nagios 600 0 0
0x05030002 4259888 nagios 600 0 0

Re: Nagios restarts with ndoutils

Posted: Mon Sep 14, 2015 4:25 pm
by tgriep
You can edit the Linux kernel message queues and see if the resolves the issue.
Take a look at this link on how to do that.
https://support.nagios.com/wiki/index.p ... 3.x_Issues

Re: Nagios restarts with ndoutils

Posted: Mon Sep 14, 2015 6:36 pm
by Box293
You should only have one queue for the owner nagios.

This command will clear the queues:

Code: Select all

for i in `ipcs -q | grep nagios |awk '{print $2}'`; do ipcrm -q $i; done
I wrote a plugin that monitors the queues:
https://exchange.nagios.org/directory/P ... ue/details