Hitachi

JP1 Version 13 JP1/Integrated Management 3 - Manager Command, Definition File and API Reference


Blackbox exporter configuration file (jpc_blackbox_exporter.yml)

Organization of this page

Format

Write in YAML format.

modules:
  http:
    prober: http
    http:
      method: GET
      compression: ""
      follow_redirects: true
      fail_if_ssl: false
      fail_if_not_ssl: false
      preferred_ip_protocol: ip4
      ip_protocol_fallback: false
      body: ""
      tls_config:
        insecure_skip_verify: true
  icmp:
    prober: icmp
    icmp:
      preferred_ip_protocol: ip4
      ip_protocol_fallback: false

File

jpc_blackbox_exporter.yml

jpc_blackbox_exporter.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/

■Integrated manager host (model File only)

/opt/jp1pccspkg/jp1_pc_agent_probe/jp1_pc_agent_probe_windows_JP1/IM - Agent-version-number-(VVRRSS-format)/blackbox_exporter/conf/

/opt/jp1pccspkg/jp1_pc_agent_probe/jp1_pc_agent_probe_linux_JP1/IM - Agent-version-number-(VVRRSS-format)/blackbox_exporter/conf/

■Monitoring agent host

In Windows:

  • For a physical host

    Install the monitoring agent directory\jp1pccs\conf\

  • For a logical host

    shared-directory\jp1pccs\conf\

In Linux:

  • For a physical host

    Install the monitoring agent directory/jp1pccs/conf/

  • For a logical host

    shared-directory/jp1pccs/conf/

Description

A configuration file that specifies the operation of the Blackbox exporter.

Character code

UTF-8 (without BOM)

Line feed code

In Windows: CR+LF

In Linux: LF

When the definitions are applied

Reflected when the Blackbox exporter is restarted or when the Blackbox exporter reload API is executed.

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

Modules

--

Y

--

--

module_name

Specify a module name of your choice.

Specify this if you want to create a module with different settings from the one you have already created. When you create a module, you must also create a scrape definition and a discovery configuration file. For setup instructions, see the manuals "JP1/Integrated Management 3 - Manager Configuration Guide" and refer to "1.21.2(6) Setup" for Windows and "1.21.2(3)(c) Add scrape jobs for Blackbox exporter (for Windows) (optional)" and "2.19.2(6) Setup" and "2.19.2(3)(c) Blackbox exporter scrape jobs for Blackbox exporter (for Linux) (optional)" for Linux.

When monitoring is performed with a created module, there is no need to define a new module_name, and the information to be monitored is added to the targets of the created discovery configuration file.

<Configuration Example>

modules:

http_2xx:

Y

--

For the modules to be defined as the default Setup, see "Setup in Blackbox exporter 1.21.2 (6)" and "Setup in Blackbox exporter 2.19.2 (6)" in the manual "JP1/Integrated Management 3 - Manager Configuration Guide".

prober: <prober_string>

Specifies the protocol to probe.

You can specify http or icmp.

Y

Specify http or icmp.

None

[ http: <http_probe> ]

Configure the http protocol settings.

For details, see <http_probe> below.

Y

Specifies parameters for a specific protocol.

Not specified

[ icmp: <icmp_probe> ]

Configure the icmp protocol settings.

For details, see <icmp_probe> below.

Y

Specifies parameters for a specific protocol.

Not specified

<http_probe>

--

--

--

--

[ valid_status_codes: <int>, ... ]

Specify acceptable HTTP status codes.

If the specification is omitted or an empty value is specified, the 200 series is allowed.

<Configuration Example>

valid_status_codes: [200, 201]

Y

Specify when status codes other than the 200 series are treated as normal.

Not specified

[ valid_http_versions: <string>, ... ]

Specify the allowed HTTP versions.

If omitted or empty is specified, all are allowed.

<Configuration Example>

valid_http_versions: ["HTTP/1.1", "HTTP/2"]

Y

Specify this when you want to limit the allowed HTTP versions.

Not specified

[ method: <string>]

Specify the HTTP method to use.

<Configuration Example>

method: GET

Y

Specify the HTTP method to use.

GET

headers: [ <string>: <string> ... ]

Specify the headers of the HTTP request.

If the "Accept-Encoding" header is specified, see also the item on compression.

<Configuration Example>

headers:

Host: host.example.com

Accept-Language: en-US

Y

Specify the headers of the HTTP request.

Not specified

[ compression: <string> ]

Specifies the compression algorithm to use to decompress the response.

You can specify gzip, br, deflate, identity.

If the Accept-Encoding header is specified, the compression algorithm specified with this option must be allowed.

Y

Specifies the compression algorithm to use.

""

[ follow_redirects: <boolean>]

Specifies whether HTTP redirects should be followed.

You can specify true or false.

Y

Specify true to enable.

true

[ fail_if_ssl: <boolean>]

Specifies whether the probe fails when SSL is presented.

You can specify true or false.

Y

Specify true to enable.

false

[ fail_if_not_ssl: <boolean>]

Specifies whether SSL should fail if not presented.

You can specify true or false.

Y

Specify true to enable.

false

fail_if_body_matches_regexp:[ - <regex>, ... ]

Specifies a regular expression to be treated as invalid if it matches the response body.

If the response body matches the regular expression, the probe fails.

Multibyte characters are not allowed.

<Configuration Example>

fail_if_body_matches_regexp:

- "Could not connect to database"

Y

Specifies if you want the probe to fail depending on the contents of the response body.

Not specified

fail_if_body_not_matches_regexp:[ - <regex>, ... ]

Specifies a regular expression to be treated as invalid if it does not match the response body. If the response body does not match the regular expression, the probe fails.

Multibyte characters are not allowed.

<Configuration Example>

fail_if_body_not_matches_regexp:

- "Download the latest version here"

Y

Specifies if you want the probe to fail depending on the contents of the response body.

Not specified

fail_if_header_matches:[ - <http_header_match_spec>, ... ]

Specify a regular expression to be treated as invalid when it matches the response header. If the response header matches the regular expression, the probe fails. Headers with multiple values are treated as failed if at least one matches.

For information about datail, see http_header_match_spec below.

Y

Specify if you want the probe to fail based on the contents of the response header.

Not specified

fail_if_header_not_matches:[ - <http_header_match_spec>, ... ]

Specify a regular expression to be treated as invalid if it does not match the response header. If the response header does not match the regular expression, the probe fails. Headers with multiple values are treated as failed if they do not match all of them.

For details, see <http_header_match_spec> below.

Y

Specify if you want the probe to fail based on the contents of the response header.

Not specified

tls_config:[ <tls_config> ]

Sets the TLS protocol configuration for the HTTP probe.

For details, see <tls_config> below.

Y

For details, see <tls_config> below.

Specify the following values:

insecure_skip_verify: true

basic_auth:

Set the HTTP basic authentication credentials for the target.

Y

--

None

[ username: <string> ]

Specifies User name for accessing the target.

Password must be Add using the Secret Management command.

Y

Specify for Basic authentication.

None

[ proxy_url: <string> ]

Specifies HTTP proxy server to use to connect to the monitoring target.

Format:

http:// Host name or IP address : Port number

Y

Required to connect to the monitoring target through a proxy server.

None

[ proxy_user: <string> ]

Specify User name if HTTP proxy server that you want to use to connect to the target requires Basic authentication.

For User name, specify a User name that does not URL encode.

Password must be Add using the Secret Management command.

Y

Required if you are going through a proxy server with authentication to connect to the target.

None

[ preferred_ip_protocol: <string>]

Specifies the preferred protocol.

Only ip4 can be specified.

R

Specify ip4.

None

[ ip_protocol_fallback: <boolean> ]

Specifies whether to retreat if the preferred protocol is not available.

Only false can be specified.

R

Specify false.

None

body: [ <string> ]

Specifies the body of the HTTP request used by the probe.

R

Specifies the body of the HTTP request used by the probe.

""

<http_header_match_spec>

--

--

--

--

header: <string>,

Specify the header field name.

<Configuration Example>

fail_if_header_matches: # Verifies that no cookies are set

- header: Set-Cookie

allow_missing: true

regexp: '.*'

R

Specify the header field name.

None

regexp: <regex>,

Specifies the comparison string (regular expression).

Multibyte characters are not allowed.

R

Specifies the comparison string (regular expression).

None

[ allow_missing: <boolean> ]

Specifies whether the absence of a header field is allowed.

Y

Specify true to enable.

false

<icmp_probe>

--

--

--

--

[ preferred_ip_protocol: <string>]

Specifies the preferred protocol.

Only ip4 can be specified.

R

Specify ip4.

--

[ ip_protocol_fallback: <boolean> ]

Specifies whether to retreat if the preferred protocol is not available.

Only false can be specified.

R

Specify false.

--

[ source_ip_address: <string> ]

Specify the source IP address.

Y

Specify to fix the source IP address.

Not specified

[ dont_fragment: <boolean> ]

Specifies the DF bit of the IP header.

You can specify true or false.

It only works with IP4.

Y

Specifies that fragments should not be made.

Not specified

<tls_config>

--

--

--

--

[ insecure_skip_verify: <boolean> ]

Specifies whether to disable certificate validation for the target.

You can specify true or false.

If you want to monitor the following metrics, you must specify false, place the certificate, and specify the path of the certificate file in the appropriate parameters: Also, if you specify true, the values of the following metrics will not be correct.

  • probe_ssl_last_chain_expiry_timestamp_seconds

If an IP address is specified instead of a host name in the target URL of the discovery configuration file (jpc_file_sd_config_blackbox_http.yml) of Blackbox exporter (HTTP/HTTPS monitoring), false cannot be specified.

Y

Specify true to disable validation; false to enable.

  • For http modules

    true

  • In cases other than the above

    Not specified

[ ca_file: <filename> ]

Specifies the CA certificate to use for the target.

Is.

If the Insecure_skip_verify parameter is false, it is required.

Place the file under the following directory and specify the path to the file:

  • In Linux:

    installation-directory/jp1ima/conf/user/cert/

  • In Windows:

    installation-directory\jp1ima\conf\user\cert\

For more information on datail, refer to file and directories that you can view and edit in JP1/IM - Agent of integrated agent host in the Appendix A.4 JP1/IM - Agent of JP1/Integrated Management 3 - Manager Overview and System Design Guide.

Y

Specify the CA certificate file.

Not specified

[ cert_file: <filename> ]

Specifies the client certificate file for the target.

Required if the monitored target requires client authentication.

Place the file under the following directory and specify the path to the file:

  • In Linux:

    installation-directory/jp1ima/conf/user/cert/

  • In Windows:

    installation-directory\jp1ima\conf\user/cert\

For more information on datail, refer to file and directories that you can view and edit in JP1/IM - Agent of integrated agent host in the Appendix A.4 JP1/IM - Agent of JP1/Integrated Management 3 - Manager Overview and System Design Guide.

Y

Specifies the client certificate file.

--

[ key_file: <filename> ]

Specify the client certificate key file for the target.

Required if the monitored target requires client authentication.

Place the file under the following directory and specify the path to the file:

  • In Linux:

    installation-directory/jp1ima/conf/user/secret/

  • In Windows:

    installation-directory\jp1ima\conf\user\secret\

For more information on datail, refer to file and directories that you can view and edit in JP1/IM - Agent of integrated agent host in the Appendix A.4 JP1/IM - Agent of JP1/Integrated Management 3 - Manager Overview and System Design Guide.

Y

Specifies the client certificate key file.

--

[ server_name: <string> ]

Specifies the server name used to verify the hostname of the target.

Y

Specify the server name.

Host name of the target host

Legend:

R: Required, Y: Changeable, --: Not applicable