MOI Metric Extractor Utility
search cancel

MOI Metric Extractor Utility

book

Article ID: 236149

calendar_today

Updated On:

Products

Mainframe Operational Intelligence

Issue/Introduction

The MOI Extract utility can extract up to 45 days worth of metric data for specified metrics for analysis by the MOI team.

Metrics that are interesting to you.  Examples would be: 

  • Any event which is worth sharing for further analysis 
  • Metrics that generated a valuable alert or even a potential useless alert 
  • Green Highway learning that is looking correct to you or that is looking different than you expect 
  • Machine learning that seems to be “adapting” vs “not adapting”

 

 

Environment

Mainframe Operational Intelligence

MOI 2.0.06

Resolution

MOI Metric Data Extraction

  1. On your MOI appliance, create the following directory in the /tmp directory

         cd /tmp

         mkdir  extract-moi-data

  1. Download the tar file, , moi-metric-extractor-v1_1646418444069.tar,  attached to this Knowledge Document to the /tmp/extract-moi-data directory. 
  2. In the extract-moi-data directory, run the following command to untar/unzip the downloaded tar file:

           tar -xvf moi-metric-extractor-v1_1646418444069.tar

          The following files will be extracted:

                  extract-metrics-data.sh

                  backup-graphdb

                  metricToExtract.csv

  1. You will need to select each metric that you want to extract using the following process:

            * display the desired metric via the MOI UI .   The UI example below is for metric CPU%.

            * Click on the Context URL dropdown button  at the top of the  UI to show the metric  URL

            * Click on the copy icon on the far right of the dropdown to copy the URL

           * Paste the URL into any text editor and then select and copy the metricKey VALUE  as shown below:

https://<hostname>.net:61443/MPM/#/view/Analytics?params=analysis,mode=da,from=1646144460000,to=1646257736603,max=1646257620000,alerts=true,chart=true,metricKey=021b2624f59e3228960d96847327a271e371fcb3,zoom=null,ghOnly=false,sort=dateTime,reverse=true,pageStart=0,pageEnd=0,hidden=minThreshold,showSelectedMetric=true,persistedMetricKey=021b2624f59e3228960d96847327a271e371fcb3

          * Go to the tmp/extract-moi-data directory and edit the metricToExtract.csv file with the vi                 editor

          * Insert the copied metricKey VALUE after the   instanceId=  string on the template line

               instanceId=021b2624f59e3228960d96847327a271e371fcb3

         * Repeat this Step 4 process by inserting additional instanceId= lines into the metricToExtract.csv file and copying additional metricKey VALUES into them.   Add all the metrics that you would like to extract and then save the metricToExtract.csv file.  

         Please ensure that the syntax of the ‘instanceId=’ string on all added lines match the original template line or you will get an error and your metric data will not be extracted.   

        *  You are now ready to start the metric extract process with Step 5 below.

 

  1.   Clear directory /var/opt/moi/share/backups/ with the following command: 

           rm /var/opt/moi/share/backups/*

  1. Run the script 

          sh extract-metrics-data.sh

  1. Once script has executed successfully, upload ALL files in this directory 

          /var/opt/moi/share/backups/

                  to the Support Case along with the output log of the extract script.

Please note: This metric extract  can take 10+ minutes to finish its execution.

Attachments

moi-metric-extractor-v1_1646418444069.tar get_app