Option append_to_file in nsca.cfg

Marc Powell marc at ena.com
Tue Mar 13 17:17:19 CET 2007



> -----Original Message-----
> From: nagios-users-bounces at lists.sourceforge.net [mailto:nagios-users-
> bounces at lists.sourceforge.net] On Behalf Of Wheeler, JF (Jonathan)
> Sent: Tuesday, March 13, 2007 9:59 AM
> To: nagios-users at lists.sourceforge.net
> 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.

--
Marc



-------------------------------------------------------------------------
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
Nagios-users at lists.sourceforge.net
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





More information about the Users mailing list