9.42. Configuration for the simple check

The simple-check is just a wrapper for your own, simple checkscripts, that don't need a nifty XML configuration.

SIMPLE

Explanation

SIMPLE is the enclosing tag for all script- entries.

Parent

OSAGENT

allowed values

Count

0 or 1. If you don't define SIMPLE, no disk check will run.

Example
<SIMPLE>
   <SCRIPT>
      <SCRIPTNAME>/home/osmart/bin/uptime</SCRIPTNAME>
      <CHECKNAME>uptime</CHECKNAME>
      <!-- CHECKPOINTNAME will be 'uptime', too' -->
      <ERRORLEVEL>WARNING</ERRORLEVEL>
   </SCRIPT>
  <SCRIPT>
    <!-- Note: checkprinter is just a fictive script, not a real
         OpenSMART script! -->
    <SCRIPTNAME>/scripte/checkprinter</SCRIPTNAME>
    <ERRORLEVEL>ERROR</ERRORLEVEL>
  </SCRIPT>

  <!-- Two scripts to check a special app.
       Both are configured as checkpoints to the same check "app" -->
  <SCRIPT>
    <!-- Note: app_a1 ist just a fictive script, not a real
         OpenSMART script! -->
    <SCRIPTNAME>/scripte/app_a1</SCRIPTNAME>
    <CHECKNAME>app</CHECKNAME>
    <CHECKPOINTNAME>a1</CHECKPOINTNAME>
    <!-- if execution of /scripte/app_a1 takes longer then 10 seconds,
         abort the execution -->
    <CHECKPOINTTIMEOUT>10</CHECKPOINTTIMEOUT>
    <ERRORLEVEL>ERROR</ERRORLEVEL>
  </SCRIPT>
  <SCRIPT>
    <!-- Note: app_a2 ist just a fictive script, not a real
         OpenSMART script! -->
    <SCRIPTNAME>/scripte/app_a2</SCRIPTNAME>
    <CHECKNAME>app</CHECKNAME>
    <CHECKPOINTNAME>a2</CHECKPOINTNAME>
    <ERRORLEVEL>ERROR</ERRORLEVEL>
  </SCRIPT>
  <SCRIPT>
    <!-- Implementation of a Nagios check in OpenSMART -->
    <SCRIPTNAME>/usr/nagios/bin/check_mem -w 20 -c 5</SCRIPTNAME>
    <CHECKTYPE>Nagios</CHECKTYPE>
    <CHECKNAME>Memory</CHECKNAME>
    <CHECKPOINTNAME>Percentage-Free</CHECKPOINTNAME>
  </SCRIPT>

</SIMPLE>
        

SCRIPT

Explanation

For every script OpenSMART should execute you define a SCRIPT-pair

Parent

SIMPLE

allowed values

Count

As many as you like.

Example

Look at SIMPLE

SCRIPTNAME

Explanation

Full-qualified path and name to (of) the script you want to execute

Parent

SCRIPT

allowed values

Any valid path for your system.

Count

1

Example

Look at SIMPLE

CHECKTYPE

Explanation

tells the simple adapter, how to act like

Parent

SCRIPT

allowed values
  • OpenSMART

  • Nagios

Count

0 or 1

Example

Look at SIMPLE

CHECKPOINTTIMEOUT

Explanation

specifies (in seconds), how long the execution of your checkscript can take, before aborting it

Maybe you want to read about CHECKTIMEOUT , because you may have to set this for the whole SIMPLE-check, too (The sum of runtime for all simple checkpoints has to be less then CHECKTIMEOUT!).

Parent

SCRIPT

allowed values

integer value (seconds). Default is 30 seconds. 0 disables the timeout.

Count

1

Example

Look at SIMPLE