Configure Nagios To Use Testcase4j

Create service configuration

First you create a "host" representing your testcases services. This is done as usual in Nagios. Use the following service template for your service checks.
File: <NAGIOS_HOME>/etc/hosts/testcase4j.cfg

# Check TestCase4j - MyFirstTestCase
define service{
          use                     generic-service
          host_name               testcase4j
          service_description     TestCase4j - myfirsttestcase
          is_volatile             0
          check_period            24x7
          max_check_attempts      1
          normal_check_interval   10
          retry_check_interval    0
          contact_groups          admins
          notification_options    w,u,c,r
          notification_interval   960
          notification_period     24x7
          check_command           check_testcase4j!myfirsttestcase!10000

Create TestCase4j service group

Create a new service groups for TestCase4j by using the following template below.
File: <NAGIOS_HOME>/etc/hosts/service_groups.cfg

# Service group for Oracle SID decp
define servicegroup{
      servicegroup_name      OracleSIDdecp
      alias                  Oracle SID=decp
      members                testcase4j, TestCase4j - myfirsttestcase

Create TestCase4j command definition

All services will be checked by the command check_testcase4j. This step will run the TestCase4j Nagios client every time a service check is issued.
File: <NAGIOS_HOME>/etc/checkcommands.cfg

# 'TestCase4j' command definition
define command{
    command_name    check_testcase4j
    command_line    /usr/bin/java -jar <NAGIOS_HOME>/libexec/testcase4j-nagiosclient-<version>.jar -t $ARG2$ -h $HOSTADDRESS$ -hp 2000 -tc $ARG1$
Unless otherwise stated, the content of this page is licensed under GNU Free Documentation License.