IBM Support

System Monitor Replacement Variables

News


Abstract

System Monitor Replacement Variables

Content

You are in: IBM i Technology Updates  > IBM Navigator for i > Enhancements list > System Monitors > 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

  • &DATE              Date, length depends on format
    	The format and length for the date parameter (&DATE) depends on the system values QDATFMT & QDATSEP.  
            In most cases, the length of the variable &DATE will be 8.  
                For example:
                  If QDATFMT = MDY and QDATSEP is '/', the format will be MM/DD/YY (length=8)
                  If QDATFMT = DMY and QDATSEP is '-', the format will be DD-MM-YY (length=8)
                A special case is when QDATFMT = JUL and QDATSEP='/'.  
                  In this situation &DATE format will be YY/DDD (length = 6)
  • &ENDPOINT   Endpoint System name (length 1-256)
  • &INTVL            Collection interval: How often the monitor collected data (in seconds, length 1-4)
  • &MON               The Monitor name (variable length 1-64)
  • &RDUR             Reset duration: How many intervals does the reset value have to be met before the monitor resets (length 1-3)
  • &RVAL              Reset value: The value that the metric was monitoring for when the monitor reset (length 1-3)
  • &TDUR             Trigger duration: How many intervals does the trigger value have to be met before the monitor triggers (length 1-3)
  • &TIME              The time the monitor triggered or reset (length 6) HHMMSS
  • &TVAL              Trigger value: The value that the metric was monitoring for when the monitor triggered (length 1-5)
  • &VAL                Current value: The actual value of the metric when the monitor triggered (length 1-5)
                  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

Replacement variables are documented in the IBM Navigator for i web help, not in the Knowledge Center
  • From the Configure Metric panel, click the question mark
image-20200117161429-1

  • Drill down:

Threshold trigger and Threshold reset ➔ Parameters for operating system command

image-20200117161436-2

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.

[{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Component":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
10 September 2021

UID

ibm11143028