<?xml version="1.0" encoding="UTF-8"?>
<!--
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 - JASMINe Probe
 - Copyright (C) 2011-2012 Bull S.A.S.
 - Contact: jasmine@ow2.org
 -
 - This library is free software; you can redistribute it and/or
 - modify it under the terms of the GNU Lesser General Public
 - License as published by the Free Software Foundation; either
 - version 2.1 of the License, or any later version.
 -
 - This library is distributed in the hope that it will be useful,
 - but WITHOUT ANY WARRANTY; without even the implied warranty of
 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 - Lesser General Public License for more details.
 -
 - You should have received a copy of the GNU Lesser General Public
 - License along with this library; if not, write to the Free Software
 - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
 - USA
 -
 -
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 - $Id$
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-->
<chapter version="5.0" xml:lang="en" xml:id="jasmineprobe.definitions" xmlns="http://docbook.org/ns/docbook"
      xmlns:xlink="http://www.w3.org/1999/xlink"
      xmlns:xi="http://www.w3.org/2001/XInclude"
      xmlns:svg="http://www.w3.org/2000/svg"
      xmlns:mml="http://www.w3.org/1998/Math/MathML"
      xmlns:html="http://www.w3.org/1999/xhtml"
      xmlns:db="http://docbook.org/ns/docbook">
 <title>Definitions</title>

 <sect1>
  <title>Main Concepts</title>

   <para>
     The main concepts used in JASMINe Probe are: <emphasis>target</emphasis>, <emphasis>indicator</emphasis>, <emphasis>output</emphasis> and <emphasis>probe</emphasis>.
   </para>

   <para>
     The role of a <emphasis>probe</emphasis> is to supervise a <emphasis>target</emphasis> by periodically collecting monitoring data.
   </para>
   <para>
     The role of an <emphasis>indicator</emphasis> is to specify the data to be collected. In JASMINe Probe, the monitoring data is represented by <emphasis>indicator</emphasis> values.
   </para>
   <para>
      Finally, the role of an <emphasis>output</emphasis> is to specify what to do with the collected data (this depends on how the collected data is intended to be used).
   </para>
   <para>
     In order to run <emphasis>probes</emphasis>, one have to define <emphasis>indicators</emphasis>, <emphasis>outputs</emphasis> and possibly <emphasis>targets</emphasis>, then use these artifacts
     to define the <emphasis>probes</emphasis>.
   </para>

 </sect1>

 <sect1>
  <title>Targets</title>

  <para>
    A target is used to identify a monitored target. It has a <emphasis>name</emphasis> chosen by the user and specified in the target's definition.
  </para>

  <para>
    Target names must be unique. They are used in probe definitions, but may also be used in indicator definitions (only for some indicator types).
  </para>

  <para>
    Currently, only one target type is supported in JASMINe Probe: the <emphasis>jmx</emphasis> target type. When the monitored target is the OS, there is no need to define explicitly a target artifact.
    When monitoring a JVM, a <emphasis>jmx</emphasis> target must be defined.
  </para>

  <para>
    Besides <emphasis>name</emphasis> and <emphasis>type</emphasis>, the <emphasis>jmx</emphasis> target definition includes other properties, like the <emphasis>JMX  URL</emphasis>
    allowing to establish connection with the monitored target (see <xref linkend="jasmineprobe.target_create"/>).
  </para>

 </sect1>

 <sect1>
  <title>Indicators</title>

  <para>
    An <emphasis>indicator</emphasis> specifies which resources provide the monitoring data, and also how to obtain the indicator values.
  </para>
  <para>
    It is identified by a <emphasis>name</emphasis> chose by the user and specified in its definition.
  </para>
  <para>
    Indicator names must be unique. They are used in probe definitions (each probe definition must specify at least one indicator).
    When running a probe, the indicator names are used to identify the values produced by the probe and published by outputs.
  </para>

  <para>
    Several types of indicators are supported in JASMINe Probe. The complete list is provided in <xref linkend="jasmineprobe.indicator_types"/>.
  </para>

  <para>
    New indicator types may be developed and thus extend JASMINe Probe's capability to monitor targets.
    Moreover, all the indicator types are optional (see <xref linkend="jasmineprobe.config_appli"/>).
  </para>

  <para>
    Besides <emphasis>name</emphasis> and <emphasis>type</emphasis>, an indicator definition includes other properties that depend on its type.
  </para>

  <para>
    We can distinguish two indicator categories: <emphasis>raw</emphasis> and <emphasis>processing</emphasis> indicators.
      <itemizedlist>
       <listitem>
         <para>
            <emphasis role="bold">Raw</emphasis> indicators specify data to be collected from targets. A raw indicator's values are obtained by reading some resource values (MBean attributes, system resources, etc.)
         </para>
       </listitem>
       <listitem>
         <para>
            <emphasis role="bold">Processing</emphasis> indicators are aimed to produce new monitoring values by processing some <emphasis>source</emphasis> indicator values.
         </para>
         <para>
            Several kind of processing operations are supported by the different processing indicator types, like <emphasis>aggregate</emphasis> or <emphasis>correlate</emphasis>.
         </para>
         <para>
            A processing indicator takes as input the values corresponding to one or more source indicators, that may be raw indicators or even other processing indicators.
         </para>
         <para>
            Depending on its type, a processing indicator transforms or combines the input values. The resulting values may also combine data providing from different collect iterations.
            For example, delta(v) = current(v) - previous(v), where <emphasis>v</emphasis> is a source indicator's value.
         </para>
         <para>
            In some cases, constant values are necessary to perform processing operations. For this reason, JASMINe Probe provides a particular type of indicators that have a predefined
            constant value, and that can be used as source indicators within processing indicators definitions.
         </para>
       </listitem>
      </itemizedlist>
  </para>
 </sect1>

 <sect1>
  <title>Outputs</title>

  <para>
    An output is identified by a <emphasis>name</emphasis> chosen by the user and specified in its definition.
  </para>
  <para>
    Output names must be unique. They are used in probe definitions (each probe definition must specify at least one output).
  </para>
  <para>
    Several output types are provided (<emphasis>console</emphasis>, <emphasis>file</emphasis>, etc.), and new ones can be easily developed in
    order to extend JASMINe Probe.
  </para>
  <para>
    An output type defines a format and a destination for the indicator values obtained in each collect iteration.
  </para>
 </sect1>

 <sect1>
  <title>Probes</title>

  <para>
     In order to define a probe, users have to specify:
      <itemizedlist>
       <listitem>
         <para>
            the probe's period (it exists a default period)
         </para>
       </listitem>
       <listitem>
         <para>
            indicators (at least one indicator name)
         </para>
       </listitem>
       <listitem>
         <para>
            outputs (at least one output name)
         </para>
       </listitem>
       <listitem>
         <para>
            targets (optional; this depends on the indicators type and definition properties)
         </para>
       </listitem>
      </itemizedlist>
  </para>

   <mediaobject>
    <imageobject>
      <imagedata fileref="jasmine-probe.png" align="center" width="100%" />
     </imageobject>
   </mediaobject>

 </sect1>
</chapter>
