Data Metrics Server Documentation Index
Command-Line Tool Reference Home

query-metric

Description
Examples
Subcommands
Arguments

Description

Explore collected monitoring data by forming queries for collected data.

This tool features commands that can help you interact with the monitoring API. In particular the explore command is a good place to start for discovering the type of data that is available from the Data Metrics Server. Also, commands for listing dynamic data like metrics and instances can help you understand valid arguments to supply in queries of the API.

See /home/centos/workspace/Core-Release-Pipeline/build/package/PingDataMetrics/docs/metrics/index.html for detailed information about metrics and related concepts.

Examples

Starts the tool in interactive mode, prompting you for commands to run until you quit:
query-metric

Subcommands

explore
query
list-metrics
list-instances
list-dimensions

explore

Create a series of hyper-linked HTML files containing collected data for a broad range of metrics

The primary purpose of this sub-command is to demonstrate how to interact with the API as well as show what data is available. By default a relatively short time frame and number of data intervals is specified in order to improve this tool's response time. If large numbers of metrics instances, or data points are requested it may the tool a while to finish generating output

Server instances may be specified using several criteria such as location, version, type, and specific instance IDs. Each criteria may specify one or more values that will match a server if any of the values are present. When used together, these criteria form a selection clause in which all the elements must be true. So for example the following --instanceLocation Austin --instanceType ds --instanceType proxy would select all Directory Proxy Server and Directory Server instances in Austin

See /home/centos/workspace/Core-Release-Pipeline/build/package/PingDataMetrics/docs/metrics/index.html for detailed information about metrics and related concepts


explore Examples

Generate data for all metrics and server instances in a specified output directory:
query-metric explore --httpPort 8443 --useSSL --outputDir explore-output


Generate response-time and throughput data for Directory Proxy Server instances in Austin for the previous two weeks:
query-metric explore --httpPort 8443 --useSSL --instanceType proxy \
     --instanceLocation Austin --metric response-time --metric throughput \
     "--startTime -2w"

explore Arguments

--outputDir {directory}

Description The directory to which generated content will be written
Required No
Multi-Valued No

--overwrite

Description Whether to overwrite an existing output directory

--instance {instance ID}

Description The ID of a server instance for which data is collected. Use the list-instances subcommand to view valid instance IDs
Required No
Multi-Valued Yes

--instanceType {instance type}

Description The type of server instance which data is collected. Use the list-instances subcommand to view valid instance types
Required No
Multi-Valued Yes

--instanceLocation {location}

Description The location of server instances for which data is collected. Use the list-instances sub-command to view valid instance locations
Required No
Multi-Valued Yes

--instanceHostname {host}

Description The location of server instances for which data is collected. Use the list-instances sub-command to view valid instance host names
Required No
Multi-Valued Yes

--instanceVersion {version}

Description The version of server instances for which data is collected. Use the list-instances sub-command to view valid instance versions
Required No
Multi-Valued Yes

--startTime {time}

Description The start time for the query. May be an offset from the end time (for example -5m) or an ISO 8601 date (for example 2012-09-12T17:41Z)
Default Value -24h
Required No
Multi-Valued No

--endTime {time}

Description The end time for the query. May be an offset from now (for example -5m) or an ISO 8601 date (for example 2012-09-12T17:41Z). The default is 'now'
Required No
Multi-Valued No

--maxIntervals {number}

Description The maximum number of time intervals to return
Default Value 1
Required No
Multi-Valued No

--statistic {statistic}

Description Statistic for the generated data
Required No
Multi-Valued No

--rateScaling {rate}

Description Rate for converting count-type metrics to a rate. Acceptable values are second, minute, hour
Required No
Multi-Valued No

--metric {metric}

Description Metric for which data will be returned
Required No
Multi-Valued Yes

--pivot {pivot}

Description Dimension or pivot value for splitting data into distinct series. The value 'dim1'/'dim2'/'dim3' will split the data by the 1st/2nd/3rd dimension of the metric (if defined). The value of 'instance' will split the data by monitored server. The value of 'histogram' will split the data by histogram buckets if the metric provides histogram data
Required No
Multi-Valued Yes

query

Query for a single data table for a specific metric

Server instances may be specified using several criteria such as location, version, type, and specific instance IDs. Each criteria may specify one or more values that will match a server if any of the values are present. When used together, these criteria form a selection clause in which all the elements must be true. So for example the following --instanceLocation Austin --instanceType ds --instanceType proxy would select all Directory Proxy Server and Directory Server instances in Austin


query Examples

Obtain a data table from the server in JSON format that shows average throughput for all Directory Proxy Server instances in the topology over time with 100 data points. Throughput values are represented as operations per second:
query-metric query --hostname localhost --httpPort 8443 --useSSL \
     --username cn=user1,cn=api-users --password secret --table json \
     --metric throughput --instanceType proxy --statistic average \
     --pivot op-type --pivot application-name --dimension op-type:search,modify \
     --rateScaling second --maxIntervals 100 --startTime 2012-09-01T17:41Z \
     --endTime 2012-09-30T17:41Z

query Arguments

--instance {instance ID}

Description The ID of a server instance for which data is collected. Use the list-instances subcommand to view valid instance IDs
Required No
Multi-Valued Yes

--instanceType {instance type}

Description The type of server instance which data is collected. Use the list-instances subcommand to view valid instance types
Required No
Multi-Valued Yes

--instanceLocation {location}

Description The location of server instances for which data is collected. Use the list-instances sub-command to view valid instance locations
Required No
Multi-Valued Yes

--instanceHostname {host}

Description The location of server instances for which data is collected. Use the list-instances sub-command to view valid instance host names
Required No
Multi-Valued Yes

--instanceVersion {version}

Description The version of server instances for which data is collected. Use the list-instances sub-command to view valid instance versions
Required No
Multi-Valued Yes

--startTime {time}

Description The start time for the query. May be an offset from the end time (for example -5m) or an ISO 8601 date (for example 2012-09-12T17:41Z)
Default Value -24h
Required No
Multi-Valued No

--endTime {time}

Description The end time for the query. May be an offset from now (for example -5m) or an ISO 8601 date (for example 2012-09-12T17:41Z). The default is 'now'
Required No
Multi-Valued No

--maxIntervals {number}

Description The maximum number of time intervals to return
Default Value 1
Required No
Multi-Valued No

--dimension {dimension:value}

Description Dimension name:value pair for filtering results. Only result sets matching specified dimensions will be returned
Required No
Multi-Valued Yes

--pivot {pivot}

Description Dimension or pivot value for splitting data into distinct series
Required No
Multi-Valued Yes

--statistic {statistic}

Description Statistic for the generated data
Required No
Multi-Valued No

--rateScaling {rate}

Description Rate for converting count-type metrics to a rate. Acceptable values are second, minute, hour
Required No
Multi-Valued No

--metric {metric}

Description Metric for which data will be returned
Required No
Multi-Valued No

--table {format}

Description Specifies request for table data along with the format for the data. Valid values are xml, json
Required No
Multi-Valued Yes

--outputDir {directory}

Description The directory to which generated content will be written
Required No
Multi-Valued No

--outputFileName {file}

Description The base name of the file to which the query result will be written. The file extension will be determined by the content-type requested
Required No
Multi-Valued No

list-metrics

List the set of metric definitions collected by the Data Metrics Server

The Data Metrics Server collects metric information from monitored servers. This command can be used to view this information


list-metrics Examples

Print a table of known metrics to the terminal including allowed dimensions:
query-metric list-metrics --includeDimensions

list-metrics Arguments

--includeDimensions

Description Indicates whether to include dimension values with each metric

list-instances

List server instances for which data has been collected by the Data Metrics Server

The Data Metrics Server is configured to collect metric samples from a set of monitored servers. This command can be used to view the set of server instances from which the Data Metrics Server has ever collected metric samples. This may include servers currently being monitored as well as server instances that are no longer be actively monitored


list-instances Examples

List server instances for which data has been collected by the Data Metrics Server:
query-metric list-instances

list-dimensions

List the set of dimensions and their current values

The Data Metrics Server collects dimension values from monitored servers. Some dimensions like op-type have static values that do not change over time. However most dimensions have values that are collected from monitored servers and vary by deployment. This command can be used to view all dimensions and their current values


list-dimensions Examples

Print a table of known dimensions and their values to the terminal:
query-metric list-dimensions

Arguments

-V
--version

Description Display Data Metrics Server version information

-H
--help

Description Display general usage information

--help-debug

Description Display help for using debug options
Advanced Yes

-h {host}
--hostname {host}

Description Data Metrics Server hostname or IP address
Default Value ci-centos7-build-101-120.local
Required No
Multi-Valued No

-p {port}
--httpPort {port}

Description Data Metrics Server HTTP/S port number
Default Value 8443
Required No
Multi-Valued No

-Z
--useSSL

Description Use SSL for secure communication with the server

-X
--trustAll

Description Trust all server SSL certificates

-D {userName}
--username {userName}

Description optional username for authentication
Required No
Multi-Valued No

-w {password}
--password {password}

Description optional password for authentication
Required No
Multi-Valued No

-j {passwordFile}
--passwordFile {passwordFile}

Description optional password file for authentication
Required No
Multi-Valued No

--propertiesFilePath {propertiesFilePath}

Description Path to the file that contains default property values used for command-line arguments
Required No
Multi-Valued No

-n
--no-prompt

Description Use non-interactive mode. If data in the command is missing, you will not be prompted and the tool will fail

--script-friendly

Description Use script-friendly mode

--help-subcommands

Description Display all subcommands