NSCA bottleneck / NSCA Timestamp
Thomas Guyot-Sionnest
thomas at zango.com
Mon Nov 19 19:12:13 CET 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Gerd Mueller wrote:
> Hi list,
>
> as many time before again I suffered from the NSCA bottle neck in
> Nagios. It's not new that NSCA can cause huge latency. Ton already
> mentioned this in his blog
> (http://altinity.blogs.com/dotorg/2006/11/caching_nsca_da.html).
>
> At my last project my workaround for this problem was to use the
> service_perfdat_file for caching and every 10 seconds the
> service_perfdata_file_processing_command to transfer this cached data to
> the master via one nsca call. This approach reduces/solves the latency
> problem. @Ton: with this approach there should be no need of any caching
> script and should work for hosts and services, or am I missing
> anything?
>
> Since nsca doesn't transfer any timestamps the reporting will not be
> correct at the master site! Ok, these 10 seconds delay isn't a big issue
> but I wonder why doesn't nsca transport the original timestamp?
>
> Because I would like the reporting to be as accurate as possible I would
> like to patch nsca. If changing nsca to include the timestamp would be
> worthwhile and there is any change for this patch to become part of nsca
> I write this patch.
While I don't have the final word, I really think this would be a good
idea. I think the best would be to keep full backwards-compatibility
while having an additional send_nsca switch to enable timestamps (would
add a required "<timestamp>[TAB]" in front of the other arguments passed
via STDIN). A compatible NSCA server would detect the timestamp (Not
sure how data in transfered, so I'll leave specific implementation
details to you) and use it for Nagios processing.
On a side note, you can have near-realtime processing without much
overhead with the Perl OCP_Daemon I wrote:
http://www.nagioscommunity.org/wiki/index.php/OCP_Daemon
It gets the data from host_perfdata_file and/or service_perfdata_file
using named pipes and pass it in bulk to send_nsca. It use event polling
for ultra fast operation, forks to run send_nsca to avoid blocking the
pipe and can really work realtime (although I highly recommend using
1-second reaper_delay instead as the throughput is much higher). It can
also limit the number of bulk results per send_nsca process.
- --
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHQdH96dZ+Kt5BchYRApNYAJ4hKLWXs7tkYk7105KNnGa9dJaEAQCggCgP
L65PyPgFgmMOEjpwhd1NjJ4=
=dnXt
-----END PGP SIGNATURE-----
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
More information about the Developers
mailing list