Introduction

JNRPE originally started as a java implementation of the NRPE Nagios Addon. As of version 2.0, it gained the ability to be embedded and allow anyone to include JNRPE features inside their own application.

The main JNRPE features are:

  • Easily embeddable
  • Easy plugin implementation: the JNRPE library makes implementing Nagios plugins very easy
  • Ability to run Java plugins without the need to start a new JVM for every plugin execution
  • Ability to use a different classloader for every plugin

Easy embeddable

Using the JNRPE library, you can JNRPE enhance your application so that you can answer to check_nrpe queries. Doing so, you could create custom plugins that monitors your application internals (array size, number of connections, response times, etc.)

Easy plugin implementation

With the JNRPE library, implement a NAGIOS plugin is just a matter of implement the IPluginInterface and write the plugin logic inside the execute method. The library provides utility to check thresholds compliant to Nagios specification and a simple class to return both return code (OK, WARNING, CRITICAL or UNKNOWN) and a message.

Ability to run Java plugins without the need to start a new JVM for every plugin execution

Nagios executes the plugins as executable. If you simply implement a Nagios plugin using java, that means that Nagios executes the JVM every time your plugin gets called. With JNRPE a single JVM is needed to run the server, than all plugin execution resides inside the same JVM.

Ability to use a different classloader for every plugin

If two plugins uses different version of the same JAR file, you won't get any classloader issue, since every plugin uses its own classloader.