NSCA patches

This forum is intended for the discussion of Nagios plugin development. Feature requests, patches, bug fixes, and all types of development-related discussions are welcome!

NOTE: The SourceForge.net nagiosplug-devel mailing list has been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

NSCA patches

Postby SoulA » Fri Jan 24, 2014 3:32 pm

I have a few patches that I made for the NSCA daemon to fix a few bugs I found. I also have a recompiled version of the following that fixes an issue there:

http://exchange.nagios.org/directory/Ad ... nt/details

Where might I be able to contribute those? I know NSCA has fallen out of favor but unfortunately I'm still stuck with it for the time being. I'm not really a fan of just throwing them up on the tracker. Is there a github or something like that?
SoulA
 
Posts: 19
Joined: Mon Oct 10, 2011 9:47 am

Re: NSCA patches

Postby slansing » Fri Jan 24, 2014 3:49 pm

NSCA, and especially NSCA win are tough ones. Specifically, NSCA win is not actively maintained anymore as far as I know, because most users grab NSClient and use the already included NSCA module. I would get in touch with the sourceforge mailing list /devel forums on that one.
slansing
 
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: NSCA patches

Postby SoulA » Sat Feb 08, 2014 9:25 am

I was under the impression those were shut down in favor of these forums.

http://sourceforge.net/mailarchive/foru ... gios-devel
SoulA
 
Posts: 19
Joined: Mon Oct 10, 2011 9:47 am

Re: NSCA patches

Postby SoulA » Sun Feb 09, 2014 1:09 pm

For what is worth I put my "fork" here:

https://github.com/awiddersheim/nsca-aw

I started this project after the NSCA daemon (running in single mode) hung in our production environment. This started my bug hunt and it turns out there are a few nasty bugs especially when running in single mode which I believe is now the default but I could be misremembering.

I changed a lot of stuff and I'm not sure that all of it works yet. Most of my changes were to just get the code readable and the logging better. In an effort to hopefully save someone's time I'll hit on the more major bugs that I found.

This commit hopefully fixes the bug that originally started me down this path. An incorrect call to fcntl() has the potential to not put sockets into non-blocking mode when running the NSCA daemon in "single" mode. This can result in the daemon hanging forever. There is no error checking around these calls so you would never really know that. I have a commit somewhere that adds error checking to this system call among many others.
https://github.com/awiddersheim/nsca-aw ... 76c2d91a63

Memory leak fixes:
https://github.com/awiddersheim/nsca-aw ... 0a8e79a655
https://github.com/awiddersheim/nsca-aw ... e91a890d7e
https://github.com/awiddersheim/nsca-aw ... daf7d4218d

For the windows client that was posted the major change I made was to bring the code up to date with the latest release of NSCA which adds some additional features. Also, the author removed the alarm() timeouts to get things to work in Windows but never replaced with anything. This can result in the send_nsca program getting stuck running forever. I added in some additional code that replicates what alarm() does for NIX.
SoulA
 
Posts: 19
Joined: Mon Oct 10, 2011 9:47 am

Re: NSCA patches

Postby slansing » Mon Feb 10, 2014 11:20 am

Excellent, I'm actually going to move this thread to the Plugin Development section, I believe it will gain more traction there.
slansing
 
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: NSCA patches

Postby SoulA » Thu Mar 13, 2014 12:03 pm

Here is another patch that fixes packet age comparison:

https://github.com/awiddersheim/nsca-aw ... 95ec092592
SoulA
 
Posts: 19
Joined: Mon Oct 10, 2011 9:47 am

Re: NSCA patches

Postby slansing » Thu Mar 13, 2014 12:12 pm

Ah, excellent! Thank you for posting this.
slansing
 
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...


Return to Nagios Plugin Development

Who is online

Users browsing this forum: No registered users and 3 guests