seanpquig / jsendnsca Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/jsendnsca
Automatically exported from code.google.com/p/jsendnsca
See
http://groups.google.com/group/jsend-nsca/browse_thread/thread/cf8cb589a867f3b
What steps will reproduce the problem?
1. Install NSCA Daemon
2. Default nsca.cfg has password commented out as below
#password=
3. Default encryption method is XOR as per below
decryption_method=1
Currently, default password is "password"
If you try and set a password of "" or null, you get an IllegalArgumentException
Workaround is to set password of space (" ")
Original issue reported on code.google.com by rajneeshpatel
on 21 Sep 2010 at 7:48
For example by testing and sending multiple messages to the NagiosNscaStub
which you then
want to iterate afterwards to check for correct order of messages. Then the
number of messages
is correct but the messages are all the same = the last message that
MessagePayloadBuilder
created.
The create method should prepare a new instance for next builder, but it doesnt
so it end up
overriding with data intended for next message
I have created a patch
public static MessagePayload create() {
MessagePayload answer = instance.payload;
// create a new instance for builder to use next time otherwise we end up
// changing the instance we just created
instance = new MessagePayloadBuilder();
return answer;
}
Original issue reported on code.google.com by [email protected]
on 12 Jan 2010 at 3:49
The frontpage uses the static builders which has been changed in 1.3 onwards.
Maybe change the frontpage to the new style and add a note about using older
versions then with a
link to a new page with the same example using 1.2 style.
Original issue reported on code.google.com by [email protected]
on 18 Jan 2010 at 9:09
What steps will reproduce the problem?
this code sends an alert to nagios using the maximum size for all fields:
import java.io.IOException;
import com.googlecode.jsendnsca.core.MessagePayload;
import com.googlecode.jsendnsca.core.NagiosException;
import com.googlecode.jsendnsca.core.NagiosPassiveCheckSender;
import com.googlecode.jsendnsca.core.NagiosSettings;
import com.googlecode.jsendnsca.core.builders.MessagePayloadBuilder;
import com.googlecode.jsendnsca.core.builders.NagiosSettingsBuilder;
public class Example {
public static void main(String argv[]){
NagiosSettings nagiosSettings = NagiosSettingsBuilder
.withNagiosHost("localhost")
.withPort(5667)
.withConnectionTimeout(5000)
.withResponseTimeout(15000)
.withPassword("hasturrocks")
.create();
NagiosPassiveCheckSender sender = new NagiosPassiveCheckSender(
nagiosSettings);
final int MAX_HOSTNAME_SIZE = 64;
final int MAX_SERVICE_NAME_SIZE = 128;
final int MAX_MESSAGE_SIZE = 512;
byte[] maxHostnameBytes = new byte[MAX_HOSTNAME_SIZE];
byte[] maxServiceNameBytes = new byte[MAX_SERVICE_NAME_SIZE];
byte[] maxMessageBytes = new byte[MAX_MESSAGE_SIZE];
for(int i = 0; i < MAX_HOSTNAME_SIZE; i++){
maxHostnameBytes[i] = 'X';
}
String maxHostname = new String(maxHostnameBytes);
for(int i = 0; i < MAX_SERVICE_NAME_SIZE; i++){
maxServiceNameBytes[i] = 'Y';
}
String maxServiceName = new String(maxServiceNameBytes);
for(int i = 0; i < MAX_MESSAGE_SIZE; i++){
maxMessageBytes[i] = 'Z';
}
String maxMessage = new String(maxMessageBytes);
MessagePayload payload = MessagePayloadBuilder
.withHostname(maxHostname)
.withLevel(0)
.withServiceName(maxServiceName)
.withMessage(maxMessage)
.create();
try {
sender.send(payload);
} catch (NagiosException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
}
What is the expected output? What do you see instead?
nsca only shows 63 characters for the host name, 127 characters for the
service name and 511 characters for the message. Since nsca is written in C
it needs any string to be null terminated meaning that even though a nsca
packet has 64 bytes for the host name the last one would always need to be
'\0'.
Rather than imply that a 64 character host name sent by jsendnsca would
actually make it to nsca, it would probably be better to only try sending
63 in the first place.
The same kind of problem exists for the service name and the message too.
Original issue reported on code.google.com by [email protected]
on 19 Dec 2009 at 9:43
As very little of the commons jars are being used, remove them and replace
the functionality provided with an in built StringUtils and IOUtils.
Original issue reported on code.google.com by rajneeshpatel
on 1 Dec 2008 at 8:47
So that I can build NagiosSettings easily and more readably, as a
Developer, I would like a NagiosSettingsBuilder class
Original issue reported on code.google.com by rajneeshpatel
on 11 Feb 2009 at 9:32
I tried using the Command line client and api to send NSCA message and the
application says it is sent, but I can't see any message in nagios.log
But at the same time actual C implementation of NSCA client works properly.
Original issue reported on code.google.com by [email protected]
on 19 May 2009 at 4:06
When sending a passive check the following parts are mandatory
1. Hostname
2. Return code (level)
3. Service name
The MessagePayload object should enforce the above. If this is voilated, an
IllegalArgumentException needs to be thrown
Original issue reported on code.google.com by rajneeshpatel
on 18 Nov 2008 at 8:34
Story
As an API user, I want a Factory so that I can easily create a NagiosSettings
instance from a properties file or properties object.
Notes
Properties will have to adhere to defined key names to be described in
javadoc e.g.
nagios.nsca.hostname=foo
nagios.nsca.port=5667
...
A default NagiosSettings object will be created. Any of the defined keys
present in the properties will then be used to override default settings.
Original issue reported on code.google.com by rajneeshpatel
on 26 Jan 2010 at 10:50
I cannot edit front page so please update it with a note about the 1.3.1
release which is the 1.3.0
release that is compiled against Java 1.5 so people using JDK 1.5 can use it as
well in their projects
Original issue reported on code.google.com by [email protected]
on 18 Jan 2010 at 6:04
So that I can easily package a distribution of JSend NCSA, I would like to
automate the build of the distribution and upload of it
Original issue reported on code.google.com by rajneeshpatel
on 17 Nov 2008 at 12:19
We should target against JDK 1.5 so a lot more users can use it out of the box
For example you get when using compiling a project which uses jsendnsca and
that project uses
JDK 1.5.
/Users/davsclaus/workspace/camel/components/camel-
nagios/src/main/java/org/apache/camel/component/nagios/NagiosConfiguration.java:
[19,-1]
cannot access com.googlecode.jsendnsca.core.NagiosSettings
bad class file: /Users/davsclaus/.m2/repository/com/googlecode/jsendnsca-
core/1.3.0/jsendnsca-core-1.3.0.jar(com/googlecode/jsendnsca/core/NagiosSettings
.class)
class file has wrong version 50.0, should be 49.0
Original issue reported on code.google.com by [email protected]
on 18 Jan 2010 at 5:47
What steps will reproduce the problem?
1.I am adding my nagios ip address
2.I am adding the port as 80
3.
What is the expected output? What do you see instead?
I can see java.net.SocketTimeoutException: Read timed out
What version of the product are you using? On what operating system?
2.0.1
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 25 Oct 2012 at 11:49
Following testcase should pass
@Test(expected = IllegalArgumentException.class)
public void shouldThrowIllegalArgumentExceptionForInvalidLevel() throws
Exception {
final MessagePayload messagePayload = new MessagePayload();
messagePayload.setLevel(4);
}
You should only be able to set level to 0,1,2,3
Original issue reported on code.google.com by rajneeshpatel
on 18 Dec 2008 at 11:07
The 1.3.1 release is not compiled with debug information turned on.
This prevents to see line information in stacktraces.
For example the NPE in JSend NSCA is not possible to see where happens
java.lang.NullPointerException
at com.googlecode.jsendnsca.core.mocks.NagiosNscaStub.stop(Unknown Source)
Original issue reported on code.google.com by [email protected]
on 9 Apr 2010 at 7:28
Hello,
my name is Marco Amato and I'm an italian Java Software Developer.
I was developping a batch application that should be monitored with nagios.
During the development and I found your work truly interesting and I hoped I
can use it for my work.
I installed on a virtual machine an Ubuntu Desktop 12.04 (I had iso on my hd)
and then I installed successfully nagios 3.2.3 and nsca 2.7.2. As you reported
in your documentation I had to install previously Nagios and Nsca to test
jsendnsca.
Then I configured Nagios with a passive check service as in your documentation
(I attached Nagios Configuration file). The goal was sending a passive check
from machine host (Windows 7 Ultimate Edition) to guest virtual host where is
installed Nagios.
Both systems are visible because they belogn to same subnet and I can access
the Nagios main panel within the host too.
However the problem is simple: when I run the code with no errors but I don't
see any changes to my Nagios Control Panel.
You have any suggests?
Maybe a config problem?.
Regards
Marco
Original issue reported on code.google.com by [email protected]
on 28 Jan 2014 at 11:51
Attachments:
The NonBlockingNagiosPassiveCheckSender does not offer any shutdown method so
you can
properly shut it down. This is needed in hot deployable environments such as
OSGi or Tomcat etc
where you may hot deploy you apps.
I have created a patch with a public method for that.
Also I exposed a setter to set a custom executor if you need to be in full
control of which thread
it uses. People using J2EE servers may want to let it use a pool from those
servers.
Or e.g. at Apache we like to control the thread pool as well to also include a
thread name so you
can see what the thread does.
See for example this Helper class we use to create executors in Camel
https://svn.apache.org/repos/asf/camel/trunk/camel-
core/src/main/java/org/apache/camel/util/concurrent/ExecutorServiceHelper.java
Original issue reported on code.google.com by [email protected]
on 13 Jan 2010 at 9:54
Using the felix bundle plugin we can generate the JAR as an OSGi bundle.
Original issue reported on code.google.com by [email protected]
on 23 Dec 2012 at 8:47
It would be good if we have access to a .jar which have the test classes for
unit testing.
For example this class is handy
com.googlecode.jsendnsca.core.mocks.NagiosNscaStub
Maybe there are a couple of other classes as well.
Original issue reported on code.google.com by [email protected]
on 12 Jan 2010 at 2:49
Generate HTML test report from running JUnit tests
Original issue reported on code.google.com by rajneeshpatel
on 19 Jan 2009 at 3:21
I can't find any maven repo for the project.
Could you publish to a public one - for instance:
http://nexus.sonatype.org/oss-repository-hosting.html ?
Original issue reported on code.google.com by [email protected]
on 11 Feb 2011 at 4:43
For the MessagePayload object, when setting the level via a string, if the
String is not OK, WARNING or CRITICAL, it sets the level as UNKNOWN
Should really throw an IllegalArgumentException instead if not one of the
following
OK
WARNING
CRITICAL
UNKNOWN
Also, should allow case insensitive setting so OK, ok or Ok should all work.
Original issue reported on code.google.com by rajneeshpatel
on 19 Nov 2008 at 7:36
Happy new year!
Got an email from a chap nudging me to port the project to github.
To that end, created the following organisation and repo
https://github.com/jsendnsca
https://github.com/jsendnsca/jsendnsca
If any existing project members have any thoughts/advice or want me to add them
to the project, please chime in.
Original issue reported on code.google.com by rajneeshpatel
on 6 Jan 2015 at 10:12
The current mock is unreliable and doesnt allow inspection of sent passive
checks.
Need to implement new one which is more reliable and allows you to return a
list of recieved checks for inspection.
Original issue reported on code.google.com by rajneeshpatel
on 3 May 2009 at 9:34
Hi Raj,
Is it possible with the current MessagePayloadBuilder to send the sending
server hostname with the Message string instead of the Hostname expected by the
Nagios server?
For example if currently things look like this on Nagios:
Host Service Status .... Status Info
host_A service_1 OK .... OK message
service_2 ERROR .... ERROR message
host_B service_1 OK .... OK message
service_2 ERROR .... ERROR message
Can we do the following instead:
Host Service Status .... Status Info
allhosts service_1 OK .... host_A: OK message
service_2 ERROR .... host_B: ERROR message
Thanks
Original issue reported on code.google.com by [email protected]
on 13 Jul 2011 at 9:32
Hi there,
This is more of a question then a feature request but didn't want to open a
defect instead..
I am trying to log events from java apps to Nagios. Is jsendnsca capable of
handling the scenario when the Nagios server is down? Meaning that the
jsendnsca creates a new asynchronous tread to Nagios and doesn't block the
application execution while waiting for Nagios response. I am asking this
because I just spent considerable time on NagiosAppender for log4j to find out
that the application hangs when it tries to log an event until the Nagios
server responds. And for obvious reasons I'd rather not create a new dependency
for the application uptime..
Thanks,
AS
Original issue reported on code.google.com by [email protected]
on 7 Jul 2011 at 7:54
Hi Raj, I know it's so long since last issue and maybe you don't work any more
in this project but I need to ask you.
I'm using the last version of your API (2.1.1) and the following class:
public class NscaSend {
public static void main(String[] args) {
NagiosSettings settings = new NagiosSettingsBuilder()
.withNagiosHost("mysqerver.com")
.withPort(5667)
.withPassword("password")
.withEncryption(Encryption.NONE)
.create();
MessagePayload payload = new MessagePayloadBuilder()
.withHostname("jnsca")
.withLevel(Level.OK)
.withServiceName("nscasender")
.withMessage("should work if everything set up OK")
.create();
NagiosPassiveCheckSender sender = new NagiosPassiveCheckSender(settings);
try {
sender.send(payload);
} catch (NagiosException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
}
In my server, the windows hosts are sending correctly messages like this:
[1407270232] PASSIVE HOST CHECK: host-windows;0;OK: Lets pretend everything is
going to be ok.
I'm using Eclipse to edit source code and compile the test program on a
Operating System Mac X. When I run the program on the Eclipse I have no errors,
but the server receive no message. Can you help me?
If the program works, it will save my life. I've been looking for weeks.
Congratulations.
Original issue reported on code.google.com by [email protected]
on 5 Aug 2014 at 9:12
Would be good to send longer messages to nagios. Since nsca 2.9.1 it supports
up to 4096 characters. This will brake the compatibility to older versions.
Please find attached a patch for 4096. Maybe it would also be good to have a
compatibility switch for older versions of nsca?
Regards,
Matthias
Original issue reported on code.google.com by [email protected]
on 22 Feb 2012 at 5:51
Attachments:
This exception in NagiosPassiveCheckSender
Error occured while sending passive alert
occured -> occurred
It should have 2 r in the name
Original issue reported on code.google.com by [email protected]
on 13 Jan 2010 at 9:29
Just a request to make project building a little easier. Would it be possible
to enter this project into central Mave repository?
Original issue reported on code.google.com by [email protected]
on 13 Jul 2010 at 6:52
NagiosSettings should throw IllegalArgumentException for null or empty strings
Currently, you will get a null pointer exception
Original issue reported on code.google.com by rajneeshpatel
on 19 Nov 2008 at 8:13
[deleted issue]
Hi,
I'm Getting java.net.SocketTimeoutException: connect timed out while connecting
to Nagios
The version i'm using is 2.0.1
Here is the code
import java.io.IOException;
import main.java.com.googlecode.jsendnsca.Level;
import main.java.com.googlecode.jsendnsca.MessagePayload;
import main.java.com.googlecode.jsendnsca.NagiosException;
import main.java.com.googlecode.jsendnsca.NagiosPassiveCheckSender;
import main.java.com.googlecode.jsendnsca.NagiosSettings;
import main.java.com.googlecode.jsendnsca.builders.MessagePayloadBuilder;
import main.java.com.googlecode.jsendnsca.builders.NagiosSettingsBuilder;
import main.java.com.googlecode.jsendnsca.encryption.Encryption;
/**
* Quick start example code used in documentation
*/
public class QuickStart {
/**
* Creates {@link NagiosSettings}, {@link MessagePayload} using builders and sends
* using {@link NagiosPassiveCheckSender}
* @param args
*/
public static void main(String[] args) {
NagiosSettings settings = new NagiosSettingsBuilder()
.withNagiosHost("10.0.200.236")
.withPort(5667) // you don't really need to set this as 5667 is default
.withEncryption(Encryption.XOR)
.create();
MessagePayload payload = new MessagePayloadBuilder()
// you can use .withLocalHostname() or withCanonicalHostname to determine
// your short and fully qualified domain name respectively for you instead of .withHostname
.withHostname("SPICITY700")
.withLevel(Level.OK)
.withServiceName("httpd")
.withMessage("should work if everything set up OK")
.create();
NagiosPassiveCheckSender sender = new NagiosPassiveCheckSender(settings);
try {
sender.send(payload);
} catch (NagiosException e) {
System.out.println("Exception "+e);
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
}
Original issue reported on code.google.com by [email protected]
on 31 Oct 2012 at 12:13
Actually in my case i have installed the NAGIOS3 Core opensource and NSCA at
UBUNTU Virtual BOX vm. Now i am trying to connect to that machine after follow
some of the steps you have mentioned in the "JSEND NSCA API user guide.PDF"
file.
I am able to connect to the NAGIOS Server through NSCA by using the JSENDNSCA
API Java stand alone program which you have methioned in the PDF file. As you
mentioned in the PDF file i am able to see the jsendservice in the Nagios UI of
Services .
Here i am having couple questions , those are as follows :
1. After i run that program i didn't get any response from that program. ?
2. I didn't understand what is the use/purpose of this JsendNSCA API program ?
Could you please give me some elaborated way ? At the console i didn't get any
output ..
3.What is the output of the JSENDNSCA API program output ? Is it will get any
results from the NAGIOS Server ? If it will return then how the result would be
?
3.What is the use of "send_nsca" command ?
My requirement is :
1. Communicate with the Nagios server and get the details using JSENDNSCA API; what ever it will give like Services status /Host status / Network Status ?
2.If JsendNsca API is not able to get any response means what is the other
solution or is there any way to get the results using JAVA API only ?
So,Could you please give me the answers to my all the questions as early as
possible. I am waiting for your reply soon....
Original issue reported on code.google.com by [email protected]
on 26 Sep 2013 at 1:03
We can upgrade to latest 2.x stable branch
Original issue reported on code.google.com by [email protected]
on 23 Dec 2012 at 8:57
Hi Jeremy, Claus
First of, Jeremy, meet Claus who has done some great work recently on
raising and fixing bugs. Claus is currently working on a Apache Camel
component which will use the API
http://issues.apache.org/activemq/browse/CAMEL-2347
I have started work on version 2.0. Essentially, taken the 1.3.1 codebase
and tidied it up e.g.
* Using enums now only instead of integers which removes a load of
validation to make sure people are setting valid levels, encryption etc
* Exposed Encryptor interface so people can roll their own encryption as
NSCA supports a whole host of which only a subset are currently
implemented
* Using nice features of Junit 4.7 such as expected exception rule and
replaced IllegalArgument checks with Validate class from commons-lang
Main thing is now using Maven for build/project management. Want to
automate as much of the release process as possible
Please feel free to check out, project is no simply called jsendnsca in trunk
If you guys have any ideas, improvements etc, can you raise issues and we
can manage them between us to ensure they make this release
Also, Claus, any experience on getting an artifact into the maven repos, I
understand this could take a while
Many thanks
Raj
Original issue reported on code.google.com by rajneeshpatel
on 24 Jan 2010 at 10:41
Hi there,
In the provided QuickStart.java if I change
.withHostname("localhost")
to use the local hostname:
.withLocalHostname()
I get the following error
Ok.java:48: unreported exception java.net.UnknownHostException; must be caught
or declared to be thrown
.withLocalHostname()
^
Thanks in advance.
Original issue reported on code.google.com by [email protected]
on 15 Apr 2011 at 10:03
In concurrent environments such as the project I work on which is Apache Camel
http://camel.apache.org/
We will have concurrent routing which may simultaneously send alerts to Nagios
and if using the
MessagePayloadBuilder then that will cause concurrency issues as its not thread
safe. It does have a
shared instance which multiple threads access. What happens is that the builder
will return a
message with data from DIFFERENT threads.
I have attached a patch to make it thread safe by not using static methods.
Original issue reported on code.google.com by [email protected]
on 13 Jan 2010 at 9:23
svn up from trunk
cd jsendnsca
mvn install
davsclaus:(svn)jsendnsca[trunk:335]/jsendnsca$ mvn --version
Maven version: 2.0.9
Java version: 1.5.0_22
OS name: "mac os x" version: "10.6.3" arch: "i386" Family: "unix"
If you use JDK 1.6 then those classes may be included by default.
But try to make sure it compiles on 1.5 also.
[INFO] [compiler:compile]
[INFO] Compiling 18 source files to
/Users/davsclaus/workspace/jsendnsca/jsendnsca/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR]
/Users/davsclaus/workspace/jsendnsca/jsendnsca/src/main/java/com/googlecode/jsen
dnsca/e
ncryption/TripleDESEncryptor.java:[16,0] cannot access javax.crypto.Cipher.1
file javax/crypto/Cipher$1.class not found
import static javax.crypto.Cipher.*;
[ERROR]
/Users/davsclaus/workspace/jsendnsca/jsendnsca/src/main/java/com/googlecode/jsen
dnsca/e
ncryption/TripleDESEncryptor.java:[50,24] cannot find symbol
symbol : variable ENCRYPT_MODE
location: class com.googlecode.jsendnsca.encryption.TripleDESEncryptor
[INFO] 2 errors
[INFO] -------------------------------------------------------------
[INFO] ---------------------------------------------------------------------
---
[ERROR] BUILD FAILURE
[INFO] ---------------------------------------------------------------------
---
[INFO] Compilation failure
/Users/davsclaus/workspace/jsendnsca/jsendnsca/src/main/java/com/googlecode/jsen
dnsca/e
ncryption/TripleDESEncryptor.java:[16,0] cannot access javax.crypto.Cipher.1
file javax/crypto/Cipher$1.class not found
import static javax.crypto.Cipher.*;
/Users/davsclaus/workspace/jsendnsca/jsendnsca/src/main/java/com/googlecode/jsen
dnsca/e
ncryption/TripleDESEncryptor.java:[50,24] cannot find symbol
symbol : variable ENCRYPT_MODE
location: class com.googlecode.jsendnsca.encryption.TripleDESEncryptor
Original issue reported on code.google.com by [email protected]
on 9 Apr 2010 at 8:38
Story
As an API user, I want to be able to download the API and required
dependencies so that I can easily incorporate the API into my project
Notes
Need Maven to create zip and tar.gz archives which contains
* jsendnsca jar
* dependencies in lib folder with further test subfolder for test deps
* javadocs
* source
* pom
Original issue reported on code.google.com by rajneeshpatel
on 26 Jan 2010 at 9:00
Often, a non-blocking sender is preferable so that when sending passive
checks, your main applications threads are not blocking, especially when
there are network issues slowing down delivery of passive checks to NSCA.
This is especially important if NSCA is slow or your requests are timing
out. With a non-blocking NagiosPassiveCheckSender, it can implement
internal queuing and a retry strategy, freeing up you application to carry
on processing.
If after a retry strategy is employed and the request stills fail, an
alternative action can be taken i.e. logging to a file.
Original issue reported on code.google.com by rajneeshpatel
on 12 Feb 2009 at 10:17
MessagePayload contains data to be send. We should add a toString so you can
easily log what you
are sending, and when debugging its easier to spot the correct payload as well.
Also the class could be serializable as it just contain String, int data. This
allows you to send a
payload from a remote system to a central sender etc.
Original issue reported on code.google.com by [email protected]
on 13 Jan 2010 at 9:37
First of all : thanks for this - it's working like a charm.
The pom-files from maven scares the heck out of me - therefore i have to
make a whish :
Could you seperate the cli-portion ( and commons-cli ) from the main-build
? I only use the api to send notifications.
Original issue reported on code.google.com by [email protected]
on 26 Nov 2008 at 8:20
What steps will reproduce the problem?
1. create a message payload with multi-byte text, over the maximum amount of
characters allowed for the message (512 bytes)
2. try to send it
What is the expected output? What do you see instead?
com.googlecode.jsendnsca.NagiosException: Error occurred while sending passive
alert
at com.googlecode.jsendnsca.NagiosPassiveCheckSender.send(NagiosPassiveCheckSender.java:95)
at com.gsm.nsca.Alerter$AlertSender.process(Alerter.java:553)
at com.gsm.lib.BatchRunner.processElements(BatchRunner.java:316)
at com.gsm.lib.BatchRunner.flushBatch(BatchRunner.java:164)
at com.gsm.lib.BatchRunner.run(BatchRunner.java:87)
Caused By: java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at com.googlecode.jsendnsca.utils.ByteArrayUtils.getFixedSizeBytes(ByteArrayUtils.java:98)
at com.googlecode.jsendnsca.utils.ByteArrayUtils.writeFixedString(ByteArrayUtils.java:44)
at com.googlecode.jsendnsca.PassiveCheckBytesBuilder.writeFixedString(PassiveCheckBytesBuilder.java:88)
at com.googlecode.jsendnsca.PassiveCheckBytesBuilder.withMessage(PassiveCheckBytesBuilder.java:61)
at com.googlecode.jsendnsca.NagiosPassiveCheckSender.send(NagiosPassiveCheckSender.java:80)
at com.gsm.nsca.Alerter$AlertSender.process(Alerter.java:553)
at com.gsm.lib.BatchRunner.processElements(BatchRunner.java:316)
at com.gsm.lib.BatchRunner.flushBatch(BatchRunner.java:164)
at com.gsm.lib.BatchRunner.run(BatchRunner.java:87)
What version of the product are you using? On what operating system?
2.0.1
Please provide any additional information below.
ByteArratUtils.getFixedSizeBytes() is broken.
At first, it uses character length to cap the string to maximum bytes allowed,
but then uses byte length to copy the string into the array.
Considering that it would be as bad to convert the string into the array, and
then cut it (as it can cut through a multi-byte character), it may be best to
estimate using the character length first, and then keep dropping characters
from the end until the byte length is satisfied. I don't know of any tricks
that would make it more efficient.
Original issue reported on code.google.com by [email protected]
on 27 Feb 2014 at 6:58
I've implemented triple-DES support and here's a patch.
Obviously being security-related it ought to be reviewed by a security
expert, but it works for me. :-)
Original issue reported on code.google.com by [email protected]
on 8 Apr 2009 at 5:54
Attachments:
Hi,
it would be great to use bundlor or bnd to generate an OSGI-compatible
manifest. This allows jsendnsca to be integrated in an osgi environment
without custom changes. Both of them run inside ant, so changes would be
minimal.
http://www.springsource.org/bundlor
http://www.aqute.biz/Code/Bnd
Original issue reported on code.google.com by [email protected]
on 10 Jan 2010 at 8:54
Why not allow empty password?
Our installation is setup without, probably to be compatible with
send_nsca.pl (
Send NSCA Perl Client 1.14 for NSCA 2.3
Last modified 7/16/03 by Jason Lancaster <nospam.jason AT teklabs.net> )
Original issue reported on code.google.com by [email protected]
on 9 Mar 2012 at 10:00
Attachments:
What steps will reproduce the problem?
1.
2.
3.
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
Please provide any additional information below.
I put together a process that reads each record and gathers certain pieces of
data from a local database which I include in my payloads. For some reason that
I can no figure out, my payloads are not sending at all, or maybe they are not
being read, I can't figure out which.
Note: I commented out some lines so that only one line of data will be sent as
a test for just one selected machine.
Original issue reported on code.google.com by [email protected]
on 18 Jul 2012 at 7:17
Attachments:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.