Getting Started

Embedding the jcheck_nrpe library your application will be able to send queries to both the NRPE and the JNRPE server.

The library is published in the Maven Central repository. To link your code to jcheck_nrpe, add the following to your pom.xml:


Using jcheck_nrpe is very simple. Suppose you’d like to execute the following command:

    ./check_nrpe -n -H -c runTest -a random1 33:66 67:

That command means that JNRPE is listening on the default port (5666) on the address without SSL (-n) and we want to run the command ‘runTest’ passing the parameters ‘random1’, 33:66 and 67:.

The same command using the code would be:

    JNRPEClient client = new JNRPEClient("", 5666, false);
    ReturnValue ret = client.sendCommand("runTest", "-a", "random1", "33:66", "67:");

The ReturnValue class will contain the return code, the returned messages and, optionally, the returned performance data.