System Monitor Replacement Variables
System Monitor Replacement Variables:
Replacement variables are available to customize your actions to
the specific metric and values
These replacement variables can be used on the IBM i command. For example, rather than just
|SNDMSG MSG(“Threshold triggered”) TOUSR(*SYSOPR)|
You can use replacement variable:
|SNDMSG MSG('Monitor &MON exceeded threshold &TVAL for &TDUR interval(s); current value is &VAL.') TOUSR(*SYSOPR)|
List of available parameter passed data
1. Batch I/O is shown as I/O operations rather than transactions per second
2. Transaction rates are shown as transactions rather than transactions per second
3. Interactive response times (both average and maximum) are shown in milliseconds rather than seconds
&SEQ Sequence number: A unique, incrementing number assigned to each collection interval. Can be used in a program to compare when triggers happened and in what sequence (length 10) is not supported in Navigator for i System Monitors
- From the Configure Metric panel, click the question mark
Threshold trigger and Threshold reset ➔ Parameters for operating system command
The full text of the help will be provided here for reference:
Threshold trigger and threshold reset
Provides a place for you to specify the conditions that must be met to trigger and reset this threshold and the commands that should be run when the threshold is triggered and when it is reset. You cannot specify or change these conditions and commands unless the enable threshold box is checked. You cannot specify the threshold reset conditions and commands until you have specified value and duration for the threshold trigger. Use the operators (>= or <) to determine how you want the threshold value defined. You can specify the following conditions and commands for threshold trigger and for threshold reset:
Value: Specifies the condition that must be met to trigger or to reset this threshold.
Duration: Specifies the number of consecutive collection intervals that the value must meet the criterion to cause a threshold trigger or reset event. Specifying a higher number of collection intervals for duration to help avoid unnecessary threshold activity due to frequent spiking of values.
Operating system command: Specifies the command to be run on the endpoint system when the threshold is triggered or reset. The command will always run under the job that is associated with the user profile of the person running the monitor. This job is separate from the server job.
Parameters for operating system command:You can use the following parameters for the operating system commands when the threshold for a system monitor is triggered or reset. The parameters must be entered in uppercase exactly as shown. See the examples below. Parameter Passed Data &DATE Date &ENDPOINT Endpoint system name &INTVL Collection interval &MON Monitor name &RDUR Reset duration &RVAL Reset value &TDUR Trigger duration &TIME Time &TVAL Trigger value &VAL Current value(See note 4) Notes: 1.The dollar sign ($) that was available in previous releases is still supported, for example, $TIME. 2.The format for the date parameter (&DATE) depends on the system values QDATFMT & QDATSEP. In most cases, the length of the variable &DATE will still be 8. For example: If QDATFMT = MDY and QDATSEP is '/', the format will be MM/DD/YY. If QDATFMT = DMY and QDATSEP is '-', the format will be DD-MM-YY. A special case is when QDATFMT = JUL and QDATSEP='/'. In this situation &DATE format will be YY/DDD and there will be 6 characters in the value. 3.The format for the time parameter (&TIME) is HHMMSS. 4.For the current value parameter (&VAL), these metrics have special considerations: Batch IO is shown as I/O operations rather than transactions per second. Transaction rates are shown as the number of transactions rather than transactions per second. Interactive response times (both average and maximum) are shown in milliseconds rather than seconds. 5.When a system monitor runs a Send Distribution (SNDDST) command, the SNDDST command fails. You should use the Submit Job (SBMJOB) command to call the SNDDST command. Examples: 1.The following command uses the &TIME and &TVAL parameters to pass to the program the time that the threshold was triggered and the trigger value: CALL LIB01/PROG02 PARM('&TIME' '&TVAL'). 2.The following command uses the &MON, &TVAL, &TDUR, and &VAL parameters on the Send Message command to send a message to the system operator when the threshold has been triggered: SNDMSG MSG('Monitor &MON exceeded threshold &TVAL for &TDUR interval(s); current value is &VAL.') TOUSR(*SYSOPR) The message displayed to the system operator is: Monitor MyMonitor exceeded threshold 50 for 1 interval(s); current value is 61.
10 September 2021