Metrics Engine Documentation Index
Command-Line Tool Reference Home

query-metric

Description
Examples
Subcommands
Arguments

Description

Explore collected monitoring data by forming queries for charts and 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 Metrics Engine. Also, commands for listing dynamic data like metrics and instances can help you understand valid arguments to supply in queries of the API.

See 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 charts 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 identity-data-store --instanceType proxy would select all Identity Proxy and Identity Data Store instances in Austin

See docs/metrics/index.html for detailed information about metrics and related concepts


explore Examples

Generate charts for all metrics and server instances in a specified output directory:
query-metric explore --httpPort 8080 --outputDir explore-output


Generate response-time and throughput charts for Identity Proxy instances in Austin for the previous two weeks:
query-metric explore --httpPort 8080 --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 chart data into distinct series. The value 'dim1'/'dim2'/'dim3' will split the chart by the 1st/2nd/3rd dimension of the metric (if defined). The value of 'instance' will split the chart by monitored server. The value of 'histogram' will split the chart by histogram buckets if the metric provides histogram data
Required No
Multi-Valued Yes

query

Query for a single chart or 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 identity-data-store --instanceType proxy would select all Identity Proxy and Identity Data Store instances in Austin


query Examples

Obtain a bar chart PNG file from the server where each bar in the chart conveys the response time values for each server in the topology aggregated for the last 5 minutes:
query-metric query --hostname localhost --httpPort 8080 \
     --username cn=user1,cn=api-users --password secret --metric response-time \
     --statistic histogram --pivot instance --startTime -5m


Obtain a data table from the server in JSON format that shows average throughput for all Identity Proxy instances in the topology over time with 100 data points. Each line in the chart represents either an application's search or modification throughput. Throughput values are represented as operations per second:
query-metric query --hostname localhost --httpPort 8080 \
     --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 chart 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

--chart {format}

Description Specifies request for chart image along with the graphic format for the image. If not specified and table is not specified, a chart in png format is returned. Valid values are png, jpg
Required No
Multi-Valued Yes

--table {format}

Description Specifies request for table data along with the format for the data. If not specified and chart is not specified, a chart will be returned. Valid values are xml, json
Required No
Multi-Valued Yes

--title {title}

Description The title of the generated chart. If not specified the Metrics Engine will choose the title of the chart
Required No
Multi-Valued Yes

--height {pixels}

Description Height in pixels of the generated chart
Required No
Multi-Valued No

--width {pixels}

Description Width in pixels of the generated chart
Required No
Multi-Valued No

--showLegend

Description Specifies whether to display a legend in the generated chart

--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 Metrics Engine

The Metrics Engine 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 Metrics Engine

The Metrics Engine 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 Metrics Engine has ever collected metric samples. This may include servers currenty 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 Metrics Engine:
query-metric list-instances

list-dimensions

List the set of dimensions and their current values

The Metrics Engine 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 Metrics Engine 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 Metrics Engine hostname or IP address
Default Value localhost
Required No
Multi-Valued No

-p {port}
--httpPort {port}

Description Metrics Engine HTTP/S port number
Default Value 8080
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