System & Message Monitors Overview

Created by Victoria Chhieng on Fri, 12/20/2019 - 16:47
Published URL:
https://www.ibm.com/support/pages/node/1146586
1146586

News


Abstract

This article describes working with Navigator for i Monitors, both System & Message Monitors.
Updated 9/8/2021 with information for the new Navigator system monitors

Content

You are in: IBM i Technology Updates  > IBM Navigator for i > System & Message Monitors Overview 

System & Message Monitors Overview

Available on IBM Navigator for i 7.2 and later releases

New Navigator System Monitors available Sept 2021.  All functions not available immediately, see list of Enhancements for future functions

Introduction

System and Message Monitors are features initially delivered on the heritage version IBM Navigator for i starting with release 7.2. The monitors track current information about the performance of your system. Additionally, you can use them to carry out predefined actions when a specific event occurs. Monitors continue to monitor and perform any commands or actions you specified as a threshold until you stop the monitor.

Sections:

  • Overview
  • Authority
  • System Monitor Example
  • Message Monitor Example
  • Stop Monitor Server
  • Copy Monitor to another System
  • Replacement Variables
  • Collection Interval for Monitor Metrics
  • Implementation Details
    • Debug files

Overview

IBM Navigator for i provides the following types of monitors:

  • System monitor
Collect and display performance data as it happens. System monitors use Collection Services data to track the metrics of system performance that you select. Detailed graphs help you visualize what is going on with your system as it happens. Choose from various metrics (performance measurements) to pinpoint specific aspects of system performance.  
  • Message monitor

Find out whether your application completes successfully or monitor for specific messages that are critical to your business needs. You can see the details of a message, reply to a message, send a message, delete a message, and view or change the properties of a message.

Under the Monitors folder in the navigator area, users can access the system & message monitor lists.  From the system & message lists, users can create, modify, start, or stop a monitor, and also can view event log list and view associated Performance Data Investigator charts for the system monitor metrics.

Start System Monitor

Figure 1: System Monitors


Authority

If a userid does not have *ALLOBJ authority (that is, User Class *SECOFR authority with *ALLOBJ removed),  it needs to be added to the QNAVMNTR (new)  authorization list.

This is done with the IBM Navigator for i GUI interface or through the green screen command line: ADDAUTLE AUTL(QNAVMNTR) USER(<usrprf>) AUT(*ALL)

For more detail, see: Authority for System Monitors in Navigator


System Monitor Example

Here is an example with system monitors. Use this example to learn how to set up a system monitor in IBM Navigator for i and how to configure it to take the best advantage of the available options.

Situation:

As a system administrator, you need to ensure that the system has enough resources to meet the current demands of your users and business requirements. For your system, CPU utilization is an important concern. To receive alerts if the CPU utilization gets too high or to temporarily hold any lower priority jobs until more resources become available.

To get an alert, you can set up a system monitor that sends you a message if CPU utilization exceeds 80%. Moreover, it can also hold all the jobs in the QBATCH job queue until CPU utilization drops to 60%, at which point the jobs are released, and normal operations resume.

Create the monitor steps:

1.  In IBM Navigator for i, select Monitors > System Monitors. From the Actions menu, select Create New System Monitor...
Create New System Monitor
Figure 2: Create a monitor
2.  Enter a name and description for this monitor. 
3.  Select a metric and move it to the right side of the pick list with the arrow:
 a.  It moves from "Available Metrics" to "Metrics to Monitor".
Add metrics to right side
Figure 3: Add metrics
Set collection interval and thresholds
      c.  Set the collection interval - The default and recommended setting is 60 seconds. 
      d.  To add thresholds, check the threshold box and then click the Threshold link 
Figure 4: Set collection interval.  Check box and click Threshold to set thresholds
  Threshold settings
Figure: Set threshold configuration and command
d.  For Threshold 1, enter the Trigger value (Percent).
For Duration, specify the number of intervals to allow the threshold to be exceeded before the trigger is activated (default is one).
For IBM i Command, enter the command to send an inquiry message

    For the threshold Reset value, specify < 70 (less than 60 percent busy). This action resets the monitor when CPU utilization falls under 70% (note there is also an Interval Duration parameter that defaults to one).

To temporarily hold lower priority jobs until more resources become available:
on trigger: HLDJOBQ JOBQ(QBATCH)
on reset: RLSJOBQ JOBQ(QBATCH)
This command releases the QBATCH job queue when CPU utilization stays under 60% for five collection intervals.

Figure 5

4.  Click OK to save the threshold property.

5.  Click OK to save the monitor metric

7.  From the list of system monitors, right-click the new monitor and select Start.
Start System Monitor
Figure 7

The new monitor, collects the CPU utilization and other metrics, with new data points added every 60 seconds, according to the specified collection interval. The monitor automatically carries out the specified threshold actions whenever CPU utilization reaches 80%. The monitor continues to run and to perform threshold actions until the monitor is stopped.

Note: A monitor carries out the threshold action exactly one time when the threshold trigger value is reached until the monitor is reset.  If the value continues to exceed the threshold for multiple intervals, the action is not invoked again until after the threshold reset value is reached. After the threshold is "reset", it can later "trigger" when reaching the threshold settings again.

Threshold triggered

Figure 8
From the list of monitor, users can view event logs of a specific monitor.
Event Logs
Figure 9
Additionally, users can view the associated charts from the system monitor list.  Right-clic the monitor and select Investigate Monitor Data and select a metric from the list.  Using heritage Navigator, you can use Visualize All Metrics or select All Metrics from the list.  This launches a Performance Data Investigator panel with one or more selected metrics.  This function will be added to the new Navigator at a future release.

Users can include any number of the available metrics in the same monitor, and each metric can have its own threshold values and actions. Users can also have several system monitors that run at the same time.

Note: Collections services keep collecting data even if you turn off the monitor. When monitors override the settings of Collection Services to gather performance data more frequently, the settings are not undone when a monitor stops. If you no longer want to collect the data as often, you must manually change the Collection Services settings or use the Reset button.

For more information about system monitor and metrics, refer to the link on the IBM Docs: https://www.ibm.com/docs/en/i/7.4?topic=i-navigator-monitors


Message Monitor Example

Message Monitors are available in the heritage version of Navigator.  Here is an example with Message Monitors. Use this example to learn how to set up a message monitor in IBM Navigator for i and how to configure it to take the best advantage of the available options.

Situation:

As a system administrator, you need to be aware of inquiry messages as they occur across your system. You can set up a message monitor to display any inquiry messages in your message queue that occur on your system.

To set up a message monitor, you need to define the types of messages you would like to watch for and what you would like the monitor to do when these messages occur. To set up a message monitor that accomplishes this goal, complete the following steps:

1.  In IBM Navigator for i, select Monitors > Message Monitors. From the Actions menu, select Create New Message Monitor.

image-20200117160737-10

Figure 11
2.  On the General page, enter a name and description for this monitor. Click Next.
image-20200117160744-11
Figure 12
3.  On the Message Queue page, enter the following values:
  1. For Message Queue to Monitor, specify QSYSOPR.
  2. For Library, specify QSYS.
  3. Click Next.
image-20200117160752-12
Figure 13
4.  On the Message Set page, perform the following steps:
  1. On the Message Set 1 tab, click Add
image-20200117160801-13
Figure 14 
b.  On the Add A Message Set page, enter the following values:
  1. Select Add a user defined set of messages.
  2. For Message Type, select Inquiry.
  3. Click OK.
image-20200117160810-14
Figure 15
  • c.  Select Set the message trigger and reset.
  • d.  For Trigger at the following message count, specify 1.
  • e.  Click Next.
  • image-20200117160816-15
  • Figure 16
  • 5.  Click Next to view the monitor summary page.
  • 6.  Click Finish to save the monitor.
  • image-20200117160829-16
  • Figure 17
7.  From the list of message monitors, right-click the new monitor and select Start.
image-20200117160836-17
Figure 18
The new message monitor displays any inquiry messages sent to QSYSOPR. If any inquiry messages sent to QSYSOPR, the monitor is triggered.
image-20200117160843-18
Figure 19 
User can reset the triggered monitor manually, by clicking the menu Reset Triggers.
image-20200117160849-19
Figure 20
From the list of message monitor, users can view event logs of the monitor.
image-20200117160856-20
Figure 21

This monitor responds to only inquiry messages sent to QSYSOPR. However, you can include two different sets of messages in a single monitor, and you can have several message monitors that run at the same time. Message monitors can also carry out IBM i commands when specified messages are received. For more information about message monitor, see the link on IBM Docs: https://www.ibm.com/docs/en/i/7.4?topic=i-navigator-monitors


Stop Monitor Server

Use the "Stop Monitor Server" action to end the server before you apply PTFs. 

Stop Monitor Server


Copy a Monitor to another System

You can use the "Copy to System" function to copy a specific monitor to any system listed in the Target System List. 

Select that system on the Copy to System action panel from the Monitors-> System panel.

Copy to System



Limitations on Monitor-able Messages:

The message monitor calls /QSYS.LIB/QGY.LIB/QGYOLMSG.PGM to get the message list. This program  lists messages from non-program message queues.

It cannot be used to list messages sent to a job log (including *EXT) or to list messages sent to the QHST message queue.


Replacement Variables

Replacement variables are available for both System & Message monitors.  

Use these links for more information:



Collection interval for monitor metrics

Recommended collection interval time for monitor metrics is one min or longer to keep monitor collections from growing larger than necessary.  Default is set to one minute starting with the June 2016 SP.  Previously created monitors may still have the default of 15 sec if that value was not manually modified.

With the 2H 2021 New Navigator monitors, there is an option to Reset the System Monitor Collection Interval.  This button performs the steps listed in the manually modified page for you:

Reset steps hover text

  1. Turn off System Monitoring
  2. Revert all the system monitor categories to collection frequency of 1 minute
  3. Asks if you want to Cycle the Collector to cause these new settings to take effect immediately
Reset System Monitoring Collection Interval

Implementation Details:

Auto restart is supported for system and message monitors

A user can modify a started system or message monitor.

Design details for monitors functionality

A daemon job QNAVMNSRV (new Navigator) and QINAVMNSRV (heritage) is introduced to provide a monitor service for IBM Navigator for i, which includes data collection and a programmable interface for accessing the data. 

These are the details on the directories and programs:

  • 1.  /QIBM/UserData/Os400/Navigator/config/MONITOR contains log & trace files for job QNAVMNSRV (new) QINAVMNSRV (heritage)
  •                • monitor.log, stderrA.txt, stderrB.txt, stdoutA.txt, stdoutB.txt
  • 3.  A service program: /QSYS.LIB/QSYSDIR.LIB/QINAVSWUSR.SRVPGM
  • 4.  A program: /QSYS.LIB/QSYSDIR.LIB/QINAVMNSRV.PGM
  • This program is used to start/stop job QNAVMNSRV (new Nav) QINAVMNSRV (heritage). Normally, this job is started automatically when IBM Navigator for i is started. The job continues running when IBM Navigator is stopped. It can be stopped explicitly by this command (for new Navigator):
  •     CALL PGM(QSYSDIR/QNAVMNSRV) PARM(*STOP)
  •     CALL PGM(QSYSDIR/QINAVMNSRV) PARM(*STOP) -- heritage 
  • Note: Call this command to end the job QNAVMNSRV (new) QINAVMNSRV (heritage) before you apply a new PTF. Alternatively, you can End the Monitor Server with the Action command

Debug files for System Monitors:

Before you report any problems related to system monitors, collect these files before you make any changes to your system to preserve the debug information:

1) In /QIBM/UserData/OS/ADMININST/admin1/wlp/usr/servers/admin1/logs 

  • messages.log is the file to look at for Navigator errors

2) For system monitor specific errors, go to /QIBM/ProdData/OS400/Navigator/config/MONITOR and save the files located there:

  • navMonStderrA.txt
  • navMonStderrB.txt
  • navMonStdoutA.txt
  • navMonStdoutB.txt

[{"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:
15 September 2021

UID

ibm11146586