1. Home
  2. Docs
  3. Runtime
  4. Monitoring
  5. Jeyzer Monitor Oneshot

Jeyzer Monitor Oneshot

The Jeyzer Monitor Oneshot permits to execute Jeyzer Monitor in a one shot mode.
This is useful for the APM solutions like Nagios : the APM is requesting the state of the monitored process by calling the Jeyzer Monitor Oneshot.

Monitoring state is read from the process output (see Output section below).

The monitoring outcome is also published through HTML pages.
The monitor web publisher is therefore active and should have access to any HTTP server to publish those pages (by default the Tomcat instance shipped with Jeyzer).

Limitation : events are not persisted from one monitoring execution to another. Therefore, it is recommended to set a large time period between each execution call (like 15 minutes).

Command

To start the Jeyzer Monitor Oneshot execute the command jeyzer-monitor-oneshot.bat or jeyzer-monitor-oneshot.sh, located under the analyzer\bin directory of your Jeyzer installation.

Prerequisites
These environment variables must be set to target the right profile :

  • JEYZER_TARGET_PROFILE : the target master profile
  • JEYZER_TARGET_NAME : the application node name. Identifies the process instance.
  • JEYZER_RECORD_DIRECTORY : the Jeyzer recording directory to monitor
  • JEYZER_RECORD_PERIOD : the recording period

By default, the Jeyzer Monitor Oneshot targets the Jeyzer features demo application.

Installation

Jeyzer Installer : Select the Jeyzer Monitor component.
The Jeyzer Installer will guide you in the high level setup.
Check the quick_start.html at the Jeyzer installation root : it contains useful paths.

Configuration

Jeyzer Monitor Oneshot configuration relies on :

Logging

Jeyzer Monitor Oneshot relies on the logback framework.

The nagios-logback.xml drives the console and file logging.
It is located in the analyzer/config/log directory of your Jeyzer installation.

Logging is disabled by default as the caller requires only on line of output.
Logging settings can be changed at runtime (no need to restart).
Log file is generated under the monitored directory recording which is by default :
work/recordings/<application recording>/log

Outputs

This is basically adapted for the Nagios APM.

The execution output is one trace line – on the process stdout – which gives the status (no events/events/error) and refer a monitoring events doc URL if applicable.

The process exit code indicates the highest event category encountered : 0 for INFO, 1 for WARNING, 2 for CRITICAL and 3 for ERROR or UNKNOWN.

As a URL is exposed, HTML pages containing the monitoring events are also generated through the Jeyzer web publisher.