TestCase4j As a NRPE Replacement

About Nagios

Nagios is a host and service monitor designed to inform you of network problems before your clients, end-users or managers do. It has been designed to run under the Linux operating system, but works fine under most *NIX variants as well. The monitoring daemon runs intermittent checks on hosts and services you specify using an external "plug-in" which return status information to Nagios. When problems are encountered, the daemon can send notifications out to administrative contacts in a variety of different ways (email, instant message, SMS, etc.). Current status information, historical logs, and reports can all be accessed via a web browser. [http://nagios.org]

General

TestCase4j can easily be integrated with Nagios to create a fully-featured supervision solution with plugins written in Java. In order to ease the understanding for integrating TestCase4j and Nagios this tutorial outlines a problem description and provides a solution for it.

Problem scenario

  • You represent a company that offer services to customers via a external API. You would like to continually monitor your API services in order to detect and react to errors in a fast and reliable way.
  • You would like a way of writing a new plug-in to Nagios in Java but would like a framework to perform the over-head (like communication between Nagios and you plug-in, etc).

Solution

  • Use Nagios as a front-end for your operational department. This will give you a easy to use graphical interface in which you can manually execute test cases and present availability information, etc.
  • Get aquatint with TestCase4j by reading the introduction page
  • Install TestCase4j Server on the same server as Nagios is installed on by following the tutorial: Installing TestCase4j Server. You may install TestCase4j on a server not running Nagios, but it will required you to make a change in the Nagios service commands configuration.
  • Read the Writing your first test case-tutorial in order to write and setup a test case of your own.
  • Configure Nagios to use TestCase4j to invoke the test case
  • Download TestCase4j Nagios Client and unpack it in <NAGIOS_HOME>/libexec
  • Restart Nagios
  • Your test case should now be visible within Nagios
Unless otherwise stated, the content of this page is licensed under GNU Free Documentation License.