Prometheus configuration file (jpc_prometheus_server.yml)
- Organization of this page
Format
Write in YAML format.
global: scrape_interval: 1m scrape_timeout: 10s evaluation_interval: 1m external_labels: jp1_pc_prome_hostname: "Monitoring agent host name" : (Abbreviated) : scrape_configs:# - job_name: Scrape Job Name file_sd_configs: - files: - Discovery configuration file name relabel_configs: - target_label: jp1_pc_nodelabel replacement: Node exporter - regex: (jp1_pc_category|jp1_pc_trendname) action: labeldrop : (Abbreviated) : remote_write: - url: http://host-name-of-JP1/IM - Agent:20727/ima/api/v1/proxy/service/promscale/api/v1/write remote_timeout: 30s send_exemplars: false queue_config: capacity: 10000 max_shards: 200 min_shards: 4 max_samples_per_send: 3000 batch_send_deadline: 10s min_backoff: 100ms max_backoff: 10s
- #
-
When Script exporter discovery is specified using the HTTP-based http_sd_config method, specify the direct endpoint to http_sd_configs.url in scrape_configs in this file.
The following shows the HTTP-based service discovery endpoint for the Script exporter specified in http_sd_configs.url in scrape_configs.
http://installation-host-name:Script-exporter-port-number/discovery
In contrast to file_sd_configs, labels cannot be independently added with http_sd_configs. Labels must be added using relabel_configs. For details on the labels required, see 1.21.2(10)(b) Scraping definition for Script exporter in the JP1/Integrated Management 3 - Manager Configuration Guide.
File
jpc_prometheus_server.yml
jpc_prometheus_server.yml.model (model file)
Storage directory
■Integrated agent host
- In Windows:
-
-
For a physical host
Agent-path\conf\
-
For a logical host
shared-folder\jp1ima\conf\
-
- In Linux:
-
-
For a physical host
/opt/jp1ima/conf/
-
For a logical host
shared-directory/jp1ima/conf/
-
Description
This is a configuration file that defines the operation of the Prometheus server.
Character code
UTF-8 (without BOM)
Line feed code
In Windows: CR+LF
In Linux: LF
When the definitions are applied
When you run the Prometheus server reload API or restart the Prometheus server, it is reflected in the operation of the Prometheus server.
Also, if the value of the jp1_pc_prome_hostname label or the scrape definition (definition of the scrape_configs) is changed, it will be reflected in the displayed contents of the tree in the integrated operation viewer when the jddcreatetree command and the jddupdatetree command are executed after performing the above operation.
Information that is specified
For definitions of common placeholders used in the table below, see About definition of common placeholders for descriptive items in yml file.
Item |
Description |
Changeability |
What You Setup in Your JP1/IM - Agent |
JP1/IM - Agent Defaults Value |
||
---|---|---|---|---|---|---|
global: |
-- |
N |
-- |
-- |
||
[ scrape_interval: <duration> | default = 1m ] |
Specify the scrape interval to the target, ranging from 15 seconds to 24 hours. The value is specified in numbers and units. The units that can be specified are s (seconds), m (minutes), and h (hours). <Configuration Example> global: scrape_interval: 5m |
Y |
Specifies the scrape interval.# |
scrape_interval:1m |
||
[ scrape_timeout: <duration> | default = 10s ] |
Specifies the scrape request timeout period, ranging from 10 seconds to 60 minutes. The value is specified in numbers and units. The units that can be specified are s (seconds) and m (minutes). You must specify a value that is less than global.scrape_interval. <Configuration Example> global: scrape_timeout: 20s |
Y |
Configure as needed. |
scrape_timeout: 10s |
||
[ evaluation_interval: <duration> | default = 1m ] |
Specify the evaluation interval for the alert rule, ranging from 15 seconds to 48 hours. The value is specified in numbers and units. You can specify the following units: s (seconds), m (minutes), and h (hours). <Configuration Example> global: evaluation_interval: 15s |
Y |
Configure as needed. |
evaluation_interval: 1m |
||
external_labels: |
Specify a label to add when notifying remote lights and Alertmanager. You can specify up to 30 of them. |
N |
-- |
-- |
||
[ <labelname>: <labelvalue> ... ] |
Specify the label name and label value. The label name and label value can be up to 255 bytes each. Do not delete jp1_pc_prome_hostname labels that are set by default. <Configuration Example> global: external_labels: labelname1: valuename1 labelname2: valuename2 |
Y |
Since it is set by the installation script of the monitoring module, it is usually not necessary to change it. In a clustered environment, manually set the logical host name. |
external_labels: jp1_pc_prome_hostname: "host-name" |
||
rule_files: |
Specify the alert rule file. You can specify up to 30 of them. |
N |
-- |
-- |
||
[ - <filepath_glob> ... ] |
Specify a file name. The file name can be up to 255 bytes. <Configuration Example> rule_files: - " jpc_alerting_rules.yml" - "alerting_rules2.yml" |
Y |
You can change, add, and delete rule file names. Normally, no changes are required. |
rule_files: - "jpc_alerting_rules.yml" |
||
scrape_configs: |
Specifies the scrape definition. You can specify up to 30 of them. |
N |
-- |
-- |
||
[ - <scrape_config> ... ] |
See the description of <scrape_config> below. |
Y |
You can add scrape definitions. If you have your own Exporter, add a definition. Normally, no changes are required. |
The following Exporter definitions are pre-populated:
|
||
alerting: |
Configure the settings related to Alertmanager. |
N |
-- |
-- |
||
alert_relabel_configs: |
Set up relabeling for alert notifications. |
N |
-- |
-- |
||
[ - <relabel_config> ... ] |
See the description of <relabel_config> below. |
Y |
Specify this if you want to add or change the label of the alert. |
-- |
||
alertmanagers: |
Configure the alert notification destination Alertmanager. |
N |
-- |
-- |
||
[ - <alertmanager_config> ... ] |
See the description of <alertmanager_config> below. |
Y |
Specify the cohabiting Alertmanager as the alert notification destination. |
-- |
||
remote_write: |
Configure settings related to remote writing. |
N |
-- |
-- |
||
url: <string> |
Specify the endpoint to which the remote write is sent. <Configuration Example> remote_write: - url: http://integrated-agent-host-name:20727/ima/api/v1/proxy/service/promscale/write |
R |
Specifies the remote write endpoint for imagent on the same host. Modify Host name and Port number to suit your needs. |
url: http://localhost:20727/ima/api/v1/proxy/service/promscale/write |
||
[ remote_timeout: <duration> | default = 30s ] |
Specify the remote write timeout period in the range of 30 seconds to 60 minutes. The value is specified in numbers and units. The units that can be specified are s (seconds) and m (minutes). <Configuration Example> remote_write: - url: http://localhost:20727/ima/api/v1/proxy/service/promscale/write remote_timeout: 1m |
Y |
If the remote write times out, increase the value. |
remote_timeout: 30s |
||
write_relabel_configs: |
Set up relabeling during remote write. |
N |
-- |
-- |
||
[ - <relabel_config> ... ] |
See the description of <relabel_config> below. <Configuration Example> The following is a setting example when you do not want to remotely write the node_boot_time_seconds and node_context_switches_total obtained by node_exporter command. remote_write: - url: http://localhost:20727/ima/api/v1/proxy/service/promscale/write write_relabel_configs: - source_labels: ['__name__'] regex: '(node_boot_time_seconds|node_context_switches_total)' action: 'drop' |
Y |
Specify if you do not want to remotely write a specific metric. |
-- |
||
[ send_exemplars: <boolean> | default = false ] |
Specify to write Exemplars remotely. |
N |
-- |
send_exemplars: false |
||
queue_config: |
Set up a queue for remote write. |
N |
-- |
-- |
||
[ capacity: <int> | default = 2500 ] |
Specifies the number of samples to buffer. |
N |
-- |
capacity: 10000 |
||
[ min_shards: <int> | default = 1 ] |
Specify the lower limit for the number of parallel executions of remote write. |
N |
-- |
min_shards: 4 |
||
[ max_samples_per_send: <int> | default = 500] |
Specifies the maximum number of samples to send at one time. |
N |
-- |
max_samples_per_send: 3000 |
||
[ batch_send_deadline: <duration> | default = 5s ] |
Specifies the amount of time to wait before flushing the remaining queued samples. |
N |
-- |
batch_send_deadline: 10s |
||
[ min_backoff: <duration> | default = 30ms ] |
Specifies the minimum wait time limit for transmission retries. |
N |
-- |
min_backoff: 100ms |
||
[ max_backoff: <duration> | default = 100ms ] |
Specifies the upper limit of the wait time for transmission retries. |
N |
-- |
max_backoff: 10s |
- Legend:
-
R: Required, Y: Changeable, N: Not changeable, --: Not applicable
- #
-
When changing this value from the initial value (1m), review the value of the range vector selector specified in the PromQL statement of the metric definition file (the time range specified by square brackets { }). For the range vector selector, specify a value that is at least twice the scrape interval. If you specify a value less than 2 times, trend information cannot be obtained or trend information cannot be obtained at some times.
Also, when monitoring using Yet another cloudwatch exporter, do not specify a value greater than 10m. If specified, the configuration may not be retrieved when the jddcreatetree command is executed.
-
<scrape_config>
scrape_config section specifies a set of parameters that describe targets and how to scrape them.
In general, one job is specified in one scrape configuration. In advanced configurations, this is subject to change.
Targets can be statically configured via static_configs parameters or dynamically discovered using one of the supported service discovery mechanisms.
In addition, relabel_configs allows you to make advanced changes to targets and their labels before scraping.
Item
Description
Changeability
What You Setup in Your JP1/IM - Agent
JP1/IM - Agent Defaults Value
job_name: <job_name>
Specifies the name of the scrape definition. This value is set to the job label in the performance data.
The job name cannot exceed 255 characters.
-
For user-defined Exporter
Specify a jobname that does not start with "jpc". However, if Exporter is the same as Exporter provided by JP1/IM - Agent, specify it by referring to <job_name> below.
-
For container monitoring
See 1.21.2(11) Setting up container monitoring in the JP1/Integrated Management 3 - Manager Configuration Guide.
<Configuration Example>
scrape_configs:
- job_name: 'my_exporter'
Y
If you use your own Exporter, define a new scrape job name.
The following jobs are configured:
-
jpc_node
-
jpc_windows
-
jpc_blackbox_http
-
jpc_blackbox_icmp
-
jpc_cloudwatch
[ scrape_interval: <duration> | default = <global_config.scrape_interval> ]
Specifies the amount of time between scrape to the destination, from 15 seconds to 24 hours.
Specify this if you want the interval to be different from the scrape interval specified for the global.scrape_interval.
The value is specified in numbers and units. Possible units are s (seconds), m (minutes), and h (hours).
<Configuration Example>
scrape_configs:
- job_name: 'my_exporter'
scrape_interval: 10m
Y
Specify if you want to change global and the scrape interval.
If the value of job_name is "jpc_cloudwatch", do not specify a value greater than 10m. If specified, the configuration may not be retrieved when the jddcreatetree command is executed.
--
[ scrape_timeout: <duration> | default = <global_config.scrape_timeout> ]
Specifies the scrape request timeout period, ranging from 10 seconds to 60 minutes.
The value is specified in numbers and units. The units that can be specified are s (seconds) and m (minutes).
When this value is omitted, the value is going to be the smaller value of scrape_config.scrape_interval and global.scrape_timeout.
<Configuration Example>
scrape_configs:
- job_name: 'my_exporter'
scrape_timeout: 30s
Y
Specify this if you want to change the global and scrape timeout periods.
--
[ metrics_path: <path> | default = /metrics ]
Specifies the HTTP resource path to scrape within 255 bytes.
If not specified, "/metrics" is added to the URL at the time of scrape.
<Configuration Example>
scrape_configs:
- job_name: 'my_exporter'
metrics_path: /sample-metrics
Y
Specify if you want to use your own Exporter.
Specify the path for each job.
[ scheme: <scheme> | default = http ]
Specifies the protocol to use for the request.
You can specify "http" or "https".
<Configuration Example>
scrape_configs:
- job_name: 'my_exporter'
scheme: https
Y
Specify "http" or "https" to match the exporter.
--
params:
Specify HTTP URL parameters when scraping. You can specify up to 30 of them.
Y
--
--
[ <string>: [<string>, ...] ]
Specify the key and value.
The key and value can be up to 255 bytes each.
<Configuration Example>
scrape_configs:
- job_name: 'my_exporter'
params:
aaa: [bbb, ccc]
xxx: [yyy]
Y
Specify the URL parameters to pass to the exporter when scraping to match the exporter.
--
file_sd_configs:
Defines the file for which you want to set the scrape target.
N
--
--
-files:
Specifies the file to be scraped.
N
--
--
[ - <filename_pattern> ... ]
Specify a file name of up to 255 characters.
<Configuration Example>
scrape_configs:
- job_name: 'my_exporter'
file_sd_configs:
- files:
- 'file_sd_config_my_exporter.yml'
Y
Specify if you want to use your own Exporter.
To use the following functions in an environment upgraded from 13-00, the user must change the settings manually.
-
Node exporter for AIX
For details on changing the settings, see Setting up Node exporter for AIX scrape jobs in 1.23.2(1)(c) Setting Up JP1/IM - Agent in the JP1/Integrated Management 3 - Manager Configuration Guide.
For each job, make the following definitions.
- 'jpc_file_sd_config_node.yml'
- 'jpc_file_sd_config_windows.yml'
- 'jpc_file_sd_config_blackbox_http.yml'
- 'jpc_file_sd_config_blackbox_icmp.yml'
- 'jpc_file_sd_config_cloudwatch.yml'
- 'jpc_file_sd_config_node_aix.yml'
[ refresh_interval: <duration> | default = 5m ]
Specify the interval between reloading files containing scrape targets, ranging from 5 minutes to 24 hours.
The value is specified in numbers and units. You can specify the following units: m (minutes) and h (hours).
<Configuration Example>
scrape_configs:
- job_name: 'my_exporter'
file_sd_configs:
- files:
- 'file_sd_config_my_exporter.yml'
refresh_interval: 10m
Y
Specify this if you want to change the reload interval for files when using your own exporter.
Normally, no changes are required.
--
relabel_configs:
Sets the relabeling for the target before scraping.
N
--
--
[ - <relabel_config> ... ]
See the description of <relabel_config> below.
Y
Specify if you want to use your own Exporter.
To use the following functions in an environment upgraded from 13-00, the user must change the settings manually.
-
Node exporter for AIX
For details on on changing the settings, see Setting up Node exporter for AIX scrape jobs in 1.23.2(1)(c) Setting Up JP1/IM - Agent in the JP1/Integrated Management 3 - Manager Configuration Guide.
The following definitions are made for each job.
-
For jpc_node
- target_label: jp1_pc_nodelabel
replacement: Linux metric collector(Node exporter)
-
For jpc_windows
- target_label: jp1_pc_nodelabel
replacement: Windows metric collector(Windows exporter)
-
For jpc_blackbox_http
- source_labels: [__address__]
target_label: __param_target
regex: ([^:]+):([^:]+):(.*)
replacement: ${3}
- source_labels: [__address__]
target_label: instance
- source_labels: [__address__]
target_label: jp1_pc_nodelabel
regex: ([^:]+):([^:]+):(.*)
replacement: ${2}
- target_label: __address__
replacement: integrated agent host name:20715
- source_labels: [__param_module]
target_label: jp1_pc_module
-
For jpc_blackbox_icmp
- source_labels: [__address__]
target_label: __param_target
- target_label: jp1_pc_nodelabel
replacement: Synthetic metric collector(Blackbox exporter(ICMP))
- source_labels: [__address__]
target_label: instance
- target_label: __address__
replacement: integrated agent host name:20715
- source_labels: [__param_module]
target_label: jp1_pc_module
-
For jpc_cloudwatch
It is not necessary to state.
-
For jpc_node_aix
- target_label: jp1_pc_nodelabel
replacement: AIX metric collector(Node exporter for AIX)
metric_relabel_configs:
Set up relabeling for metrics after scraping.
For setting examples, see the explanation of "write_relabel_configs:" in item "remote_write:".
N
--
--
[ - <relabel_config> ... ]
See the description of <relabel_config> below.
Y
Specify this option in the following cases:
-
When to Use user-defined Exporter
-
You want to remove a particular metric.
-
When metric is labeled by monitoring the operation rate of processes#2 or other means
To use the following functions in an environment upgraded from JP1/IM - Agent 13-00 to 13-01 or later, the user must change the settings manually.
-
Service monitoring function
-
Node exporter for AIX
-
For details on changing the settings, see 1.21.2(3)(f) Configuring service monitoring settings (For Windows) (Optional) and 2.19.2(3)(f) Setting up service monitoring (for Linux) (Optional) and 1.23.2(1)(c) Setting up JP1/IM - Agent in the JP1/Integrated Management 3 - Manager Configuration Guide.
Specify the exporter relabel for each job.#
-
- Legend:
-
Y: Changeable, N: Not changeable, --: Not applicable
- #
-
-
In case of jpc_node:
- source_labels: ['__name__']
regex: 'node_network_receive_bytes_total|node_network_transmit_bytes_total|node_disk_read_time_seconds_total|node_disk_write_time_seconds_total|node_boot_time_seconds|node_context_switches_total|node_cpu_seconds_total|node_disk_io_now|node_disk_io_time_seconds_total|node_disk_read_bytes_total|node_disk_reads_completed_total|node_disk_writes_completed_total|node_disk_written_bytes_total|node_filesystem_avail_bytes|node_filesystem_files|node_filesystem_files_free|node_filesystem_free_bytes|node_filesystem_size_bytes|node_intr_total|node_load1|node_load15|node_load5|node_memory_Active_file_bytes|node_memory_Buffers_bytes|node_memory_Cached_bytes|node_memory_Inactive_file_bytes|node_memory_MemAvailable_bytes|node_memory_MemFree_bytes|node_memory_MemTotal_bytes|node_memory_SReclaimable_bytes|node_memory_SwapFree_bytes|node_memory_SwapTotal_bytes|node_netstat_Icmp6_InMsgs|node_netstat_Icmp_InMsgs|node_netstat_Icmp6_OutMsgs|node_netstat_Icmp_OutMsgs|node_netstat_Tcp_InSegs|node_netstat_Tcp_OutSegs|node_netstat_Udp_InDatagrams|node_netstat_Udp_OutDatagrams|node_network_flags|node_network_iface_link|node_network_mtu_bytes|node_network_receive_errs_total|node_network_receive_packets_total|node_network_transmit_colls_total|node_network_transmit_errs_total|node_network_transmit_packets_total|node_time_seconds|node_uname_info|node_vmstat_pswpin|node_vmstat_pswpout|node_systemd_unit_state'
action: 'keep'
- source_labels: ['__name__']
regex: 'node_systemd_unit_.*'
target_label: 'jp1_pc_trendname'
replacement: 'node_exporter_service'
- source_labels: ['__name__']
regex: 'node_systemd_unit_.*'
target_label: 'jp1_pc_category'
replacement: 'service'
- source_labels: ['__name__','name']
regex: 'node_systemd_unit_.*;(.*)'
target_label: 'jp1_pc_nodelabel'
replacement: ${1}
- regex: jp1_pc_multiple_node
action: labeldrop
-
In case of jpc_windows:
- source_labels: ['__name__']
regex: 'windows_cs_physical_memory_bytes|windows_cache_copy_read_hits_total|windows_cache_copy_reads_total|windows_cpu_time_total|windows_logical_disk_free_bytes|windows_logical_disk_idle_seconds_total|windows_logical_disk_read_bytes_total|windows_logical_disk_read_latency_seconds_total|windows_logical_disk_read_seconds_total|windows_logical_disk_reads_total|windows_logical_disk_requests_queued|windows_logical_disk_size_bytes|windows_logical_disk_write_bytes_total|windows_logical_disk_write_latency_seconds_total|windows_logical_disk_write_seconds_total|windows_logical_disk_writes_total|windows_memory_available_bytes|windows_memory_cache_bytes|windows_memory_cache_faults_total|windows_memory_page_faults_total|windows_memory_pool_nonpaged_allocs_total|windows_memory_pool_paged_allocs_total|windows_memory_swap_page_operations_total|windows_memory_swap_pages_read_total|windows_memory_swap_pages_written_total|windows_memory_system_cache_resident_bytes|windows_memory_transition_faults_total|windows_net_bytes_received_total|windows_net_bytes_sent_total|windows_net_bytes_total|windows_net_packets_sent_total|windows_net_packets_received_total|windows_system_context_switches_total|windows_system_processor_queue_length|windows_system_system_calls_total|windows_process_start_time|windows_process_cpu_time_total|windows_process_handles|windows_process_io_bytes_total|windows_process_io_operations_total|windows_process_page_faults_total|windows_process_page_file_bytes|windows_process_pool_bytes|windows_process_priority_base|windows_process_private_bytes|windows_process_threads|windows_process_virtual_bytes|windows_process_working_set_private_bytes|windows_process_working_set_peak_bytes|windows_process_working_set_bytes|windows_service_state'
action: 'keep'
- source_labels: ['__name__']
regex: 'windows_process_.*'
target_label: 'jp1_pc_trendname'
replacement: 'windows_exporter_process'
- source_labels: ['__name__','process']
regex: 'windows_process_.*;(.*)'
target_label: 'jp1_pc_nodelabel'
replacement: ${1}
- source_labels: ['__name__']
regex: 'windows_service_.*'
target_label: 'jp1_pc_trendname'
replacement: 'windows_exporter_service'
- source_labels: ['__name__']
regex: 'windows_service_.*'
target_label: 'jp1_pc_category'
replacement: 'service'
- source_labels: ['__name__','name']
regex: 'windows_service_.*;(.*)'
target_label: 'jp1_pc_nodelabel'
replacement: ${1}
- regex: jp1_pc_multiple_node
action: labeldrop
-
In case of jpc_blackbox_http:
- source_labels: ['__name__']
regex: 'probe_http_duration_seconds|probe_http_content_length|probe_http_uncompressed_body_length|probe_http_redirects|probe_http_ssl|probe_http_status_code|probe_ssl_earliest_cert_expiry|probe_ssl_last_chain_expiry_timestamp_seconds|probe_ssl_last_chain_info|probe_tls_version_info|probe_http_version|probe_failed_due_to_regex|probe_http_last_modified_timestamp_seconds|probe_success|probe_duration_seconds'
action: 'keep'
-
In case of jpc_blackbox_icmp:
- source_labels: ['__name__']
regex: 'probe_icmp_duration_seconds|probe_icmp_reply_hop_limit|probe_success|probe_duration_seconds'
action: 'keep'
-
In case of jpc_cloudwatch:
- regex: 'tag_(jp1_pc_.*)'
replacement: ${1}
action: labelmap
- regex: 'tag_(jp1_pc_.*)'
action: 'labeldrop'
- source_labels: ['__name__','jp1_pc_nodelabel']
regex: '(aws_ec2_cpuutilization_average|aws_ec2_disk_read_bytes_sum|aws_ec2_disk_write_bytes_sum|aws_lambda_errors_sum|aws_lambda_duration_average|aws_s3_bucket_size_bytes_sum|aws_s3_5xx_errors_sum|aws_dynamodb_consumed_read_capacity_units_sum|aws_dynamodb_consumed_write_capacity_units_sum|aws_states_execution_time_average|aws_states_executions_failed_sum|aws_sqs_approximate_number_of_messages_delayed_sum|aws_sqs_number_of_messages_deleted_sum|aws_ebs_volume_read_bytes_sum|aws_ebs_volume_write_bytes_sum|aws_ecs_cpuutilization_average|aws_ecs_memory_utilization_average|aws_efs_total_iobytes_average|aws_efs_storage_bytes_average|aws_fsx_data_read_bytes_sum|aws_fsx_data_write_bytes_sum|aws_fsx_free_storage_capacity_average|aws_rds_cpuutilization_average|aws_rds_read_iops_average|aws_rds_write_iops_average|aws_sns_number_of_notifications_failed_sum|aws_sns_number_of_notifications_filtered_out_sum);.+$'
action: 'keep'
- source_labels: ['__name__','dimension_ClusterName']
target_label: jp1_pc_nodelabel
regex: 'aws_ecs_.+;(.+)'
replacement: ${1}
- source_labels: ['__name__','dimension_ServiceName']
target_label: jp1_pc_nodelabel
regex: 'aws_ecs_.+;(.+)'
replacement: ${1}
-
For jpc_process
- source_labels: [groupname]
regex: ([^;]*?);([^;]*?);(.*)
target_label: program
replacement: ${1}
- source_labels: [groupname]
regex: ([^;]*?);([^;]*?);(.*)
target_label: user
replacement: ${2}
- source_labels: [groupname]
regex: ([^;]*?);([^;]*?);(.*)
target_label: command_line
replacement: ${3}
- source_labels: [program]
target_label: jp1_pc_nodelabel
- source_labels: ['__name__']
regex: 'namedprocess_namegroup_num_procs|namedprocess_namegroup_cpu_seconds_total|namedprocess_namegroup_read_bytes_total|namedprocess_namegroup_write_bytes_total|namedprocess_namegroup_major_page_faults_total|namedprocess_namegroup_minor_page_faults_total|namedprocess_namegroup_context_switches_total|namedprocess_namegroup_memory_bytes|namedprocess_namegroup_open_filedesc|namedprocess_namegroup_worst_fd_ratio|namedprocess_namegroup_oldest_start_time_seconds|namedprocess_namegroup_num_threads|namedprocess_namegroup_states|namedprocess_namegroup_thread_count|namedprocess_namegroup_thread_cpu_seconds_total|namedprocess_namegroup_thread_io_bytes_total|namedprocess_namegroup_thread_major_page_faults_total|namedprocess_namegroup_thread_minor_page_faults_total|namedprocess_namegroup_thread_context_switches_total'
action: 'keep'
- regex: (jp1_pc_multiple_node|jp1_pc_agent_create_flag)
action: labeldrop
-
For jpc_promitor
- source_labels: [resource_uri]
regex: ([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/(.*)
target_label: jp1_pc_nodelabel
replacement: ${8}
- source_labels: ['__name__']
regex: 'azure_virtual_machine_disk_read_bytes_total|azure_virtual_machine_disk_write_bytes_total|azure_virtual_machine_percentage_cpu_average|azure_blob_storage_availability_average|azure_blob_storage_blob_capacity_average|azure_function_app_http5xx_total|azure_function_app_http_response_time_average|azure_cosmos_db_total_request_units_total|azure_logic_app_runs_failed_total|azure_container_instance_cpu_usage_average|azure_container_instance_memory_usage_average|azure_kubernetes_service_kube_pod_status_phase_average|azure_file_storage_availability_average|azure_file_storage_file_capacity_average|azure_service_bus_namespace_deadlettered_messages_average|azure_sql_database_cpu_percent_average|azure_sql_database_dtu_used_average|azure_sql_database_storage_maximum|azure_sql_elastic_pool_cpu_percent_average|azure_sql_elastic_pool_e_dtu_used_average|azure_sql_elastic_pool_storage_used_average|azure_sql_managed_instance_avg_cpu_percent_average|azure_sql_managed_instance_io_bytes_read_average|azure_sql_managed_instance_io_bytes_written_average|azure_sql_managed_instance_storage_space_used_mb_average'
action: 'keep'
- regex: jp1_pc_rm_agent_create_flag
action: labeldrop
- source_labels: ['__name__','phase']
regex: (azure_kubernetes_service_kube_pod_status_phase_average);Failed
target_label: __name__
replacement: ${1}_failed
- source_labels: ['__name__','phase']
regex: (azure_kubernetes_service_kube_pod_status_phase_average);Pending
target_label: __name__
replacement: ${1}_pending
- source_labels: ['__name__','phase']
regex: (azure_kubernetes_service_kube_pod_status_phase_average);Unknown
target_label: __name__
replacement: ${1}_unknown
-
For jpc_script
- source_labels: ['__name__']
regex: 'script_success|script_duration_seconds|script_exit_code'
action: 'keep'
- source_labels: [jp1_pc_script]
target_label: jp1_pc_nodelabel
- regex: (jp1_pc_script|jp1_pc_multiple_node|jp1_pc_agent_create_flag)
action: labeldrop
-
For jpc_node_aix
- source_labels: ['__name__']
regex: 'node_context_switches|node_cpu|aix_diskpath_wblks|aix_diskpath_rblks|aix_disk_rserv|aix_disk_rblks|aix_disk_wserv|aix_disk_wblks|aix_disk_time|aix_disk_xrate|aix_disk_xfers|node_filesystem_avail_bytes|node_filesystem_files|node_filesystem_files_free|node_filesystem_free_bytes|node_filesystem_size_bytes|node_intr|node_load1|node_load5|node_load15|aix_memory_real_avail|aix_memory_real_free|aix_memory_real_inuse|aix_memory_real_total|aix_netinterface_mtu|aix_netinterface_ibytes|aix_netinterface_ierrors|aix_netinterface_ipackets|aix_netinterface_obytes|aix_netinterface_collisions|aix_netinterface_oerrors|aix_netinterface_opackets|aix_memory_pgspins|aix_memory_pgspouts'
action: 'keep'
-
-
<job_name>
Specify the job name (same as the scrape job name specified by JP1/IM - Agent's Prometheus configuration file) shown in the following tables if user-defined Exporter is the same as Exporter provided by JP1/IM - Agent.
Exporter Name
Job name to specify
Node exporter
jpc_node
Windows exporter
jpc_windows
Node exporter for AIX
jpc_node_aix
Blackbox exporter
jpc_blackbox_http or jpc_blackbox_icmp
Yet another cloudwatch exporter
jpc_cloudwatch
Process exporter
jpc_process
Promitor
jpc_promitor
Script exporter
Job name starts with "jpc_script"
-
<static_config>
The static_config allows you to set a list of targets and a set of labels that are common to them. This is a typical way to specify a static target in a scrape configuration.
Note: In the JP1/IM - Agent, it is described in the file specified in the file_sd_config.
Item
Description
Changeability
What You Setup in Your JP1/IM - Agent
JP1/IM - Agent Defaults Value
targets:
Specifies the scrape target. You can specify up to 100.
N
--
--
[ - '<host>' ]
Specifies the host name to be scraped within 255 bytes.
<Configuration Example>
- targets:
- HOST1:1000
- HOST2:2000
Y
Specifies the scrape target.
--
labels:
Specify the label that you want to set for all metrics retrieved from scrape. You can specify up to 30 of them.
N
--
--
[ <labelname>: <labelvalue> ... ]
Specify the label name and label value. The label name and label value can be up to 255 bytes each.
Y
Specify if you want to add a label to the metric.
--
- Legend:
-
Y: Changeable, N: Not changeable, --: Not applicable
-
<relabel_config>
You can configure relabel_config to edit target labels or exclude specified targets before processing scrapes, remote lights, alert notifications, and so on.
relabel_config settings are applied to each target in the order in which they appear in the configuration file.
Initially, the following labels are set for the target:
-
For the target job label, the value of the job_name of each scrape definition is set.
-
The instance label and __address__ label are set to the string specified in the targets of the discovery configuration file.
-
If __param_ [name] label exists in the target, the URL parameter of the form "[name]=value" is set when scraping.
-
The target is set to the label specified in labels in the discovery configuration file.
Since Prometheus server scrapes the "host name: port number" set in the __address__ label, if the value specified for targets is not the "host name: port number" to scrape destination, it is necessary to edit the scrape definition by relabel_config.
Labels beginning with __ are removed from the data after processing such as scraping, remote light, and alert notifications.
If the relabel step needs to store the label value temporarily (as input to subsequent relabel steps), use the __tmp label name prefix. This prefix is guaranteed not to be used by Prometheus itself.
Item
Description
Changeability
What You Setup in Your JP1/IM - Agent
JP1/IM - Agent Defaults Value
[ source_labels: '[' <labelname> [, ...] ']' ]
For Source label, select a value from an existing label.
The contents are concatenated using the configured separator and matched against the regular expressions configured for the replace, keep, and drop actions.
Y
Same as the "Description" column.
--
[ separator: <string> | default = ; ]
Sets the separator that is placed between the values of the concatenated source label.
Y
Same as the "Description" column.
--
[ target_label: <labelname> ]
Sets the label to which the replacement action writes the resulting value.
Required for replace actions. Regex capture groups are available.
Y
Same as the "Description" column.
--
[ regex: <regex> | default = (.*) ]
Sets the regular expression against which the extracted values are matched.
For details, see the <regex> explanation below.
Y
Same as the "Description" column.
--
[ replacement: <string> | default = $1 ]
Sets the replacement value at which the regular expression substitution is performed if the regular expression matches. Regex capture groups are available.
Y
Same as the "Description" column.
--
[ action: <relabel_action> | default = replace ]
Sets the action to take based on regular expression matching.
For details, see <relabel_action> below.
Y
Same as the "Description" column.
--
-
- Legend:
-
Y: Changeable, --: Not applicable
-
<regex>
Set any valid RE2 regular expression.
Required for replace, keep, drop, and labeldrop actions. Regex is anchored at both ends. To unanchor a regular expression, use .*[regex].*.
-
<relabel_action>
Set the relabeling action.
- replace:
-
Match regex against concatenated source_labels. and the matchgroup reference (${1}, ${2}, ...) with that value, and set the target_label to replacement. If the regex does not match, replacement is not performed.
- keep:
-
Remove targets that do not match the regex concatenated source_labels.
- drop:
-
Deletes targets that match the regex concatenated source_labels.
- labeldrop:
-
Match regex to all label names. The matched label is removed from the set of labels.
Configuration Example: User's own scrape definition
If you use your own exporter and define multiple monitoring targets in the discovery configuration file, you must specify regex for the relabel_config and set the value to the jp1_pc_nodelabel.
For scrape defined setup and jp1_pc_nodelabel, see 1.21.2(3)(d) Add user-defined Exporter scrape job (for Windows) (optional) in the JP1/Integrated Management 3 - Manager Configuration Guide.
The following three monitoring targets are set in the targets of the discovery configuration file. Set "target1 label", "target2 label", and "target3 label" to the jp1_pc_nodelabel as the label name of each IM management node.
- targets: - hostA:target1 label:query-parameter-1-passed-to-exporter - hostA:target2 label:query-parameter-2-passed-to-exporter - hostB:target3 label:query-parameter-3-passed-to-exporter
Specifying relabel_config
relabel_configs: - source_labels:[__address__] + target_label:__param_target | (1) regex:([^:]+):([^:]+):(.*) | replacement:${3} + - source_labels:[__address__] + (2) target_label:instance + - source_labels:[__address__] + (3) target_label:jp1_pc_nodelabel | regex:([^:]+):([^:]+):(.*) | replacement:${2} + - target_label:__address__ + (4) replacement:localhost:20799 +
(1): The value set in __address__ (hostA:target1 label:query-parameter-1-passed-to-Exporter) is split, and the string of query-parameter-1-passed-to-Exporter is set to the __param_target label. target is the URL parameter when scraping.
(2):I am setting the instance label to the value set for __address__.
(3): The value set in __address__ is split, and the label name (targetX label) of the IM management node is set to the jp1_pc_nodelabel label.
(4): The user's own exporter scrape destination information (host-name:port-number) is set in the __address__.
-
<metric_relabel_configs>
Metric relabeling is applied to the sample as the last step before ingestion. It has the same configuration format and action as Target relabeling. Metric relabeling does not apply to automatically generated time series such as up.
This is used to filter out time series that are too expensive to ingest.
-
<alert_relabel_configs>
Alert relabeling applies to alerts before they are sent to AlertManager.
It has the same configuration format and action as target relabeling. Alert relabeling is applied after the external label.
One use use is to ensure that HA pairs of Prometheus servers with different external labels send the same alert.
-
<alertmanager_config>
alertmanager_config section specifies the Alertmanager instance to which the Prometheus server sends alerts. It also provides parameters to set how to communicate with these Alertmanagers.
Alertmanager can also be statically set with static_configs parameters or dynamically discovered using one of the supported service discovery mechanisms.
Item
Description
Changeability
What You Setup in Your JP1/IM - Agent
JP1/IM - Agent Defaults Value
static_configs:
Configure the settings by direct specification.
N
--
--
- targets:
Specifies the Alertmanager to which the alert should be sent.
N
--
--
[ - '<host>' ]
Specify the host name up to 255 bytes.
<Configuration Example>
alerting:
alertmanagers:
- static_configs:
- targets: [integrated-agent-host-name:20714]
R
For the port number, specify the port of Alertmanager.
If a host name or internet address is specified for --web.listen-address in the Alertmanager command line option, modify localhost to the host name or internet address specified in --web.listen-address.
localhost:20714
- Legend:
-
R: Required, N: Not changeable, --: Not applicable