9.4.1 Setup procedure for linking JP1/IM3
The following figure shows an example of a system configuration for linking with JP1/IM3.
|
|
In the preceding example, JP1/IM3 - Manager is used to monitor the execution times of root jobnets operating in JP1/AJS3. The information on execution time for root jobnets in JP1/AJS3 is converted into a metric by using the UAP monitoring capability of JP1/IM3 - Agent from JP1/AJS3 - Manager.
When the user logs in to JP1/IM3 - Manager with a web browser, they can view the execution time of each root jobnet and other information collected from each monitored JP1/AJS3 - Manager host.
The following figure shows the setup procedures for linking JP1/IM3.
|
|
- #1
-
For details about how to set up, see the JP1/Integrated Management 3 - Manager Configuration Guide.
- #2
-
For details, see (1) Setting up linkage with JP1/IM3 (procedure to be performed on the JP1/AJS3 manager host).
- #3
-
For details, see (2) Setting up linkage with JP1/IM3 (procedure to be performed on the JP1/IM3 manager host).
Before you perform the setup procedure described later, make sure that the following prerequisite conditions are met:
- Prerequisite conditions:
-
-
JP1/IM3 - Manager has been set up.
-
JP1/IM3 - Agent has been set up.
-
JP1/AJS3 - Manager has been set up.
-
The setup procedure for linkage with JP1/IM2 has been performed completely.
For details, see 9.3.1 Setup procedure for linking JP1/IM2.
-
JP1/Base is installed on the JP1/IM3 - Agent host.
-
- Organization of this subsection
(1) Setting up linkage with JP1/IM3 (procedure to be performed on the JP1/AJS3 manager host)
The setup procedure to be performed on the JP1/AJS3 manager host is as follows:
-
Open the Script exporter configuration file.
For the Script exporter configuration file, see the manual JP1/Integrated Management 3 - Manager Command, Definition File and API Reference.
-
Use the Script exporter configuration file to configure Script exporter for IM3 linkage.
The configuration details are as follows:
scripts: ... - name: ajseventmetrics command: <absolute-path-of-the-ajseventmetrics-command> timeout: max_timeout: 60 enforced: true ...For details about the ajseventmetrics command, see 9.7.2 Commands Used When Linking with JP1/IM3.
-
Save the Script exporter configuration file.
-
Open the Prometheus configuration file.
For the Prometheus configuration file, see the manual JP1/Integrated Management 3 - Manager Command, Definition File and API Reference.
-
Register the Script exporter that you configured in step 2 in the Prometheus configuration file.
The configuration details are as follows:
... - job_name: 'jpc_jp1ajs3' scrape_interval: 1m scrape_timeout: 50s http_sd_configs: - url: 'http://<installation-hostname>:<script-exporter-port> /discovery' relabel_configs: - source_labels: [__param_script] regex: 'ajseventmetrics' action: 'keep' - source_labels: [__param_script] target_label: jp1_pc_script - target_label: jp1_pc_exporter replacement: JPC Script exporter - target_label: jp1_pc_category replacement: Script - target_label: jp1_pc_trendname replacement: script_exporter - target_label: jp1_pc_multiple_node replacement: "{job=~'jpc_jp1ajs3.*',__name__=~'script_.*'}" - target_label: jp1_pc_nodelabel replacement: JP1/AJS3 metric collector(Script exporter) - target_label: jp1_pc_agent_create_flag replacement: false metric_relabel_configs: - source_labels: ['__name__'] regex: 'script_success|script_duration_seconds|script_exit_code|ajs_rootjobnet_exectime' action: 'keep' - source_labels: [jp1_pc_script] target_label: jp1_pc_nodelabel - source_labels: ['__name__','ajs_host','ajs_scheduler','ajs_rootjobnet'] regex: 'ajs_rootjobnet_exectime;(.*);(.*);(.*)' target_label: jp1_pc_nodelabel replacement: ${1}:${2}:${3} - source_labels: ['__name__','ajs_host'] regex: 'ajs_rootjobnet_exectime;(.*)' target_label: instance replacement: ${1} - source_labels: ['__name__'] regex: 'ajs_rootjobnet_exectime' target_label: jp1_pc_trendname replacement: ajs_rootjobnet - regex: (jp1_pc_script|jp1_pc_multiple_node|jp1_pc_agent_create_flag) action: labeldrop - source_labels: ['__name__'] regex: 'ajs_rootjobnet_exectime' target_label: jp1_pc_category replacement: '' - source_labels: ['__name__'] regex: 'ajs_rootjobnet_exectime' target_label: jp1_pc_exporter replacement: '' - source_labels: ['__name__'] regex: 'ajs_rootjobnet_exectime' target_label: jp1_pc_trendname replacement: '' ...In addition, when setting up scraping definitions by using any Script exporter other than the Script exporter for IM3 linkage, include the following settings in the scraping definitions:
... - job_name: 'Scrape-Job-Name-used-by-the-Script-exporter-you-specified' ... relabel_configs: - source_labels: [__param_script] regex: 'ajseventmetrics' action: 'drop' ... -
Save the Prometheus configuration file.
-
Define the performance data monitoring notification function as necessary.
To monitor the link metrics, set up alert definitions in the alert configuration file. For details on performance data monitoring and notification functions, see the JP1/Integrated Management 3 - Manager Overview and System Design Guide. For details on the alert configuration file, see the manual JP1/Integrated Management 3 - Manager Command, Definition File and API Reference.
The following shows an example of an alert definition:
-
Anomaly monitoring of root jobnet execution time
The following alert definition example issues an alert when the Z score exceeds 3 compared to the execution time pattern for the past year.
... - alert: AJS_ROOTJOBNET_EXECTIME_ANOMALY_DETECTION(Script exporter) expr: abs(ajs_rootjobnet_exectime - avg_over_time(ajs_rootjobnet_exectime[1y#1])) / (stddev_over_time(ajs_rootjobnet_exectime[1y#1]) > 0) > 3#2 for: 1m labels: jp1_pc_product_name: "/HITACHI/JP1/AJS2" jp1_pc_component: "/HITACHI/JP1/AJS3/CONFINFO" jp1_pc_severity: "Error" jp1_pc_eventid: 000041D0 jp1_pc_metricname: "ajs_rootjobnet_exectime" annotations: jp1_pc_firing_description: "An anomaly was detected in the execution time of the root jobnet. ({{ $labels.jp1_pc_nodelabel }})" jp1_pc_resolved_description: " Anomaly monitoring of root jobnet execution time is complete. ({{ $labels.jp1_pc_nodelabel }})" ...- #1
-
Period of historical data used for Z score calculation
- #2
-
Threshold used for abnormality judgment of Z score
-
Monitoring for signs of delays in root jobnet execution time
The following alert definition example calculates an approximate straight line from the execution times of the root jobnet (/rootjobnet) defined in the scheduler service AJSROOT1 of the JP1/AJS3 - Manager host ajsmgr over the past year. It issues an alert if the predicted value for one day later exceeds 3,600 seconds.
... - alert: AJS_ROOTJOBNET_EXECTIME_DELAY_EARLY_DETECTION(Script exporter) expr: predict_linear(ajs_rootjobnet_exectime(ajs_host="ajsmgr#1",ajs_scheduler="AJSROOT1 #2",ajs_rootjobnet="/rootjobnet#3")[1y#4],86400 #5) > 3600#6 for: 1m labels: jp1_pc_product_name: "/HITACHI/JP1/AJS2" jp1_pc_component: "/HITACHI/JP1/AJS3/CONFINFO" jp1_pc_severity: "Error" jp1_pc_eventid: 000041D0 jp1_pc_metricname: "ajs_rootjobnet_exectime" annotations: jp1_pc_firing_description: "A sign of a delay in the execution time of the root jobnet was detected. ({{ $labels.jp1_pc_nodelabel }})" jp1_pc_resolved_description: "Monitoring for signs of delays in root jobnet execution time is complete. ({{ $labels.jp1_pc_nodelabel }})" ...- #1
-
JP1/AJS3 - Manager host name
- For a physical host: Host name of the host on which JP1/AJS3 - Manager is installed
- For a logical host: Logical host name
- #2
-
Scheduler service name
- #3
-
Name of the root jobnet to be monitored
- #4
-
Period of historical data used for calculating the approximate straight line
- #5
-
Time (in seconds) until the time of the future value you want to predict on the approximate straight line
- #6
-
Threshold (seconds) for execution time for the root jobnet
-
-
Change the retention period for performance data as necessary.
Set the retention period for performance data in the service definition file or unit definition file. For the service definition file or unit definition file, see the manual JP1/Integrated Management 3 - Manager Command, Definition File and API Reference.
(2) Setting up linkage with JP1/IM3 (procedure to be performed on the JP1/IM3 manager host)
The setup procedure to be performed on the JP1/IM3 manager host is as follows:
-
Open the JP1/AJS3 plugin settings file in which definitions were specified during setup for linkage with JP1/IM2.
For the location of the JP1/AJS3 plugin settings file and the items to be set in the file for linkage with JP1/IM2, see 9.3.1(1) Setting up linkage with JP1/IM2 (procedure to be performed on the JP1/IM2 manager host).
-
Add the imHost setting item to the definitions in the JP1/AJS3 plugin settings file.
Specify definitions in the following format.
{ "ajswebconUrl":"value", "linkValueLimit":value, "prewaitLink":"{y|n}", "netcnLink":"{y|n}", "evRegexLink":"{y|n}", "evMacroLink":"{y|n}", "evotherLink":"{y|n}", "evIpLink":"{y|n}", "imHost":{ "Name-of-the-JP1/AJS3-Manager-host-to-be-monitored":{ "Name-of-the-scheduler-service-to-be-monitored":{ "immgrHost":"Name-of-the-JP1/IM3-manager-host", "imagtHost":"Name-of-the-JP1/IM3-agent-host" }, ... }, ... } }The following table shows the items to be set.
Table 9‒3: Setting item to be added to the JP1/AJS3 plugin settings file for linkage with JP1/IM3 Item name
Value
Description of values
imHost
Metric storage destination and monitoring targets
Specify how JP1/IM3 converts the information of the JP1/AJS3 - Manager host into metrics and in what configuration.
If this item is omitted, the JP1/IM3 linkage function cannot be used.
Specify the following values for the name of the JP1/AJS3 - Manager host to be monitored:
-
For a physical host
Host name of the host on which JP1/AJS3 - Manager is installed
-
For a logical host
Logical host name
Specify the name of the scheduler service to be monitored as the scheduler service that will be monitored through IM3 linkage on the JP1/AJS3 - Manager host.
immgrHost
Name of the JP1/IM3 manager host
Specify the host name of the JP1/IM3 - Manager host that stores the information for the JP1/AJS3 - Manager host. You can specify from 1 to 255 characters, excluding control characters.
-
For a physical host
Host name of the host on which JP1/IM3 - Manager is installed
-
For a logical host
Logical host name
imagtHost
Name of the JP1/IM3 agent host
Specify the name of the host where JP1/IM3 - Agent is installed. You can specify from 1 to 255 characters, excluding control characters.
-
-
Save the JP1/AJS3 plugin settings file.
-
As required, edit the metric definition file (metrics_ajs_rootjobnet.conf).
The following shows the storage folders for metric definition file (metrics_ajs_rootjobnet.conf).
-
In Windows
JP1/IM3-Manager-installation-folder\jp1imm\conf\imdd\plugin\jp1pccs
or
shared-folder\jp1imm\conf\imdd\plugin\jp1pccs
-
In UNIX
/etc/opt/jp1imm/conf/imdd/plugin/jp1pccs
or
shared-directory/jp1imm/conf/imdd/plugin/jp1pccs
The details listed are as follows:
[ { "name":"AJS_ROOTJOBNET_EXECTIME", "default":true, "promql":"avg_over_time(ajs_rootjobnet_exectime[$stepTime{minSeconds=\"60\"}]) and $jp1im_TrendData_labels", "resource_en":{ "category":"time", "label":"Execusion time of root jobnet", "description":"It is the time from the start to the end of the root jobnet.", "unit":"sec" }, "resource_ja":{ "category":"", "label":"
", "description":"
", "unit":"
" } } ]
-
-
Generate IM management node-related files and reflect the definition contents in the Intelligent Integrated Management server.
For details, see the JP1/Integrated Management 3 - Manager Configuration Guide.
-
If necessary, change the data retention period of the trend data management database of JP1/IM3 - Manager.
For details about how to change the data retention period, see the JP1/Integrated Management 3 - Manager Overview and System Design Guide.