[Nagiosplug-devel] Nagios Java System (nsjs)

Michael Henry michael.henry at axegroup.com.au
Wed Dec 15 21:41:02 CET 2004


Hi,

    I'm just writing to say that this addon is crap and should be
removed from your site (sorry, I've been stuffing around with it
for a couple of hours and need to vent ;) ).

Firstly the client doesn't compile cleanly:

[nagios at janus nsjc]$ javac nsjc.java
nsjc.java:367: warning: finally clause cannot complete normally
        }
        ^
1 warning


Secondly the daemon doesn't run as the code to ignore comments
in the configuration file was ommitted! Here's a patch for that:

*** nsjsd.java  2002-12-18 10:07:36.000000000 +1100
--- nsjsd.java  2004-12-16 16:15:06.000000000 +1100
***************
*** 302,307 ****
--- 302,311 ----
                    strHost = brConfig.readLine();
                    while(strHost != null)
                    {
+                       //Ignore comments
+                       if(strHost.trim().length() >= 1 &&
strHost.trim().charAt(0) == '#')
+                       {continue;}
+
                        //Don't process any lines unless they're larger
than 3 characters
                        if(strHost.length() > 3)
                        {


Why the hell isn't this code using java.util.Properties???

Additionally there is no option to encrypt the data being transferred.
I know this would be pretty easy to add but by this point I have enough
doubts about the code that I'm not willing to trust any of it.

Finally, main complaint with this software is this:


  PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME CPU
COMMAND
20779 nagios    25   0  7656 7656  4800 R    99.9  0.7  17:59   0 java


and it's not even doing anything yet!!!

OK. Rant over. I do feel better now :)







More information about the Devel mailing list