Apama 10.15.0 | Developing Apama Applications | Developing Apama Applications in EPL | Defining Monitors
 
Defining Monitors
 
About monitor contents
Example of a simple monitor
Spawning monitor instances
Communication among monitor instances
About service monitors
Adding predefined annotations
Subscribing to channels
Adding service monitor bundles to your project
Utilities for operating on monitors
A monitor is one of the basic units of EPL program execution.
Monitors have both data and logic. Monitors communicate by sending and receiving events. You define a monitor in a .mon source file. When you load the .mon file into the correlator, the correlator creates an instance of the defined monitor.
A monitor instance can operate like a factory and spawn additional monitor instances. A spawned monitor instance is a duplicate of the monitor instance that spawned it except that the correlator does not clone any active listeners or stream queries. Spawning lets a single monitor instance generate multiple instances of itself. While generally, the spawned monitor instances all listen for the same event type, each one can listen for events that have different values in particular fields.
It is good practice to define monitors and events in separate files. When you inject files into the correlator, be sure to load event type definitions before you load the monitors that process events of those types.
The topics below provide information and instructions for defining monitors. For reference information, see Monitors. Apama provides several sample monitor applications, which you can find in the samples\epl directory of your Apama installation directory.
See also: Overview of Developing Apama Applications and Overview of Deploying Apama Applications.