Script exporter metric definition file (metrics_script_exporter.conf)
- Organization of this page
Syntax
The same as the JP1/IM - Agent Node exporter metric definition file.
File
metrics_script_exporter.conf
metrics_script_exporter.conf.model (Model file)
Storage directory
- For Windows
-
- When using a physical host
-
Manager-path\conf\imdd\plugin\jp1pccs\
- When using a logical host
-
shared-folder\jp1imm\conf\imdd\plugin\jp1pccs\
- For Linux
-
- When using a physical host
-
/etc/opt/jp1imm/conf/imdd/plugin/jp1pccs/
- When using a logical host
-
shared-directory/jp1imm/conf/imdd/plugin/jp1pccs/
Description
This file defines Script exporter metric information shown in the Trends tab of the Integrated Operation Viewer window.
Definitions are used for the return values of the __metricListGet method and __timeSeriesDataGet method for JP1/IM - Agent product plug-ins. If JP1/IM - Manager is in a hierarchical configuration and trend data stored in the database of a lower-level manager is referenced from an upper-level manager, you must add the metrics of the referenced trend data to the metrics definition file of the upper-level manager.
Character encoding
UTF-8 (without BOM)
Linefeed code
In Windows: CR+LF
In Linux: LF
Timing in which definitions are reflected
Definitions are reflected when metric information is retrieved in the Trends tab on the Integrated Operation Viewer window, or in the REST API.
For the Script exporter IM management node, definitions are reflected when the jddcreatetree command and the jddupdatetree command are executed.
Content description
See Content description in Node exporter metric definition file (metrics_node_exporter.conf) in (2. Definition Files) JP1/IM - Agent.
Settings in the model file (initial status) and examples of alert definitions
The following shows the settings (initial status) of each metric written in the Script exporter metric definition file (model file), and examples of alert definitions (alert configuration file).
-
azure_virtual_machine_disk_read_bytes_total
- Settings (initial status)
Member
Setting (initial status)
name
script_success
default
true
promql for the metric definition file (including $jp1im_TrendData_labels)
script_success and $jp1im_TrendData_labels
resource_en
category
script
label
Script success
description
Script exit status (0 = error, 1 = success)
unit
-
- Examples of alert definitions#
groups: - name: script_exporter rules: - alert: script_success(Script exporter) expr: 0 == script_success for: 3m labels: jp1_pc_product_name: "/HITACHI/JP1/JPCCS2" jp1_pc_severity: "Error" jp1_pc_eventid: "1401" jp1_pc_metricname: "script_success" annotations: jp1_pc_firing_description: "Failed to execute script. value={{ $value }}" jp1_pc_resolved_description: "Script successfully executed."- #
-
When defining multiple alerts with the same integrated agent host, avoid specifying duplicate groups:, or specifying a name that specifies the same group name in duplicate.
-
script_duration_seconds
- Settings (initial status)
Member
Setting (initial status)
name
script_duration_seconds
default
true
promql for the metric definition file (including $jp1im_TrendData_labels)
script_duration_seconds and $jp1im_TrendData_labels
resource_en
category
script
label
Duration
description
Script execution time, in seconds
unit
seconds
- Examples of alert definitions#
groups: - name: script_exporter rules: - alert: script_duration_seconds(Script exporter) expr: 60 < script_duration_seconds for: 3m labels: jp1_pc_product_name: "/HITACHI/JP1/JPCCS2" jp1_pc_severity: "Error" jp1_pc_eventid: "1402" jp1_pc_metricname: "script_duration_seconds" annotations: jp1_pc_firing_description: "The script execution time has exceeded the threshold (60 seconds). value={{ $value }} seconds" jp1_pc_resolved_description: "The script execution time has fallen below the threshold (60 seconds)."- #
-
This uses a threshold value of 60 as an example. Change this value based on the number of monitoring targets.
When defining multiple alerts with the same integrated agent host, avoid specifying duplicate groups:, or specifying a name that specifies the same group name in duplicate.
-
script_exit_code
- Settings (initial status)
Member
Setting (initial status)
name
script_exit_code
default
true
promql for the metric definition file (including $jp1im_TrendData_labels)
script_exit_code and $jp1im_TrendData_labels
resource_en
category
script
label
Exit code
description
Script execution time, in seconds
unit
-
- Examples of alert definitions#
groups: - name: script_exporter rules: - alert: script_exit_code(Script exporter) expr: 0 != script_exit_code for: 3m labels: jp1_pc_product_name: "/HITACHI/JP1/JPCCS2" jp1_pc_severity: "Error" jp1_pc_eventid: "1403" jp1_pc_metricname: "script_exit_code" annotations: jp1_pc_firing_description: "Failed to execute script. value={{ $value }}" jp1_pc_resolved_description: "Script successfully executed."- #
-
When defining multiple alerts with the same integrated agent host, avoid specifying duplicate groups:, or specifying a name that specifies the same group name in duplicate.