> -----Original Message----- > From: [EMAIL PROTECTED] On Behalf Of Marc Powell > Sent: 13 March 2007 16:17 > > > -----Original Message----- > > From: nagios-users On Behalf Of Wheeler, JF (Jonathan) > > Sent: Tuesday, March 13, 2007 9:59 AM > > To: [email protected] > > Subject: [Nagios-users] Option append_to_file in nsca.cfg > > > > As I have said before my configuration consists of 1 master server and 2 > > slaves with about 700 hosts and 16000 checks. In the file nsca.cfg > > which configures the nsca daemon, there is an append_to_file option > > which is (by default) set to 0 for writing to the command file rather > > than 1 for appending to it. Please would someone explain why appending > > to the command file is deprecated. I ask because I can have several > > Semi-educated commentary follows -- The 'command file' is more properly > named a 'command pipe'. It's not a real file and therefore appending to > it makes no sense. A pipe is essentially a FIFO buffer. Data is written > to it by one process and read by another in a sequential fashion. If the > reading process can't keep up with the writing process, your kernel will > buffer the writes up to a point depending on the OS. For linux kernel > < 2.6.11 the buffer was 4096 bytes. For > 2.6.11, the buffer is 65535 > bytes. Nagios also has its own internal buffers to help process the pipe > faster. With nagios-2.7, these are controlled by the > external_command_buffer_slots option in nagios.cfg. You can also control > how often nagios checks for data in the pipe with the command_check_interval > setting. You certainly want that to be -1 and not > every 4 seconds. -1 tells nagios to check as often as possible. > > Depending on your check frequency, it sounds like nagios isn't able to > keep up with your check submissions, almost certainly related to your > checking the pipe every 4 seconds only. At ~100 bytes per check, you > could only accept 40 results in 4 seconds before dropping. If you're > doing 16,000 checks every 5 minutes that's ~213 check results every 4 > seconds. You can do the math based on your actual sizes/intervals... > > Verify that you have a good amount of buffer slots (use nagiostats to > see current utilization) and that you're checking external commands as > fast as possible. > > I'm only doing 1/4 of the passive checks you are so you may be hitting > limits that I haven't experienced yet but it doesn't appear so at this > point.
Sorry, I think that I have confused the discussion by not appreciating the difference between service_reaper_frequency (which is 4 secs) and command_check_interval (which is -1). After restarting nagios this morning (Thur 15/03 - the master server had panic'ed due to lack of memory), I issued the command "wc -l /var/log/nagios/rw/nagios.cmd" and got the answer 1003 (this is command pipe). If I understand you correctly, there were 1003 commands in the pipe waiting to be processed by the server (understandable as the master server had just restarted and the slaves had plenty of commands waiting to be processed), but the operation of command wc actually discarded these commands by reading through the pipe. At present I am running nagios 2.6. I want to upgrade to nagios 2.8, but as I also use ndoutils I need to compile the latest version of that and update the SQL tables that it writes. If the problem does not go away with the latest version of the server, I will raise the issues again, but nay other comments would be much appreciated. Jonathan Wheeler e-Science Centre Rutherford Appleton Laboratory ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Nagios-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
