You are currently viewing Zend Server 5.x documentation. Click here to view the latest Zend Server online documentation.
You are here: API Reference Guide > Zend Monitor - PHP API

Zend Monitor - PHP API

Table of Contents

Predefined Global Constants

ZEND_MONITOR_ETBM_ALL
Bitmask Representing all Event Types(for zend_monitor_event_reporting)
ZEND_MONITOR_ETBM_NONE
Bitmask Representing NO Monitoring Events (for zend_monitor_event_reporting)
ZEND_MONITOR_ETBM_CUSTOM
Custom Event-Type Bitmask(for zend_monitor_event_reporting)
ZEND_MONITOR_ETBM_FUNC_SLOW_EXEC
Function Slow Execution Event-Type Bitmask(for zend_monitor_event_reporting)
ZEND_MONITOR_ETBM_FUNC_ERR
Function Error Event-Type Bitmask(for zend_monitor_event_reporting)
ZEND_MONITOR_ETBM_REQ_SLOW_EXEC
Request Slow Execution Event-Type Bitmask(for zend_monitor_event_reporting)
ZEND_MONITOR_ETBM_REQ_REL_SLOW_EXEC
Request Relative Slow Execution Event-Type Bitmask(for zend_monitor_event_reporting)
ZEND_MONITOR_ETBM_REQ_LARGE_MEM_USAGE
Request Large Memory Usage Event-Type Bitmask(for zend_monitor_event_reporting)
ZEND_MONITOR_ETBM_REQ_REL_LARGE_MEM_USAGE
Request Relative Large Memory Usage Event-Type Bitmask(for zend_monitor_event_reporting)
ZEND_MONITOR_ETBM_REQ_LARGE_OUT_SIZE
Request Relateive Large Output Size Event-Type Bitmask(for zend_monitor_event_reporting)
ZEND_MONITOR_ETBM_ZEND_ERR
Zend/PHP Error Event-Type Bitmask(for zend_monitor_event_reporting)
ZEND_MONITOR_ETBM_JAVA_EXP
Unhandled Java Exception Event-Type Bitmask(for zend_monitor_event_reporting)
ZEND_MONITOR_ETBM_JQ_JOB_EXEC_ERROR
Job Queue - Job Execution Error Event-Type Bitmask
ZEND_MONITOR_ETBM_JQ_JOB_LOGICAL_FAILURE
Job Queue - Job Logical Error Event-Type Bitmask(for zend_monitor_event_reporting)
ZEND_MONITOR_ETBM_JQ_JOB_EXEC_DELAY
Job Queue - Job Execution Delayed Event-Type Bitmask(for zend_monitor_event_reporting)
ZEND_MONITOR_ETBM_JQ_DAEMON_HIGH_CONCURRENCY_LEVEL
Job Queue - Daemon High Concurrency Event-Type Bitmask(for zend_monitor_event_reporting)
ZEND_MONITOR_ETBM_ET_TRACER_FILE_WRITE_FAIL
Tracer - Failed to write a dump file Event-Type Bitmask(for zend_monitor_event_reporting)
ZEND_MONITOR_ET_JQ_JOB_EXEC_ERROR
Job Queue - Job Execution Error Event-Type Bitmask
ZEND_MONITOR_ET_JQ_JOB_LOGICAL_FAILURE
Job Queue - Job Logical Error Event-Type
ZEND_MONITOR_ET_JQ_JOB_EXEC_DELAY
Job Queue - Job Execution Delayed Event-Type
ZEND_MONITOR_ET_JQ_DAEMON_HIGH_CONCURRENCY_LEVEL
Job Queue - Daemon High Concurrency Event-Type
ZEND_MONITOR_ET_TRACER_FILE_WRITE_FAIL
Tracer - Failed to write a dump file Event-Type
ZEND_MONITOR_ET_ZSM_CONFIGUATION_MISMATCH
ZSM - Configuration is not matching the cluster
ZEND_MONITOR_ET_ZSM_NODE_ADDED_SUCCESSFULLY
ZSM - Node added successfully to the cluster
ZEND_MONITOR_ET_ZSM_NODE_IS_NOT_RESPONDING
ZSM - Node is not responding
ZEND_MONITOR_ET_ZSM_RESTART_FAILED
ZSM - Node removed successfully from the cluster
ZEND_MONITOR_ET_TRACER_FILE_WRITE_FAIL
ZSM - Restart failed

PHP Functions

zend_monitor_pass_error

Passes an error to the Monitor component with file and line details. This function is used in error handlers.

An alternative is to use trigger_error. However, this function does not indicate the file name and line number: It only passes the error message.

Available since version 4.0

Description

void zend_monitor_pass_error (int $errno, string $errstr, string $errfile, int $errline)

Parameters
errno
Error code
errstr
Error string
errfile
Error file
errline
Error Line

zend_monitor_custom_event

Creates a special (custom) event that is generated from your code. The information collected consists of the three following parameters: Class, Text and User Data.

Available since version 4.0

Description

void zend_monitor_custom_event (string $class, string $text, mixed $user_data)

Parameters
class
event type
text
string to appear in the event
user_data
optional. Any additional data to store with the event

zend_monitor_set_aggregation_hint

Incorporates the locations of occurrences in the script when there are events that require those location for diagnosing the reason an event occured. Only events of the same type are aggregated. The collected information is viewed in the Zend Server Administration Interface.

Available since version 4.0

Description

void zend_monitor_set_aggregation_hint (string $hint)

Parameters
hint
aggregation hint string
Return Value

zend_monitor_event_reporting

Enables or disables the event reporting of some event types by passing a bit-mask (as done by PHP's error_reporting function), but with the constants listed above, in ZEND_MONITOR_ET*.

Note: You cannot enable events that are disabled in the Event Rules file

Available since version 4.0

Description

int zend_monitor_event_reporting ([ int $new_error_reporting = null ])

Parameters
new_error_reporting
The new error reporting level to use. The default value is null
Return Value

The previous error_reporting level or FALSE if there is an error

 

© 1999-2013 Zend Technologies, Ltd. All rights reserved.