<?xml version="1.0" encoding="UTF-8"?>
<!--
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - JASMINe
  - 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$
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-->
<sect1 version="5.0" xml:lang="en" xml:id="jasmineprobe.probeconfig" 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>Configuration file for JASMINe Probe artifacts</title>

  <para>
     JASMINe Probe artifacts can be dynamically created using the tools presented in see <xref linkend="jasmineprobe.tools"/>.
  </para>
  <para>
     An alternative approach is to provide definitions in a configuration file named <emphasis>probe-config.xml</emphasis>. Its location is
     the <emphasis>conf</emphasis> directory within the JASMINe Probe installation directory.
     This file is read at JASMINe Probe start-up, and the defined artifacts are created. Probes can even be started in case their definition specifies status="started".
  </para>
  <para>
     Once JASMINe Probe started, management operations can be invoked to create new artifacts and to manage the existing ones.
  </para>

  <para>
     All the JASMINe probe artifacts existing at a moment of time may be saved in the JASMINe probe configuration file.
     Moreover, a <emphasis>probe-config.xml</emphasis> file can be explicitly loaded in order to create the necessary JASMINe Probe artifacts.
  </para>
  <para>
    Here is a <emphasis>probe-config.xml</emphasis> snippet containing definitions for JASMINe Probe artifacts depicted in <xref linkend="jasmineprobe.definitions"/> section.
  </para>
  <screen>
    &lt;target name="t1" type="jmx"/&gt;
      &lt;property key="url" value="service:jmx:rmi:///jndi/rmi://host1:1099/jrmpconnector_jonas"/&gt;
    &lt;/target&gt;
    &lt;target name="t2" type="jmx"/&gt;
      &lt;property key="url" value="service:jmx:rmi:///jndi/rmi://host2:1099/jrmpconnector_jonas"/&gt;
    &lt;/target&gt;
    &lt;indicator name="i1" type="jmx"/&gt;
      &lt;property key="mbean" value="java.lang:type=Memory"/&gt;
      &lt;property key="attr" value="HeapMemoryUsage.used"/&gt;
      &lt;property key="target" value="t1"/&gt;
    &lt;/indicator&gt;
    &lt;indicator name="i2" type="jmx"/&gt;
      &lt;property key="mbean" value="java.lang:type=Memory"/&gt;
      &lt;property key="attr" value="HeapMemoryUsage.used"/&gt;
      &lt;property key="target" value="t2"/&gt;
    &lt;/indicator&gt;
    &lt;indicator name="i3" type="correlate"/&gt;
      &lt;property key="op" value="sum"/&gt;
      &lt;property key="sources" value="i1,i2"/&gt;
    &lt;/indicator&gt;
    &lt;output name="o1" type="file"/&gt;
      &lt;property key="path" value="/tmp/f1"/&gt;
    &lt;/output&gt;
    &lt;output name="o2" type="mule"&gt;
      &lt;property key="url" value="tcp://localhost:18564/JProbe"/&gt;
    &lt;/output&gt;
    &lt;probe id="p" period="5" status="started"&gt;
      &lt;indicator&gt;i3&lt;/indicator&gt;
      &lt;output&gt;o1&lt;/output&gt;
      &lt;output&gt;o2&lt;/output&gt;
    &lt;/probe&gt;
  </screen>
</sect1>
