Hitachi

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


[Figure]SQL exporter configuration file (jpc_sql_exporter.yml)

Organization of this page

Format

Write in YAML format.

global:
  scrape_timeout: 10s
  scrape_timeout_offset: 500ms
  min_interval: 0s
  max_connections: 3
  max_idle_connections: 3
  max_connection_lifetime: 5m
  JP1IMADIR:installation-path-for-JP1/IM-Agent
 
jobs:
  - job_name: Monitored hostname#1
    collectors: [mssql_*]
    static_configs:
      - targets:#2
          monitored-connection-information 1#2
          monitored-connection-information 2#2
            :
 
collector_files: 
  - "..\\conf\\mssql_*.collector.yml"
#1

Specifies that the hostname of Microsoft SQL Server to be monitored is unique.

#2

The targets can contain more than one monitored connection-information in the following format: Each monitored instance is specified to be unique.

Monitored-instance-name:'sqlserver://login-username@monitored-hostname:monitored-port-number'

File

jpc_sql_exporter.yml

Storage destination directory

- Integrated agent host
  • For a physical host

Windows-versions-of-SQL-exporter-archived-file#-are-extracted-to\sql_exporter_windows\jp1ima\conf\

#

Agent-path\options\sql_exporter_windows_VVRRSS.zip

Description

A configuration file that defines the operation of SQL exporter.

Character code

UTF-8 (without BOM)

Line feed code

CR+LF

Time of import of definitions

This is applied when SQL exporter is restarted.

Description

Item name

Description

Changeability

What You Set Up with JP1/IM - Agent

JP1/IM - Agent Defaults

global:

--

N

--

--

scrape_timeout:

Specifies scrape timeout period for Microsoft SQL Server in numbers and units.

If you specify a value less than or equal to 0 (including minus), the timeout is not set unless you set a timeout for Prometheus.

If the value is incorrect or unset, use the default value.

Y

Tune to your environment

Minimum value: 1s

Maximum value: 9223372036 s

10s

scrape_timeout_offset:

Specify the number and unit of offset to be subtracted from the timeout period for Prometheus server.

This prevents Prometheus from timing out first, because the scrape_timeout of Prometheus times out after subtracting the value specified for this field.

If the value is negative, incorrect, or unset, use the default value.

Y

Tune to your environment

Minimum value: 1s

Maximum value: 9223372036 s

500ms

min_interval:

Specifies the minimum interval between collector executions in numbers and units.

Specifying a value less than or equal to scrape interval of Prometheus does not affect scrape.

If you specify a value that exceeds Prometheus's scrape interval, scrape returns the previously obtained value to Prometheus within the number of seconds set for this option.

If the value is negative, incorrect, or unset, use the default value.

Y

Because SQL exporter executes SQL statements for each scrape, adjust this option if you want to limit the number of times SQL accesses to thedatabase.

0s

max_connections:

Specifies the maximum number of open connections for any one target.

Metric queries are performed concurrently on multiple connections, similar to scraping.

If you specify an invalid value or a value that is less than or equal to zero (including a negative value), use the default value.

Y

Tune to your environment

Minimum value: 1

Maximum value: 9223372036854775807

3

max_idle_connections:

Specifies the maximum number of idle connections to any one target.

This field should always be the same as the max_connections unless the collection interval is to be very long.

If you specify an invalid value or a value that is less than or equal to zero (including a negative value), use the default value.

Y

Tune to your environment

Minimum value: 1

Maximum value: 9223372036854775807

3

max_connection_lifetime:

Specifies the maximum time, in numbers and units, that a connection can be reused for any one target.

You can specify this item to delay and close expired connections before they are reused. If you specify 0, it does not depend on the elapsed time of the connection and the connection is not closed.

If you specify a negative value, use the default value.

Y

Tune to your environment

Minimum value: 1m

Maximum value: 153722867 m

5m

JP1IMADIR:

Specify JP1/IM - Agent installation path.

M

Specify JP1/IM - Agent installation path.

--

jobs:

--

N

--

--

- job_name:

Specify the host name to be monitored.

M

Specify the host name to be monitored.

None

collectors:

Specifies the collector name to run on the target.

You can use glob patterns.

N

[mssql_*]

--

static_configs:

--

N

--

--

- targets:

--

N

--

--

Connection-to-be-monitored

Describes the connection information of the monitoring target in the following format.

Monitored-instance-name:'sqlserver://login-username@monitored-hostname:monitored-port-number'

Monitored-instance-name

Specifies instance to be monitored for performance.

It is displayed as a node name of IM management node.

If you did not specify any instance when building Microsoft SQL Server, specify the default name of instance "MSSQLSERVER".

Login-username

Specify the username that can log in to instance for which you want to monitor performance.

Monitored-hostname

Specify the host name of the target for performance monitoring.

Monitored-port-number

Specifies the port number to be monitored for performance.

To enable TLS communication with Microsoft SQL Server, grant the following options:

encrypt=true

The following shows the connection information of the monitoring target when the option is given.

Monitored-instance-name:'sqlserver://login-username@monitored-hostname:monitored-port-number'?encrypt=true'

If encryption is enabled and the monitored host name in the connection information does not match the host name registered in TLS server certificate, you must specify hostNameInCertificate option as shown below.

Monitored-instance-name:'sqlserver://login-username@monitored-hostname:monitored-port-number'?encrypt=true&hostNameInCertificate=Hostname-registered-in-TLS-server-certificate'

M

Specifies the connection information to be monitored.

None

collector_files:

--

N

--

--

- Metric file name

Specify glob listing. One collector definition is read from each matching file.

You can use glob patterns.

N

--

"..\\conf\\mssql_*.collector.yml"

Legend:

Y: Changeable, N: Not changeable, --: Not applicable